Attempt to add partial update when flush area is not full screen
This commit is contained in:
parent
f4a760d482
commit
7d339be14a
2 changed files with 10 additions and 3 deletions
|
@ -44,7 +44,7 @@ extern "C" {
|
|||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
|
||||
// Here is the issue that it does not draw full epaper. Insufficient buffer:
|
||||
#elif defined (CONFIG_LV_EPAPER_EPDIY_DISPLAY_CONTROLLER)
|
||||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 70)
|
||||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 90)
|
||||
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357
|
||||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
|
||||
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107
|
||||
|
|
|
@ -32,9 +32,16 @@ void epdiy_init(void)
|
|||
void epdiy_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map)
|
||||
{
|
||||
++flushcalls;
|
||||
printf("epdiy_flush %d\n", flushcalls);
|
||||
printf("epdiy_flush %d x:%d y:%d w:%d h:%d\n", flushcalls,area->x1,area->y1,lv_area_get_width(area),lv_area_get_height(area));
|
||||
|
||||
// Full update
|
||||
if (lv_area_get_width(area)==display.width() && lv_area_get_height(area)==display.height()) {
|
||||
display.update();
|
||||
} else {
|
||||
// Partial update: Looks nice but should find a way to clear that area first. Mode: MODE_EPDIY_WHITE_TO_GL16
|
||||
display.updateWindow(area->x1,area->y1,lv_area_get_width(area),lv_area_get_height(area),MODE_GC16);
|
||||
}
|
||||
|
||||
display.update();
|
||||
/* IMPORTANT!!!
|
||||
* Inform the graphics library that you are ready with the flushing */
|
||||
lv_disp_flush_ready(drv);
|
||||
|
|
Loading…
Reference in a new issue