1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(disp): minor fixes for flushing (#5360)

This commit is contained in:
Gabor Kiss-Vamosi 2024-01-18 10:38:01 +01:00 committed by GitHub
parent 1881ef22d2
commit b9f6dfd84b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -475,8 +475,8 @@ static void refr_sync_areas(void)
/*The buffers are already swapped.
*So the active buffer is the off screen buffer where LVGL will render*/
lv_draw_buf_t * on_screen = disp_refr->buf_act;
lv_draw_buf_t * off_screen = disp_refr->buf_act == disp_refr->buf_1 ? disp_refr->buf_2 : disp_refr->buf_1;
lv_draw_buf_t * off_screen = disp_refr->buf_act;
lv_draw_buf_t * on_screen = disp_refr->buf_act == disp_refr->buf_1 ? disp_refr->buf_2 : disp_refr->buf_1;
uint32_t hor_res = lv_display_get_horizontal_resolution(disp_refr);
uint32_t ver_res = lv_display_get_vertical_resolution(disp_refr);
@ -1061,6 +1061,7 @@ static void wait_for_flushing(lv_display_t * disp)
else {
while(disp->flushing);
}
disp->flushing_last = 0;
LV_LOG_TRACE("end");
LV_PROFILER_END;

View File

@ -487,7 +487,6 @@ bool lv_display_get_antialiasing(lv_display_t * disp)
LV_ATTRIBUTE_FLUSH_READY void lv_display_flush_ready(lv_display_t * disp)
{
disp->flushing = 0;
disp->flushing_last = 0;
}
LV_ATTRIBUTE_FLUSH_READY bool lv_display_flush_is_last(lv_display_t * disp)

View File

@ -181,7 +181,7 @@ lv_draw_buf_t * lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf,
uint32_t size = _calculate_draw_buf_size(w, h, cf, stride);
void * buf = draw_buf_malloc(size, cf);
LV_ASSERT_MALLOC(buf);
/*Do not assert here as LVGL or the app might just want to try creating a draw_buf*/
if(buf == NULL) {
LV_LOG_WARN("No memory: %"LV_PRIu32"x%"LV_PRIu32", cf: %d, stride: %"LV_PRIu32", %"LV_PRIu32"Byte, ",
w, h, cf, stride, size);