Skip to content

Commit d95f9be

Browse files
committed
Enable dithering only when framebuffer is fully rendered
1 parent abebdcd commit d95f9be

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/boards/Inkplate10/Inkplate10Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void IRAM_ATTR display_flush_callback(lv_display_t *disp, const lv_area_t *area,
111111

112112
bool is3bit = (self->getDisplayMode() == INKPLATE_3BIT);
113113

114-
if (self->ditherEnabled)
114+
if (self->ditherEnabled && self->_renderMode == LV_DISP_RENDER_MODE_FULL)
115115
{
116116
self->dither.ditherFramebuffer(px_map, E_INK_WIDTH, E_INK_HEIGHT, is3bit);
117117
}

src/boards/Inkplate2/Inkplate2Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void IRAM_ATTR display_flush_callback(lv_display_t *disp, const lv_area_t *area,
6262
int32_t w = lv_area_get_width(area);
6363
int32_t h = lv_area_get_height(area);
6464

65-
if (self->ditherEnabled)
65+
if (self->ditherEnabled && self->_renderMode == LV_DISP_RENDER_MODE_FULL)
6666
{
6767
self->dither.ditherFramebuffer(px_map, E_INK_HEIGHT, E_INK_WIDTH);
6868
}

src/boards/Inkplate5V2/Inkplate5V2Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void IRAM_ATTR display_flush_callback(lv_display_t *disp, const lv_area_t *area,
111111

112112
bool is3bit = (self->getDisplayMode() == INKPLATE_3BIT);
113113

114-
if (self->ditherEnabled)
114+
if(self->ditherEnabled && self->_renderMode == LV_DISP_RENDER_MODE_FULL)
115115
{
116116
self->dither.ditherFramebuffer(px_map, E_INK_WIDTH, E_INK_HEIGHT, is3bit);
117117
}

src/boards/Inkplate6/Inkplate6Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void IRAM_ATTR display_flush_callback(lv_display_t *disp, const lv_area_t *area,
111111

112112
bool is3bit = (self->getDisplayMode() == INKPLATE_3BIT);
113113

114-
if (self->ditherEnabled)
114+
if (self->ditherEnabled && self->_renderMode == LV_DISP_RENDER_MODE_FULL)
115115
{
116116
self->dither.ditherFramebuffer(px_map, E_INK_WIDTH, E_INK_HEIGHT, is3bit);
117117
}

src/boards/Inkplate6COLOR/Inkplate6COLORDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void IRAM_ATTR display_flush_callback(lv_display_t *disp, const lv_area_t *area,
8585
lv_display_flush_ready(disp);
8686
return;
8787
}
88-
if (self->ditherEnabled)
88+
if (self->ditherEnabled && self->_renderMode == LV_DISP_RENDER_MODE_FULL)
8989
{
9090
self->dither.ditherFramebuffer(px_map, E_INK_WIDTH, E_INK_HEIGHT);
9191
}

src/boards/Inkplate6FLICK/Inkplate6FLICKDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void IRAM_ATTR display_flush_callback(lv_display_t *disp, const lv_area_t *area,
109109

110110
bool is3bit = (self->getDisplayMode() == INKPLATE_3BIT);
111111

112-
if (self->ditherEnabled)
112+
if (self->ditherEnabled && self->_renderMode == LV_DISP_RENDER_MODE_FULL)
113113
{
114114
self->dither.ditherFramebuffer(px_map, E_INK_WIDTH, E_INK_HEIGHT, is3bit);
115115
}

0 commit comments

Comments
 (0)