summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/canvas/evas_clip.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/evas/src/lib/canvas/evas_clip.c')
-rw-r--r--legacy/evas/src/lib/canvas/evas_clip.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_clip.c b/legacy/evas/src/lib/canvas/evas_clip.c
index 5a1f12f..7c93e05 100644
--- a/legacy/evas/src/lib/canvas/evas_clip.c
+++ b/legacy/evas/src/lib/canvas/evas_clip.c
@@ -6,14 +6,9 @@ evas_object_clip_recalc(Evas_Object *obj)
6{ 6{
7 int cx, cy, cw, ch, cvis, cr, cg, cb, ca; 7 int cx, cy, cw, ch, cvis, cr, cg, cb, ca;
8 int nx, ny, nw, nh, nvis, nr, ng, nb, na; 8 int nx, ny, nw, nh, nvis, nr, ng, nb, na;
9 // FIXME: This shouldn't be necessary as frozen checks should happen at a
10 // higher level.
11 // if (obj->layer->evas->events_frozen > 0) return;
12 9
13 /* Skip coord recalc on smart object and invalid output */ 10 if (obj->layer->evas->events_frozen > 0) return;
14 if ((!obj->smart.smart) && 11 evas_object_coords_recalc(obj);
15 (obj->cur.cache.geometry.validity != obj->layer->evas->output_validity))
16 evas_object_coords_recalc(obj);
17 cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y; 12 cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y;
18 cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h; 13 cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h;
19 if (obj->cur.color.a == 0) cvis = 0; 14 if (obj->cur.color.a == 0) cvis = 0;
@@ -22,8 +17,8 @@ evas_object_clip_recalc(Evas_Object *obj)
22 cb = obj->cur.color.b; ca = obj->cur.color.a; 17 cb = obj->cur.color.b; ca = obj->cur.color.a;
23 if (obj->cur.clipper) 18 if (obj->cur.clipper)
24 { 19 {
25 /* Don't recalculate clean clipper */ 20// this causes problems... hmmm
26 if (obj->cur.clipper->cur.cache.clip.dirty) 21// if (obj->cur.clipper->cur.cache.clip.dirty)
27 evas_object_clip_recalc(obj->cur.clipper); 22 evas_object_clip_recalc(obj->cur.clipper);
28 nx = obj->cur.clipper->cur.cache.clip.x; 23 nx = obj->cur.clipper->cur.cache.clip.x;
29 ny = obj->cur.clipper->cur.cache.clip.y; 24 ny = obj->cur.clipper->cur.cache.clip.y;
@@ -52,12 +47,6 @@ evas_object_clip_recalc(Evas_Object *obj)
52 obj->cur.cache.clip.b = cb; 47 obj->cur.cache.clip.b = cb;
53 obj->cur.cache.clip.a = ca; 48 obj->cur.cache.clip.a = ca;
54 obj->cur.cache.clip.dirty = 0; 49 obj->cur.cache.clip.dirty = 0;
55 if (cvis)
56 {
57 Evas_List *l;
58 for (l = obj->clip.clipees; l; l = l->next)
59 evas_object_clip_dirty(l->data);
60 }
61} 50}
62 51
63void 52void
@@ -66,6 +55,8 @@ evas_object_clip_dirty(Evas_Object *obj)
66 Evas_List *l; 55 Evas_List *l;
67 56
68 obj->cur.cache.clip.dirty = 1; 57 obj->cur.cache.clip.dirty = 1;
58 for (l = obj->clip.clipees; l; l = l->next)
59 evas_object_clip_dirty(l->data);
69} 60}
70 61
71void 62void
@@ -73,10 +64,10 @@ evas_object_recalc_clippees(Evas_Object *obj)
73{ 64{
74 Evas_List *l; 65 Evas_List *l;
75 66
76 evas_object_clip_recalc(obj); 67 if (obj->cur.cache.clip.dirty)
77 for (l = obj->clip.clipees; l; l = l->next)
78 { 68 {
79 if (obj->cur.cache.clip.dirty) 69 evas_object_clip_recalc(obj);
70 for (l = obj->clip.clipees; l; l = l->next)
80 evas_object_recalc_clippees(l->data); 71 evas_object_recalc_clippees(l->data);
81 } 72 }
82} 73}
@@ -202,8 +193,7 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
202 clip->clip.clipees = evas_list_append(clip->clip.clipees, obj); 193 clip->clip.clipees = evas_list_append(clip->clip.clipees, obj);
203 evas_object_change(obj); 194 evas_object_change(obj);
204 evas_object_clip_dirty(obj); 195 evas_object_clip_dirty(obj);
205 if ((!obj->layer->evas->events_frozen) && (obj->cur.cache.clip.dirty)) 196 evas_object_recalc_clippees(obj);
206 evas_object_recalc_clippees(obj);
207 if (!obj->smart.smart) 197 if (!obj->smart.smart)
208 { 198 {
209 if (evas_object_is_in_output_rect(obj, 199 if (evas_object_is_in_output_rect(obj,
@@ -291,8 +281,7 @@ evas_object_clip_unset(Evas_Object *obj)
291 obj->cur.clipper = NULL; 281 obj->cur.clipper = NULL;
292 evas_object_change(obj); 282 evas_object_change(obj);
293 evas_object_clip_dirty(obj); 283 evas_object_clip_dirty(obj);
294 if (!obj->layer->evas->events_frozen && obj->cur.cache.clip.dirty) 284 evas_object_recalc_clippees(obj);
295 evas_object_recalc_clippees(obj);
296 if (!obj->smart.smart) 285 if (!obj->smart.smart)
297 { 286 {
298 if (evas_object_is_in_output_rect(obj, 287 if (evas_object_is_in_output_rect(obj,