1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix when LV_ANTIALIAS=0

This commit is contained in:
Gabor Kiss-Vamosi 2020-02-26 20:15:29 +01:00
parent 41907f9f3c
commit 1239e415ad
3 changed files with 16 additions and 11 deletions

View File

@ -109,7 +109,12 @@ void lv_blend_fill(const lv_area_t * clip_area, const lv_area_t * fill_area,
draw_area.y2 -= disp_area->y1;
/*Round the values in the mask if anti-aliasing is disabled*/
if(mask && disp->driver.antialiasing == 0) {
#if LV_ANTIALAIS
if(mask && disp->driver.antialiasing == 0)
#else
if(mask)
#endif
{
int32_t mask_w = lv_area_get_width(&draw_area);
int32_t i;
for(i = 0; i < mask_w; i++) mask[i] = mask[i] > 128 ? LV_OPA_COVER : LV_OPA_TRANSP;
@ -155,7 +160,12 @@ void lv_blend_map(const lv_area_t * clip_area, const lv_area_t * map_area, const
draw_area.y2 -= disp_area->y1;
/*Round the values in the mask if anti-aliasing is disabled*/
if(mask && disp->driver.antialiasing == 0) {
#if LV_ANTIALAIS
if(mask && disp->driver.antialiasing == 0)
#else
if(mask)
#endif
{
int32_t mask_w = lv_area_get_width(&draw_area);
int32_t i;
for(i = 0; i < mask_w; i++) mask[i] = mask[i] > 128 ? LV_OPA_COVER : LV_OPA_TRANSP;
@ -401,7 +411,6 @@ static void fill_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, co
default:
LV_LOG_WARN("fill_blended: unsupported blend mode");
return;
break;
}
int32_t x;
@ -679,7 +688,6 @@ static void map_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, con
default:
LV_LOG_WARN("fill_blended: unsupported blend mode");
return;
break;
}
int32_t x;

View File

@ -1120,10 +1120,7 @@ static lv_draw_mask_res_t lv_draw_mask_fade(lv_opa_t * mask_buf, lv_coord_t abs_
mask_buf[i] = mask_mix(mask_buf[i], opa_act);
}
return LV_DRAW_MASK_RES_CHANGED;
}
return LV_DRAW_MASK_RES_FULL_COVER;
}
static lv_draw_mask_res_t lv_draw_mask_map(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y, lv_coord_t len,

View File

@ -58,7 +58,7 @@ minimal_monochrome = {
"LV_COLOR_DEPTH":1,
"LV_USE_GROUP":0,
"LV_USE_ANIMATION":0,
"LV_ANTIALAIS":0,
"LV_ANTIALIAS":0,
"LV_GPU":0,
"LV_USE_FILESYSTEM":0,
"LV_USE_USER_DATA":0,
@ -125,7 +125,7 @@ all_obj_minimal_features = {
"LV_COLOR_DEPTH":8,
"LV_USE_GROUP":0,
"LV_USE_ANIMATION":0,
"LV_ANTIALAIS":0,
"LV_ANTIALIAS":0,
"LV_GPU":0,
"LV_USE_FILESYSTEM":0,
"LV_USE_USER_DATA":0,
@ -193,7 +193,7 @@ all_obj_all_features = {
"LV_COLOR_DEPTH":16,
"LV_USE_GROUP":1,
"LV_USE_ANIMATION":1,
"LV_ANTIALAIS":1,
"LV_ANTIALIAS":1,
"LV_GPU":1,
"LV_USE_FILESYSTEM":1,
"LV_USE_USER_DATA":1,
@ -260,7 +260,7 @@ advanced_features = {
"LV_COLOR_SCREEN_TRANSP":1,
"LV_USE_GROUP":1,
"LV_USE_ANIMATION":1,
"LV_ANTIALAIS":1,
"LV_ANTIALIAS":1,
"LV_GPU":1,
"LV_USE_FILESYSTEM":1,
"LV_USE_USER_DATA":1,