summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-23 09:31:42 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-23 09:31:42 -0400
commitbca846d846e1e225ac506a0a50b27c967710a62d (patch)
tree2716045909509d0d9af96c9933c7fe2957b3ef91
parente851aa6e5279bc27545eb60a227a0d41acb637c4 (diff)
evas/render: fix proxy clipping when source_clip is disabled
Summary: when source_clip is disabled, the clipper used should be the one used by the proxy object. previously this would never be the case, meaning that disabling source_clip had no effect @fix Depends on D8879 Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8880
-rw-r--r--src/lib/evas/canvas/evas_render.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 64fedeb948..09c698bf16 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1649,11 +1649,12 @@ _proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *p
1649 if (!proxy_render_data) return EINA_TRUE; 1649 if (!proxy_render_data) return EINA_TRUE;
1650 if (proxy_render_data->source_clip) 1650 if (proxy_render_data->source_clip)
1651 { 1651 {
1652 Evas_Object_Protected_Data *src_obj = proxy_render_data->src_obj;
1652 /* trust cache.clip since we clip like the source */ 1653 /* trust cache.clip since we clip like the source */
1653 ENFN->context_clip_clip(ENC, ctx, 1654 ENFN->context_clip_clip(ENC, ctx,
1654 obj->cur->cache.clip.x + off_x, 1655 src_obj->cur->cache.clip.x + off_x,
1655 obj->cur->cache.clip.y + off_y, 1656 src_obj->cur->cache.clip.y + off_y,
1656 obj->cur->cache.clip.w, obj->cur->cache.clip.h); 1657 src_obj->cur->cache.clip.w, src_obj->cur->cache.clip.h);
1657 ENFN->context_clip_get(ENC, ctx, NULL, NULL, &cw, &ch); 1658 ENFN->context_clip_get(ENC, ctx, NULL, NULL, &cw, &ch);
1658 return ((cw > 0) && (ch > 0)); 1659 return ((cw > 0) && (ch > 0));
1659 } 1660 }
@@ -2128,9 +2129,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2128 if (obj->cur->clipper && (mapped > 1) && 2129 if (obj->cur->clipper && (mapped > 1) &&
2129 _evas_render_object_is_mask(obj->cur->clipper)) 2130 _evas_render_object_is_mask(obj->cur->clipper))
2130 _evas_render_mapped_mask(evas, obj, obj->cur->clipper, proxy_render_data, output, ctx, off_x, off_y, level, do_async); 2131 _evas_render_mapped_mask(evas, obj, obj->cur->clipper, proxy_render_data, output, ctx, off_x, off_y, level, do_async);
2131 else if (!proxy_src_clip) 2132 else if (!proxy_src_clip && proxy_render_data)
2132 { 2133 {
2133 if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y)) 2134 if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y))
2134 goto on_empty_clip; 2135 goto on_empty_clip;
2135 } 2136 }
2136 2137
@@ -2181,9 +2182,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2181 proxy_render_data, 2182 proxy_render_data,
2182 off_x, off_y); 2183 off_x, off_y);
2183 } 2184 }
2184 else 2185 else if (proxy_render_data)
2185 { 2186 {
2186 if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y)) 2187 if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y))
2187 goto on_empty_clip; 2188 goto on_empty_clip;
2188 } 2189 }
2189 } 2190 }
@@ -2239,9 +2240,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2239 2240
2240 ENFN->context_clip_clip(ENC, ctx, ecx, ecy, ecw, ech); 2241 ENFN->context_clip_clip(ENC, ctx, ecx, ecy, ecw, ech);
2241 } 2242 }
2242 else 2243 else if (proxy_render_data)
2243 { 2244 {
2244 if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y)) 2245 if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y))
2245 goto on_empty_clip; 2246 goto on_empty_clip;
2246 } 2247 }
2247 } 2248 }