From 21a7acd7a26362df082a7d5152aef38035bff81c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 26 Mar 2020 15:50:24 +0100 Subject: [PATCH] lv_img_buf_transorm: remove unnecessary calculations --- src/lv_draw/lv_img_buf.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lv_draw/lv_img_buf.c b/src/lv_draw/lv_img_buf.c index aaddaba7f..5a02f5f46 100644 --- a/src/lv_draw/lv_img_buf.c +++ b/src/lv_draw/lv_img_buf.c @@ -538,7 +538,6 @@ bool lv_img_buf_transform(lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord_t dsc->tmp.px_size = px_size; bool ret; - ret = transform_anti_alias(dsc); return ret; @@ -716,18 +715,15 @@ static inline bool transform_anti_alias(lv_img_transform_dsc_t * dsc) lv_color_t c0; if(xr0 == LV_OPA_TRANSP) c0 = c01; else if(xr0 == LV_OPA_COVER) c0 = c00; - else if(c00.full == c01.full) c0 = c00; else c0 = lv_color_mix(c00, c01, xr0); lv_color_t c1; if(xr1 == LV_OPA_TRANSP) c1 = c11; else if(xr1 == LV_OPA_COVER) c1 = c10; - else if(c10.full == c11.full) c1 = c00; else c1 = lv_color_mix(c10, c11, xr1); if(yr == LV_OPA_TRANSP) dsc->res.color = c1; else if(yr == LV_OPA_COVER) dsc->res.color = c0; - else if(c0.full == c1.full) dsc->res.color = c0; else dsc->res.color = lv_color_mix(c0, c1, yr); return true;