summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_map_image_internal.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-01-07 20:21:16 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-01-07 20:21:16 +0900
commit267b8a5ead1eab0a8262af421eeed5ad3db6ee2a (patch)
treeed7ff3c3c7b94c5086ae014b80badbc9f604e0b2 /src/lib/evas/common/evas_map_image_internal.c
parent61d76136de03d4adb1e7fcfe7fe6e8b28aef2fc9 (diff)
Evas map: Fix AA with opaque images
Well... actually this is not exactly a fix. It just restores the previous behaviour, and allows AA to work. As in, it won't draw ugly black lines but properly blend to transparent. But there is still a problem: The image map render function changes the alpha flag on the source image if AA is enabled or if the map has an alpha color. This is actually wrong as images forcefully set to not have any alpha (with evas_object_image_alpha_set(0)) will then not be opaque anymore. Right now I can't think of a solution (also I don't quite follow the entire pipeline in evas map...). Changing the flag will make some opaque areas transparent. Not changing the flag will produce ugly artifacts where AA blending should happen. Fix one bug and the other appears, and vice versa. This can be tested with the example evas-map-aa and adding an alpha channel to cube1.png (with gimp for instance) but manually setting alpha to 0 in the code. Weird stuff will happen (try playing with the map and pressing I to switch to/from image mode).
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_map_image_internal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_map_image_internal.c b/src/lib/evas/common/evas_map_image_internal.c
index e7ca8e5c32..bc2457481a 100644
--- a/src/lib/evas/common/evas_map_image_internal.c
+++ b/src/lib/evas/common/evas_map_image_internal.c
@@ -116,6 +116,7 @@ FUNC_NAME(RGBA_Image *src, RGBA_Image *dst,
116 if (mul_col != 0xffffffff) 116 if (mul_col != 0xffffffff)
117 func2 = evas_common_gfx_func_composite_pixel_color_span_get(sa, ssa, mul_col, da, cw, render_op); 117 func2 = evas_common_gfx_func_composite_pixel_color_span_get(sa, ssa, mul_col, da, cw, render_op);
118 } 118 }
119 if (sa || anti_alias) src->cache_entry.flags.alpha = EINA_TRUE;
119 } 120 }
120 if (havecol == 0) 121 if (havecol == 0)
121 { 122 {
@@ -197,6 +198,7 @@ FUNC_NAME_DO(RGBA_Image *src, RGBA_Image *dst,
197 if (mul_col != 0xffffffff) 198 if (mul_col != 0xffffffff)
198 func2 = evas_common_gfx_func_composite_pixel_color_span_get(sa, ssa, dc->mul.col, da, cw, dc->render_op); 199 func2 = evas_common_gfx_func_composite_pixel_color_span_get(sa, ssa, dc->mul.col, da, cw, dc->render_op);
199 } 200 }
201 if (sa || anti_alias) src->cache_entry.flags.alpha = EINA_TRUE;
200 } 202 }
201 203
202 if (havecol == 0) 204 if (havecol == 0)