summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-10-13 20:33:57 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-14 11:14:36 +0900
commit7b266b55188ebac499d70ffceb3b8c802bcdfbd0 (patch)
tree272a0d4663c2986978820879cc5f1f5d4847c411
parent51e0bc022b33e2a6fac187ac72365c353ed3a520 (diff)
Evas render: Fix proxy source_clip logic inversion
As spotted by @FurryMyad I inverted the logic for source_clip. This should restore the proper behaviour while keeping my previous fixes working. See D2940.
-rw-r--r--src/lib/evas/canvas/evas_render.c20
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c8
2 files changed, 21 insertions, 7 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index fdd0645872..f81300b04d 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1208,21 +1208,35 @@ _proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *p
1208{ 1208{
1209 const Evas_Coord_Rectangle *clip; 1209 const Evas_Coord_Rectangle *clip;
1210 Evas_Object_Protected_Data *clipper; 1210 Evas_Object_Protected_Data *clipper;
1211 int cw, ch;
1211 1212
1212 /* cache.clip can not be relied on, since the evas is frozen, but we need 1213 /* cache.clip can not be relied on, since the evas is frozen, but we need
1213 * to set the clip. so we recurse from clipper to clipper until we reach 1214 * to set the clip. so we recurse from clipper to clipper until we reach
1214 * the source object's clipper */ 1215 * the source object's clipper */
1215 1216
1216 if (!proxy_render_data || proxy_render_data->source_clip) return EINA_TRUE; 1217 if (!proxy_render_data) return EINA_TRUE;
1218 if (proxy_render_data->source_clip)
1219 {
1220 /* trust cache.clip since we clip like the source */
1221 ENFN->context_clip_clip(ENDT, ctx,
1222 obj->cur->cache.clip.x + off_x,
1223 obj->cur->cache.clip.y + off_y,
1224 obj->cur->cache.clip.w, obj->cur->cache.clip.h);
1225 ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch);
1226 return (cw && ch);
1227 }
1228
1217 if (!obj || !obj->cur->clipper) return EINA_TRUE; 1229 if (!obj || !obj->cur->clipper) return EINA_TRUE;
1218 1230
1219 clipper = obj->cur->clipper; 1231 clipper = obj->cur->clipper;
1220 if (!clipper->cur->visible) return EINA_FALSE; 1232 if (!clipper->cur->visible) return EINA_FALSE;
1221 clip = &clipper->cur->geometry; 1233 clip = &clipper->cur->geometry;
1222 ENFN->context_clip_clip(ENDT, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h); 1234 ENFN->context_clip_clip(ENDT, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h);
1235 ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch);
1236 if (!cw || !ch) return EINA_FALSE;
1223 1237
1224 /* stop if we found the source object's clipper */ 1238 /* stop if we found the source object's clipper */
1225 if (clipper == proxy_render_data->proxy_obj->cur->clipper) return EINA_TRUE; 1239 if (clipper == proxy_render_data->src_obj->cur->clipper) return EINA_TRUE;
1226 1240
1227 /* recurse to the clipper itself */ 1241 /* recurse to the clipper itself */
1228 return _proxy_context_clip(evas, ctx, proxy_render_data, clipper, off_x, off_y); 1242 return _proxy_context_clip(evas, ctx, proxy_render_data, clipper, off_x, off_y);
@@ -1236,7 +1250,7 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data *evas, Evas_Object *eo_obj
1236 1250
1237 if (proxy_render_data) proxy_src_clip = proxy_render_data->source_clip; 1251 if (proxy_render_data) proxy_src_clip = proxy_render_data->source_clip;
1238 1252
1239 if (proxy_src_clip && !evas->is_frozen) 1253 if (proxy_src_clip)
1240 { 1254 {
1241 x = obj->cur->cache.clip.x; 1255 x = obj->cur->cache.clip.x;
1242 y = obj->cur->cache.clip.y; 1256 y = obj->cur->cache.clip.y;
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 5c860aec83..3bde9014b7 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -579,10 +579,10 @@ eng_context_clip_unset(void *data EINA_UNUSED, void *context)
579static int 579static int
580eng_context_clip_get(void *data EINA_UNUSED, void *context, int *x, int *y, int *w, int *h) 580eng_context_clip_get(void *data EINA_UNUSED, void *context, int *x, int *y, int *w, int *h)
581{ 581{
582 *x = ((RGBA_Draw_Context *)context)->clip.x; 582 if (x) *x = ((RGBA_Draw_Context *)context)->clip.x;
583 *y = ((RGBA_Draw_Context *)context)->clip.y; 583 if (y) *y = ((RGBA_Draw_Context *)context)->clip.y;
584 *w = ((RGBA_Draw_Context *)context)->clip.w; 584 if (w) *w = ((RGBA_Draw_Context *)context)->clip.w;
585 *h = ((RGBA_Draw_Context *)context)->clip.h; 585 if (h) *h = ((RGBA_Draw_Context *)context)->clip.h;
586 return ((RGBA_Draw_Context *)context)->clip.use; 586 return ((RGBA_Draw_Context *)context)->clip.use;
587} 587}
588 588