summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-01-26 17:52:38 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-01-26 19:25:36 +0900
commita376582b4f05b230c038276b81ed2a5ed919f1e4 (patch)
tree6489a7d15f5a104a5da1c7aef886c04d4eca29b5 /src
parent77feb96dd7e375a4f4c7e5b9fb024c4b440a7495 (diff)
Evas masking: Fix masking of mapped sub-objects
Some complex examples of masking with mapped smart objects would fail miserably, rendering the object without any mask, and/or showing the mask itself somewhere in white color...
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_render.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 6d301eaecd..0a4134b421 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1497,6 +1497,31 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
1497 ctx = e->engine.func->context_new(e->engine.data.output); 1497 ctx = e->engine.func->context_new(e->engine.data.output);
1498 if (obj->is_smart) 1498 if (obj->is_smart)
1499 { 1499 {
1500 Eina_Bool unset_image_clip = EINA_FALSE;
1501
1502 /* Clipper masks */
1503 if (obj->cur->clipper &&
1504 _evas_render_object_is_mask(obj->cur->clipper))
1505 {
1506 // This path can be hit when we're multiplying masks on top of each other...
1507 Evas_Object_Protected_Data *mask = obj->cur->clipper;
1508
1509 evas_object_clip_recalc(obj);
1510
1511 if (mask->mask->redraw || !mask->mask->surface)
1512 evas_render_mask_subrender(obj->layer->evas, mask, NULL);
1513
1514 if (mask->mask->surface)
1515 {
1516 unset_image_clip = EINA_TRUE;
1517 e->engine.func->context_clip_image_set
1518 (e->engine.data.output, ctx,
1519 mask->mask->surface,
1520 mask->mask->x + off_x,
1521 mask->mask->y + off_y);
1522 }
1523 }
1524
1500 EINA_INLIST_FOREACH 1525 EINA_INLIST_FOREACH
1501 (evas_object_smart_members_get_direct(eo_obj), obj2) 1526 (evas_object_smart_members_get_direct(eo_obj), obj2)
1502 { 1527 {
@@ -1506,7 +1531,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
1506 ecx, ecy, ecw, ech, 1531 ecx, ecy, ecw, ech,
1507 proxy_render_data, 1532 proxy_render_data,
1508 level + 1, 1533 level + 1,
1509 EINA_FALSE, 1534 unset_image_clip | use_mapped_ctx,
1510 do_async); 1535 do_async);
1511 /* We aren't sure this object will be rendered by 1536 /* We aren't sure this object will be rendered by
1512 normal(not proxy) drawing after, we reset this 1537 normal(not proxy) drawing after, we reset this
@@ -1516,6 +1541,12 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
1516 if (!proxy_render_data) 1541 if (!proxy_render_data)
1517 evas_object_change_reset(obj2->object); 1542 evas_object_change_reset(obj2->object);
1518 } 1543 }
1544
1545 if (unset_image_clip)
1546 {
1547 e->engine.func->context_clip_image_unset
1548 (e->engine.data.output, ctx);
1549 }
1519 } 1550 }
1520 else 1551 else
1521 { 1552 {