fix(x3): white pre-flash on sleep entry to clear reader page ghosting
On X3 panels, perform a full-sync white flash before rendering the sleep screen. The previous approach (requestResync condition passes after the sleep image) reduced ghosting but the first frame still showed residual content from the reader page. The pre-flash drives the panel to a clean white state first, so the sleep screen renders ghost-free. Skipped for OVERLAY mode (frame buffer must stay intact) and BLANK mode (which renders white anyway). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
509adada2c
commit
bc62d882e4
@@ -4,6 +4,7 @@
|
|||||||
#include <Epub/converters/PngToFramebufferConverter.h>
|
#include <Epub/converters/PngToFramebufferConverter.h>
|
||||||
#include <FsHelpers.h>
|
#include <FsHelpers.h>
|
||||||
#include <GfxRenderer.h>
|
#include <GfxRenderer.h>
|
||||||
|
#include <HalGPIO.h>
|
||||||
#include <HalStorage.h>
|
#include <HalStorage.h>
|
||||||
#include <I18n.h>
|
#include <I18n.h>
|
||||||
#include <PNGdec.h>
|
#include <PNGdec.h>
|
||||||
@@ -357,10 +358,19 @@ void SleepActivity::onEnter() {
|
|||||||
if (SETTINGS.sleepScreen != CrossPointSettings::SLEEP_SCREEN_MODE::OVERLAY) {
|
if (SETTINGS.sleepScreen != CrossPointSettings::SLEEP_SCREEN_MODE::OVERLAY) {
|
||||||
GUI.drawPopup(renderer, tr(STR_ENTERING_SLEEP));
|
GUI.drawPopup(renderer, tr(STR_ENTERING_SLEEP));
|
||||||
}
|
}
|
||||||
// X3 panels need extra settle passes to fully clear ghosting from the previous reader page
|
// X3 panels: flash white before rendering the sleep image so any ghosting from the reader
|
||||||
// before showing the static sleep image. No-op on other panels. Placed after the popup so
|
// page is fully cleared. The full sync triggered by requestResync drives the panel to a
|
||||||
// its own displayBuffer doesn't consume the request.
|
// clean white state; the sleep screen is then drawn on top without residual ghost content.
|
||||||
display.requestResync(2);
|
// Skipped for OVERLAY (frame buffer must stay intact) and BLANK (already renders white).
|
||||||
|
const bool needsX3PreFlash =
|
||||||
|
gpio.deviceIsX3() &&
|
||||||
|
SETTINGS.sleepScreen != CrossPointSettings::SLEEP_SCREEN_MODE::OVERLAY &&
|
||||||
|
SETTINGS.sleepScreen != CrossPointSettings::SLEEP_SCREEN_MODE::BLANK;
|
||||||
|
if (needsX3PreFlash) {
|
||||||
|
renderer.clearScreen();
|
||||||
|
display.requestResync(1);
|
||||||
|
renderer.displayBuffer(HalDisplay::HALF_REFRESH);
|
||||||
|
}
|
||||||
|
|
||||||
switch (SETTINGS.sleepScreen) {
|
switch (SETTINGS.sleepScreen) {
|
||||||
case (CrossPointSettings::SLEEP_SCREEN_MODE::BLANK):
|
case (CrossPointSettings::SLEEP_SCREEN_MODE::BLANK):
|
||||||
|
|||||||
Reference in New Issue
Block a user