summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-30 13:15:30 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-31 09:19:26 -0400
commit1b4ce987a7dc36ba8b6f5be54a2f41c30e29a2d5 (patch)
tree0287760afd73d395cf370f4f1ccb9e7022118536
parentd1bc3ea258d64a698e9868698e0382ad2b182ca7 (diff)
evas: enable setting any object as a clipper
Summary: now that various other bugs related to clipping/masking/drawing have been fixed, this "just works" @feature Reviewers: Hermet, cedric Reviewed By: Hermet, cedric Subscribers: Hermet, cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D8852
-rw-r--r--src/lib/evas/canvas/evas_clip.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c
index d455e80979..04206e5d91 100644
--- a/src/lib/evas/canvas/evas_clip.c
+++ b/src/lib/evas/canvas/evas_clip.c
@@ -232,7 +232,6 @@ _efl_canvas_object_clipper_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj
232 if (obj->delete_me) goto err_obj_deleted; 232 if (obj->delete_me) goto err_obj_deleted;
233 if (!obj->layer || !clip->layer) goto err_no_layer; 233 if (!obj->layer || !clip->layer) goto err_no_layer;
234 if (obj->layer->evas != clip->layer->evas) goto err_diff_evas; 234 if (obj->layer->evas != clip->layer->evas) goto err_diff_evas;
235 if ((clip->type != o_rect_type) && (clip->type != o_image_type)) goto err_type;
236 235
237 return EINA_FALSE; 236 return EINA_FALSE;
238 237
@@ -252,10 +251,6 @@ err_diff_evas:
252 CRI("Setting object %p from Evas (%p) to another Evas (%p)", 251 CRI("Setting object %p from Evas (%p) to another Evas (%p)",
253 obj, obj->layer->evas, clip->layer->evas); 252 obj, obj->layer->evas, clip->layer->evas);
254 return EINA_TRUE; 253 return EINA_TRUE;
255err_type:
256 CRI("A clipper can only be an evas rectangle or image (got %s)",
257 efl_class_name_get(eo_clip));
258 return EINA_TRUE;
259} 254}
260 255
261static inline void 256static inline void
@@ -344,8 +339,8 @@ _efl_canvas_object_clipper_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas
344 /* unset cur clipper */ 339 /* unset cur clipper */
345 _efl_canvas_object_clipper_unset_common(obj, EINA_TRUE); 340 _efl_canvas_object_clipper_unset_common(obj, EINA_TRUE);
346 341
347 /* image object clipper */ 342 /* non-rect object clipper */
348 if (clip->type == o_image_type) 343 if (clip->type != o_rect_type)
349 { 344 {
350 EINA_COW_WRITE_BEGIN(evas_object_mask_cow, clip->mask, Evas_Object_Mask_Data, mask) 345 EINA_COW_WRITE_BEGIN(evas_object_mask_cow, clip->mask, Evas_Object_Mask_Data, mask)
351 mask->is_mask = EINA_TRUE; 346 mask->is_mask = EINA_TRUE;