From c8027aa70f58261fe22cc0e7bd53062d41e4285e Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 18 Jan 2020 05:09:53 -0800 Subject: [PATCH] draw_blend: fix disp declaration for LV_COLOR_SCREEN_TRANSP (#1359) --- src/lv_draw/lv_draw_blend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lv_draw/lv_draw_blend.c b/src/lv_draw/lv_draw_blend.c index b46ce272c..825c9f014 100644 --- a/src/lv_draw/lv_draw_blend.c +++ b/src/lv_draw/lv_draw_blend.c @@ -518,6 +518,9 @@ static void map_normal(const lv_area_t * disp_area, lv_color_t * disp_buf, cons #if LV_COLOR_SCREEN_TRANSP lv_opa_t opa_composed; #endif +#if LV_COLOR_SCREEN_TRANSP || LV_USE_GPU + lv_disp_t * disp = lv_refr_get_disp_refreshing(); +#endif lv_coord_t x; lv_coord_t y; @@ -527,7 +530,6 @@ static void map_normal(const lv_area_t * disp_area, lv_color_t * disp_buf, cons /*Go to the first px of the row*/ map_buf_tmp += (draw_area->x1 - (map_area->x1 - disp_area->x1)); #if LV_USE_GPU - lv_disp_t * disp = lv_refr_get_disp_refreshing(); if(disp->driver.gpu_blend_cb && ((draw_area_w > GPU_WIDTH_LIMIT * 4 && opa == LV_OPA_COVER) || (draw_area_w > GPU_WIDTH_LIMIT && opa != LV_OPA_COVER))) {