summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-05-29 15:36:46 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-29 15:37:36 -0400
commitef23de1ea4bfd7040b350af30af3fa2d5895bcb7 (patch)
treeb21d31cc284d6fa6a1a05f1b2b12c413e0961c40
parent194d769175f2eafa6cbd3658247ef8841c6c6e63 (diff)
evas_inline: Clean up evas_object_was_visible function
Summary: This file is full of functions called as: foo(eo_obj, obj); Most of them can be reduced to foo(obj); and internally get the eo_obj with obj->object This would make it impossible to screw up calling them passing an unrelated pair, and make calling code a little more readable. ref T7230 Reviewers: raster, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7230 Differential Revision: https://phab.enlightenment.org/D9045
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c2
-rw-r--r--src/lib/evas/canvas/evas_object_image.c2
-rw-r--r--src/lib/evas/canvas/evas_object_line.c2
-rw-r--r--src/lib/evas/canvas/evas_object_polygon.c2
-rw-r--r--src/lib/evas/canvas/evas_object_rectangle.c2
-rw-r--r--src/lib/evas/canvas/evas_object_text.c2
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c8
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c2
-rw-r--r--src/lib/evas/canvas/evas_render.c16
-rw-r--r--src/lib/evas/include/evas_inline.x6
10 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index de21469c5c..c350200593 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -643,7 +643,7 @@ _efl_canvas_vg_object_render_pre(Evas_Object *eo_obj,
643 /* now figure what changed and add draw rects */ 643 /* now figure what changed and add draw rects */
644 /* if it just became visible or invisible */ 644 /* if it just became visible or invisible */
645 is_v = evas_object_is_visible(eo_obj, obj); 645 is_v = evas_object_is_visible(eo_obj, obj);
646 was_v = evas_object_was_visible(eo_obj,obj); 646 was_v = evas_object_was_visible(obj);
647 if (!(is_v | was_v)) goto done; 647 if (!(is_v | was_v)) goto done;
648 648
649 if (pd->changed) 649 if (pd->changed)
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 0279954bc2..16ed8b5b0d 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -2294,7 +2294,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
2294 /* now figure what changed and add draw rects */ 2294 /* now figure what changed and add draw rects */
2295 /* if it just became visible or invisible */ 2295 /* if it just became visible or invisible */
2296 is_v = evas_object_is_visible(eo_obj, obj); 2296 is_v = evas_object_is_visible(eo_obj, obj);
2297 was_v = evas_object_was_visible(eo_obj, obj); 2297 was_v = evas_object_was_visible(obj);
2298 if (is_v != was_v) 2298 if (is_v != was_v)
2299 { 2299 {
2300 evas_object_render_pre_visible_change(&e->clip_changes, eo_obj, is_v, was_v); 2300 evas_object_render_pre_visible_change(&e->clip_changes, eo_obj, is_v, was_v);
diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c
index 62e9bc400b..9a83f10c42 100644
--- a/src/lib/evas/canvas/evas_object_line.c
+++ b/src/lib/evas/canvas/evas_object_line.c
@@ -275,7 +275,7 @@ evas_object_line_render_pre(Evas_Object *eo_obj,
275 /* now figure what changed and add draw rects */ 275 /* now figure what changed and add draw rects */
276 /* if it just became visible or invisible */ 276 /* if it just became visible or invisible */
277 is_v = evas_object_is_visible(eo_obj, obj); 277 is_v = evas_object_is_visible(eo_obj, obj);
278 was_v = evas_object_was_visible(eo_obj, obj); 278 was_v = evas_object_was_visible(obj);
279 if (is_v != was_v) 279 if (is_v != was_v)
280 { 280 {
281 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v); 281 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c
index 985420b14b..1aeadd9eae 100644
--- a/src/lib/evas/canvas/evas_object_polygon.c
+++ b/src/lib/evas/canvas/evas_object_polygon.c
@@ -330,7 +330,7 @@ evas_object_polygon_render_pre(Evas_Object *eo_obj,
330 /* now figure what changed and add draw rects */ 330 /* now figure what changed and add draw rects */
331 /* if it just became visible or invisible */ 331 /* if it just became visible or invisible */
332 is_v = evas_object_is_visible(eo_obj, obj); 332 is_v = evas_object_is_visible(eo_obj, obj);
333 was_v = evas_object_was_visible(eo_obj, obj); 333 was_v = evas_object_was_visible(obj);
334 if (is_v != was_v) 334 if (is_v != was_v)
335 { 335 {
336 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v); 336 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c
index af66c0fb6d..d5a6600c04 100644
--- a/src/lib/evas/canvas/evas_object_rectangle.c
+++ b/src/lib/evas/canvas/evas_object_rectangle.c
@@ -159,7 +159,7 @@ evas_object_rectangle_render_pre(Evas_Object *eo_obj,
159 /* now figure what changed and add draw rects */ 159 /* now figure what changed and add draw rects */
160 /* if it just became visible or invisible */ 160 /* if it just became visible or invisible */
161 is_v = evas_object_is_visible(eo_obj, obj); 161 is_v = evas_object_is_visible(eo_obj, obj);
162 was_v = evas_object_was_visible(eo_obj,obj); 162 was_v = evas_object_was_visible(obj);
163 if (!(is_v | was_v)) goto done; 163 if (!(is_v | was_v)) goto done;
164 if (is_v != was_v) 164 if (is_v != was_v)
165 { 165 {
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index cac8602100..0c20f3ee38 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2078,7 +2078,7 @@ evas_object_text_render_pre(Evas_Object *eo_obj,
2078 /* now figure what changed and add draw rects 2078 /* now figure what changed and add draw rects
2079 if it just became visible or invisible */ 2079 if it just became visible or invisible */
2080 is_v = evas_object_is_visible(eo_obj, obj); 2080 is_v = evas_object_is_visible(eo_obj, obj);
2081 was_v = evas_object_was_visible(eo_obj, obj); 2081 was_v = evas_object_was_visible(obj);
2082 if (is_v != was_v) 2082 if (is_v != was_v)
2083 { 2083 {
2084 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, 2084 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes,
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index c0948b1756..d4921f9683 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -15042,7 +15042,7 @@ evas_object_textblock_render_pre(Evas_Object *eo_obj,
15042 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, 15042 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
15043 eo_obj, obj); 15043 eo_obj, obj);
15044 is_v = evas_object_is_visible(eo_obj, obj); 15044 is_v = evas_object_is_visible(eo_obj, obj);
15045 was_v = evas_object_was_visible(eo_obj, obj); 15045 was_v = evas_object_was_visible(obj);
15046 goto done; 15046 goto done;
15047 } 15047 }
15048 if (o->changed) 15048 if (o->changed)
@@ -15052,7 +15052,7 @@ evas_object_textblock_render_pre(Evas_Object *eo_obj,
15052 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, 15052 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
15053 eo_obj, obj); 15053 eo_obj, obj);
15054 is_v = evas_object_is_visible(eo_obj, obj); 15054 is_v = evas_object_is_visible(eo_obj, obj);
15055 was_v = evas_object_was_visible(eo_obj, obj); 15055 was_v = evas_object_was_visible(obj);
15056 goto done; 15056 goto done;
15057 } 15057 }
15058 15058
@@ -15062,13 +15062,13 @@ evas_object_textblock_render_pre(Evas_Object *eo_obj,
15062 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, 15062 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
15063 eo_obj, obj); 15063 eo_obj, obj);
15064 is_v = evas_object_is_visible(eo_obj, obj); 15064 is_v = evas_object_is_visible(eo_obj, obj);
15065 was_v = evas_object_was_visible(eo_obj, obj); 15065 was_v = evas_object_was_visible(obj);
15066 goto done; 15066 goto done;
15067 } 15067 }
15068 /* now figure what changed and add draw rects */ 15068 /* now figure what changed and add draw rects */
15069 /* if it just became visible or invisible */ 15069 /* if it just became visible or invisible */
15070 is_v = evas_object_is_visible(eo_obj, obj); 15070 is_v = evas_object_is_visible(eo_obj, obj);
15071 was_v = evas_object_was_visible(eo_obj, obj); 15071 was_v = evas_object_was_visible(obj);
15072 if (is_v != was_v) 15072 if (is_v != was_v)
15073 { 15073 {
15074 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, 15074 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes,
diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c
index 68dce30d69..854e829506 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -682,7 +682,7 @@ evas_object_textgrid_render_pre(Evas_Object *eo_obj,
682 /* now figure what changed and add draw rects */ 682 /* now figure what changed and add draw rects */
683 /* if it just became visible or invisible */ 683 /* if it just became visible or invisible */
684 is_v = evas_object_is_visible(eo_obj, obj); 684 is_v = evas_object_is_visible(eo_obj, obj);
685 was_v = evas_object_was_visible(eo_obj, obj); 685 was_v = evas_object_was_visible(obj);
686 if (is_v != was_v) 686 if (is_v != was_v)
687 { 687 {
688 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v); 688 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 09c698bf16..f355bac9c2 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -289,7 +289,7 @@ static Eina_Bool
289_evas_render_is_relevant(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) 289_evas_render_is_relevant(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
290{ 290{
291 return ((evas_object_is_visible(eo_obj, obj) && (!obj->cur->have_clipees)) || 291 return ((evas_object_is_visible(eo_obj, obj) && (!obj->cur->have_clipees)) ||
292 (evas_object_was_visible(eo_obj, obj) && (!obj->prev->have_clipees))); 292 (evas_object_was_visible(obj) && (!obj->prev->have_clipees)));
293} 293}
294 294
295static Eina_Bool 295static Eina_Bool
@@ -791,7 +791,7 @@ _evas_render_phase1_object_mapped(Phase1_Context *p1ctx,
791 (!obj->clip.clipees) && 791 (!obj->clip.clipees) &&
792 ((evas_object_is_visible(eo_obj, obj) && 792 ((evas_object_is_visible(eo_obj, obj) &&
793 (!obj->cur->have_clipees)) || 793 (!obj->cur->have_clipees)) ||
794 (evas_object_was_visible(eo_obj, obj) && 794 (evas_object_was_visible(obj) &&
795 (!obj->prev->have_clipees))))) 795 (!obj->prev->have_clipees)))))
796 return; 796 return;
797 OBJ_ARRAY_PUSH(p1ctx->render_objects, obj); 797 OBJ_ARRAY_PUSH(p1ctx->render_objects, obj);
@@ -943,7 +943,7 @@ _evas_render_phase1_object_changed_normal(Phase1_Context *p1ctx,
943 /* It goes to be hidden. Prev caching should be replaced 943 /* It goes to be hidden. Prev caching should be replaced
944 by the current (hidden) state. */ 944 by the current (hidden) state. */
945 if (evas_object_is_visible(eo_obj, obj) != 945 if (evas_object_is_visible(eo_obj, obj) !=
946 evas_object_was_visible(eo_obj, obj)) 946 evas_object_was_visible(obj))
947 evas_object_cur_prev(obj); 947 evas_object_cur_prev(obj);
948 RD(level, " skip - not smart, not active or clippees or not relevant\n"); 948 RD(level, " skip - not smart, not active or clippees or not relevant\n");
949 } 949 }
@@ -1182,11 +1182,11 @@ _evas_render_phase1_object_process(Phase1_Context *p1ctx,
1182 RD(level, " not changed... [%i] -> (%i %i %p %i) [%i]\n", 1182 RD(level, " not changed... [%i] -> (%i %i %p %i) [%i]\n",
1183 evas_object_is_visible(eo_obj, obj), 1183 evas_object_is_visible(eo_obj, obj),
1184 obj->cur->visible, obj->cur->cache.clip.visible, obj->smart.smart, 1184 obj->cur->visible, obj->cur->cache.clip.visible, obj->smart.smart,
1185 obj->cur->cache.clip.a, evas_object_was_visible(eo_obj, obj)); 1185 obj->cur->cache.clip.a, evas_object_was_visible(obj));
1186 if ((!obj->clip.clipees) && 1186 if ((!obj->clip.clipees) &&
1187 (EINA_LIKELY(obj->delete_me == 0)) && 1187 (EINA_LIKELY(obj->delete_me == 0)) &&
1188 (_evas_render_can_render(eo_obj, obj) || 1188 (_evas_render_can_render(eo_obj, obj) ||
1189 (evas_object_was_visible(eo_obj, obj) && 1189 (evas_object_was_visible(obj) &&
1190 (!obj->prev->have_clipees)))) 1190 (!obj->prev->have_clipees))))
1191 { 1191 {
1192 if (obj->is_smart) 1192 if (obj->is_smart)
@@ -1295,7 +1295,7 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *eo_e EINA_
1295 else 1295 else
1296 if ((is_active) && (obj->restack) && (!obj->clip.clipees) && 1296 if ((is_active) && (obj->restack) && (!obj->clip.clipees) &&
1297 (_evas_render_can_render(eo_obj, obj) || 1297 (_evas_render_can_render(eo_obj, obj) ||
1298 (evas_object_was_visible(eo_obj, obj) && (!obj->prev->have_clipees)))) 1298 (evas_object_was_visible(obj) && (!obj->prev->have_clipees))))
1299 { 1299 {
1300 if (!obj->render_pre && !obj->rect_del && !obj->delete_me) 1300 if (!obj->render_pre && !obj->rect_del && !obj->delete_me)
1301 ok = EINA_TRUE; 1301 ok = EINA_TRUE;
@@ -1303,7 +1303,7 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *eo_e EINA_
1303 else 1303 else
1304 if (is_active && (!obj->clip.clipees) && 1304 if (is_active && (!obj->clip.clipees) &&
1305 (_evas_render_can_render(eo_obj, obj) || 1305 (_evas_render_can_render(eo_obj, obj) ||
1306 (evas_object_was_visible(eo_obj, obj) && (!obj->prev->have_clipees)))) 1306 (evas_object_was_visible(obj) && (!obj->prev->have_clipees))))
1307 { 1307 {
1308 if (obj->render_pre || obj->rect_del) ok = EINA_TRUE; 1308 if (obj->render_pre || obj->rect_del) ok = EINA_TRUE;
1309 } 1309 }
@@ -1311,7 +1311,7 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *eo_e EINA_
1311 else 1311 else
1312 { 1312 {
1313 if ((!obj->clip.clipees) && (obj->delete_me == 0) && 1313 if ((!obj->clip.clipees) && (obj->delete_me == 0) &&
1314 (!obj->cur->have_clipees || (evas_object_was_visible(eo_obj, obj) && (!obj->prev->have_clipees))) 1314 (!obj->cur->have_clipees || (evas_object_was_visible(obj) && (!obj->prev->have_clipees)))
1315 && evas_object_is_opaque(eo_obj, obj) && evas_object_is_visible(eo_obj, obj)) 1315 && evas_object_is_opaque(eo_obj, obj) && evas_object_is_visible(eo_obj, obj))
1316 { 1316 {
1317 if (obj->rect_del || obj->is_smart) ok = EINA_TRUE; 1317 if (obj->rect_del || obj->is_smart) ok = EINA_TRUE;
diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x
index 8c8f814fce..7c337b3f2e 100644
--- a/src/lib/evas/include/evas_inline.x
+++ b/src/lib/evas/include/evas_inline.x
@@ -51,7 +51,7 @@ _evas_object_callback_has_by_type(Evas_Object_Protected_Data *obj, Evas_Callback
51} 51}
52 52
53static inline int 53static inline int
54evas_object_was_visible(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) 54evas_object_was_visible(Evas_Object_Protected_Data *obj)
55{ 55{
56 if (EINA_UNLIKELY(!obj->prev)) return 0; 56 if (EINA_UNLIKELY(!obj->prev)) return 0;
57 if ((obj->prev->visible) && (!obj->no_render) && 57 if ((obj->prev->visible) && (!obj->no_render) &&
@@ -60,7 +60,7 @@ evas_object_was_visible(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
60 || obj->prev->render_op != EVAS_RENDER_BLEND)) 60 || obj->prev->render_op != EVAS_RENDER_BLEND))
61 { 61 {
62 if (obj->func->was_visible) 62 if (obj->func->was_visible)
63 return obj->func->was_visible(eo_obj); 63 return obj->func->was_visible(obj->object);
64 return 1; 64 return 1;
65 } 65 }
66 return 0; 66 return 0;
@@ -240,7 +240,7 @@ evas_object_is_in_output_rect(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Prote
240static inline int 240static inline int
241evas_object_is_active(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) 241evas_object_is_active(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
242{ 242{
243 if (evas_object_is_visible(eo_obj, obj) || evas_object_was_visible(eo_obj, obj)) 243 if (evas_object_is_visible(eo_obj, obj) || evas_object_was_visible(obj))
244 { 244 {
245 Evas_Public_Data *e = obj->layer->evas; 245 Evas_Public_Data *e = obj->layer->evas;
246 int fx, fy; 246 int fx, fy;