summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-05-13 16:53:45 +0900
committerHermet Park <chuneon.park@samsung.com>2020-05-13 16:53:45 +0900
commit4dbb78ee9b948abc40d50ea512b60112610f989e (patch)
tree9562c27a8ea073989a8d9a16aa93da4e2a905c3c
parentfeccff1ca7cd2dc941b9bf92b5999858f5d72a41 (diff)
Revert "canvas render: don't apply mask if the objects in the map."
This reverts commit eaafb9e4c53863cfd0ae4aaf24f04d333458ff2b. Found some regression bugs. revert it.
-rw-r--r--src/lib/evas/canvas/evas_render.c73
1 files changed, 26 insertions, 47 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 3e71e40af1..1d47ba06af 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -438,18 +438,6 @@ _evas_render_object_is_mask(Evas_Object_Protected_Data *obj)
438 return EINA_FALSE; 438 return EINA_FALSE;
439} 439}
440 440
441static inline Evas_Object_Protected_Data *
442_evas_mask_owner_get(Evas_Object_Protected_Data *obj)
443{
444 Evas_Object_Protected_Data *parent = NULL;
445
446 if (!obj->smart.parent) return obj;
447 parent = efl_data_scope_get(obj->smart.parent, EFL_CANVAS_OBJECT_CLASS);
448 if (parent->clip.mask != obj->clip.mask) return obj;
449
450 return _evas_mask_owner_get(parent);
451}
452
453static void 441static void
454_evas_render_phase1_direct(Evas_Public_Data *e, 442_evas_render_phase1_direct(Evas_Public_Data *e,
455 Eina_Inarray *active_objects, 443 Eina_Inarray *active_objects,
@@ -2157,13 +2145,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2157 if (obj->is_smart) 2145 if (obj->is_smart)
2158 { 2146 {
2159 /* Clipper masks */ 2147 /* Clipper masks */
2160 if (obj->cur->clipper && (mapped > 1) && _evas_render_object_is_mask(obj->cur->clipper)) 2148 if (obj->cur->clipper && (mapped > 1) &&
2161 { 2149 _evas_render_object_is_mask(obj->cur->clipper))
2162 //Apply only owner mask in the map 2150 _evas_render_mapped_mask(evas, obj, obj->cur->clipper, proxy_render_data, output, ctx, off_x, off_y, level, do_async);
2163 Evas_Object_Protected_Data *owner = _evas_mask_owner_get(obj);
2164 if (owner == obj || (_evas_render_has_map(owner) && !_evas_render_can_map(owner)))
2165 _evas_render_mapped_mask(evas, obj, obj->cur->clipper, proxy_render_data, output, ctx, off_x, off_y, level, do_async);
2166 }
2167 else if (!proxy_src_clip && proxy_render_data) 2151 else if (!proxy_src_clip && proxy_render_data)
2168 { 2152 {
2169 if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y)) 2153 if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y))
@@ -2210,40 +2194,35 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2210 2194
2211 if (obj->cur->clipper && (mapped > 1)) 2195 if (obj->cur->clipper && (mapped > 1))
2212 { 2196 {
2213 //Apply only owner mask in the map 2197 Evas_Object_Protected_Data *mask = obj->clip.mask;
2214 Evas_Object_Protected_Data *owner = _evas_mask_owner_get(obj);
2215 if (owner == obj || (_evas_render_has_map(owner) && !_evas_render_can_map(owner)))
2216 {
2217 Evas_Object_Protected_Data *mask = obj->clip.mask;
2218 2198
2219 if (obj->mask->surface != surface) 2199 if (obj->mask->surface != surface)
2200 {
2201 if (proxy_src_clip)
2220 { 2202 {
2221 if (proxy_src_clip) 2203 if ((_evas_render_has_map(obj) && !_evas_render_can_map(obj)) ||
2222 { 2204 _evas_render_object_is_mask(obj->cur->clipper))
2223 if ((_evas_render_has_map(obj) && !_evas_render_can_map(obj)) || 2205 evas_object_clip_recalc(obj);
2224 _evas_render_object_is_mask(obj->cur->clipper)) 2206 _evas_render_mapped_context_clip_set(evas, eo_obj, obj, ctx,
2225 evas_object_clip_recalc(obj); 2207 proxy_render_data,
2226 _evas_render_mapped_context_clip_set(evas, eo_obj, obj, ctx, 2208 off_x, off_y);
2227 proxy_render_data,
2228 off_x, off_y);
2229 }
2230 else if (proxy_render_data)
2231 {
2232 if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y))
2233 goto on_empty_clip;
2234 }
2235 } 2209 }
2236 else 2210 else if (proxy_render_data)
2237 { 2211 {
2238 // rendering a mask in its own surface: 2212 if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y))
2239 // we want to render it fully and clip only at 2213 goto on_empty_clip;
2240 // clippee (maskee) render time
2241 RD(level, " draw mask\n");
2242 } 2214 }
2243
2244 /* Clipper masks */
2245 _evas_render_mapped_mask(evas, obj, mask, proxy_render_data, output, ctx, off_x, off_y, level, do_async);
2246 } 2215 }
2216 else
2217 {
2218 // rendering a mask in its own surface:
2219 // we want to render it fully and clip only at
2220 // clippee (maskee) render time
2221 RD(level, " draw mask\n");
2222 }
2223
2224 /* Clipper masks */
2225 _evas_render_mapped_mask(evas, obj, mask, proxy_render_data, output, ctx, off_x, off_y, level, do_async);
2247 } 2226 }
2248 2227
2249#ifdef REND_DBG 2228#ifdef REND_DBG