summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-10-06 17:36:29 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-07 10:48:18 +0900
commit2b47181f4edaade0d774893d67e9707c6a8141ee (patch)
treeed98447d56156b57203d179e22eb05edf86570d5 /src/lib/evas/canvas
parent12f9fea2a4d4d641a09fd6563a83b925d62e4868 (diff)
Evas render: Fix another bad proxy clipping issue
This is an ugly hack to fix an issue reported in D3114. I don't understand how the proposed patch could even fix anything given the current situation. Test case: - Create edje object with textblock inside - Clip out edje object (--> all children become not visible) - Take textblock from edje and set it as source of a proxy - Mark proxy as source_clip Result: Nothing visible. Expected: Proxy should contain the textblock object, since source_clip means we ignore the edje object's clipper, and only care about the textblock's clipper (entire canvas). Here's what was happening: - During a first pass, textblock is not visible, cur->cache.clip is calculated, marked as clip_use=1 with geom 0,0 0x0 - In a second pass, the proxy is rendered, which needs to draw the textblock in a surface. But cache.clip was used and it was wrong. Solution: - Ignore cache.clip when rendering inside a proxy. I'm pretty sure there are other instances where cache.clip will still be a problem. Problem: textblock never called relayout since it was not visible. Conclusion: cache.clip needs to die. It's a legacy optimization that now causes more issues than it fixes.
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_render.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 3fe93a0cf6..a47e550fde 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1234,7 +1234,7 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data *evas, Evas_Object *eo_obj
1234 1234
1235 if (proxy_render_data) proxy_src_clip = proxy_render_data->source_clip; 1235 if (proxy_render_data) proxy_src_clip = proxy_render_data->source_clip;
1236 1236
1237 if (proxy_src_clip) 1237 if (proxy_src_clip && !evas->is_frozen)
1238 { 1238 {
1239 x = obj->cur->cache.clip.x; 1239 x = obj->cur->cache.clip.x;
1240 y = obj->cur->cache.clip.y; 1240 y = obj->cur->cache.clip.y;
@@ -1249,6 +1249,10 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data *evas, Evas_Object *eo_obj
1249 1249
1250 ENFN->context_clip_set(ENDT, ctx, x + off_x, y + off_y, w, h); 1250 ENFN->context_clip_set(ENDT, ctx, x + off_x, y + off_y, w, h);
1251 } 1251 }
1252 else if (evas->is_frozen)
1253 {
1254 /* can't trust cache.clip here - clip should be in ctx already */
1255 }
1252 else 1256 else
1253 { 1257 {
1254 //FIXME: Consider to clip by the proxy clipper. 1258 //FIXME: Consider to clip by the proxy clipper.
@@ -1336,14 +1340,31 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
1336 } 1340 }
1337 else if (proxy_src_clip) 1341 else if (proxy_src_clip)
1338 { 1342 {
1339 if ((!evas_object_is_visible(eo_obj, obj)) || (obj->clip.clipees) 1343 if (!evas->is_frozen) /* same as "if (proxy_render_data)" */
1340 || (obj->cur->have_clipees) || (obj->no_render))
1341 { 1344 {
1342 IFRD(obj->no_render, level, " proxy_src_clip + no_render\n"); 1345 if ((!evas_object_is_visible(eo_obj, obj)) || (obj->clip.clipees)
1343 IFRD(obj->clip.clipees || obj->cur->have_clipees, level, " proxy_src_clip + has clippees\n"); 1346 || (obj->cur->have_clipees) || (obj->no_render))
1344 IFRD(!evas_object_is_visible(eo_obj, obj), level, " not visible\n"); 1347 {
1345 RD(level, "}\n"); 1348 IFRD(obj->no_render, level, " no_render\n");
1346 return clean_them; 1349 IFRD(obj->clip.clipees || obj->cur->have_clipees, level, " has clippees\n");
1350 IFRD(!evas_object_is_visible(eo_obj, obj), level, " not visible\n");
1351 RD(level, "}\n");
1352 return clean_them;
1353 }
1354 }
1355 else
1356 {
1357 /* can not trust cache.clip - evas is frozen */
1358 if (!obj->cur->visible || obj->clip.clipees || obj->no_render ||
1359 (!obj->cur->color.a && (obj->cur->render_op == EVAS_RENDER_BLEND)))
1360 {
1361 IFRD(obj->no_render, level, " proxy_src_clip + no_render\n");
1362 IFRD(obj->clip.clipees || obj->cur->have_clipees, level, " proxy_src_clip + has clippees\n");
1363 IFRD(!obj->cur->visible, level, " proxy_src_clip + not visible\n");
1364 IFRD(!obj->cur->color.a && (obj->cur->render_op == EVAS_RENDER_BLEND), level, " proxy_src_clip + 0 alpha\n");
1365 RD(level, "}\n");
1366 return clean_them;
1367 }
1347 } 1368 }
1348 } 1369 }
1349 else if (!evas_object_is_proxy_visible(eo_obj, obj) || 1370 else if (!evas_object_is_proxy_visible(eo_obj, obj) ||