fix(gdeq031t10): skip the panel refresh when the frame is unchanged (#624)
This commit is contained in:
@@ -387,9 +387,6 @@ static error_t gdeq031t10_draw_bitmap(Device* device, int32_t x_start, int32_t y
|
|||||||
|
|
||||||
xSemaphoreTake(internal->panel_mutex, portMAX_DELAY);
|
xSemaphoreTake(internal->panel_mutex, portMAX_DELAY);
|
||||||
|
|
||||||
// Work-around until partial updates are working
|
|
||||||
internal->force_full_refresh = true;
|
|
||||||
|
|
||||||
if (!internal->display_on) {
|
if (!internal->display_on) {
|
||||||
// Display is off (deep sleep). Drop the frame without touching the shadow: the
|
// Display is off (deep sleep). Drop the frame without touching the shadow: the
|
||||||
// mismatch it leaves behind makes the frame redraw after the next power-on.
|
// mismatch it leaves behind makes the frame redraw after the next power-on.
|
||||||
@@ -419,6 +416,11 @@ static error_t gdeq031t10_draw_bitmap(Device* device, int32_t x_start, int32_t y
|
|||||||
return ERROR_NONE; // panel already shows this frame; don't refresh needlessly
|
return ERROR_NONE; // panel already shows this frame; don't refresh needlessly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Work-around until partial updates are working. It has to stay below the unchanged-frame
|
||||||
|
// check: a repaint that renders identical pixels must cost nothing, or a periodically
|
||||||
|
// repainting app pins the panel in a ~1.2s full-refresh loop.
|
||||||
|
internal->force_full_refresh = true;
|
||||||
|
|
||||||
if (internal->force_full_refresh) {
|
if (internal->force_full_refresh) {
|
||||||
LOG_I(TAG, "draw_bitmap: refresh_full");
|
LOG_I(TAG, "draw_bitmap: refresh_full");
|
||||||
refresh_full(internal, config->mirror_180, config->refresh_mode, render_bitmap);
|
refresh_full(internal, config->mirror_180, config->refresh_mode, render_bitmap);
|
||||||
|
|||||||
Reference in New Issue
Block a user