mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(refr): swap buffers only on the last area with direct mode (#2867)
* fix(refr): avoid swapping buffers every area in direct mode * Update src/core/lv_refr.c * Update src/core/lv_refr.c Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
parent
29a9cd7257
commit
222af5ad4a
@ -979,7 +979,8 @@ static void draw_buf_flush(void)
|
||||
call_flush_cb(disp->driver, &draw_buf->area, color_p);
|
||||
}
|
||||
}
|
||||
if(draw_buf->buf1 && draw_buf->buf2) {
|
||||
/*If there are 2 buffers swap them. With direct mode swap only on the last area*/
|
||||
if(draw_buf->buf1 && draw_buf->buf2 && (!disp->driver->direct_mode || draw_buf->flushing_last)) {
|
||||
if(draw_buf->buf_act == draw_buf->buf1)
|
||||
draw_buf->buf_act = draw_buf->buf2;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user