From 94a960cf09c0f476abad349d01bc044d4bb67386 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Wed, 29 May 2019 15:37:13 -0400 Subject: [PATCH] evas_inline: Clean up evas_object_is_on_plane 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 Depends on D9049 Reviewers: raster, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7230 Differential Revision: https://phab.enlightenment.org/D9050 --- src/lib/evas/canvas/evas_object_main.c | 2 +- src/lib/evas/canvas/evas_render.c | 4 ++-- src/lib/evas/include/evas_inline.x | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 35556cb..1305ee3 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -766,7 +766,7 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *eo_obj, in if (obj->is_smart) goto end; - if (evas_object_is_on_plane(eo_obj, obj)) + if (evas_object_is_on_plane(obj)) { /* We need some damage to occur if only planes are being updated, or nothing will provoke a page flip. diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index ce7e9f6..dea6389 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -1242,7 +1242,7 @@ _evas_render_phase1_process(Phase1_Context *p1ctx) EINA_INLIST_FOREACH(lay->objects, obj) { - if (evas_object_is_on_plane(obj->object, obj)) continue; + if (evas_object_is_on_plane(obj)) continue; clean_them |= _evas_render_phase1_object_process (p1ctx, obj, EINA_FALSE, EINA_FALSE, EINA_FALSE, 2); } @@ -3194,7 +3194,7 @@ _evas_planes(Evas_Public_Data *evas) /* We also need to clean its previously drawn position * but only if we're removing it */ - if (evas_object_is_on_plane(eo_obj2, obj2)) + if (evas_object_is_on_plane(obj2)) _evas_canvas_damage_rectangle_add(NULL, evas, obj2->prev->geometry.x, obj2->prev->geometry.y, diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x index c5e7fa5..eeea55f 100644 --- a/src/lib/evas/include/evas_inline.x +++ b/src/lib/evas/include/evas_inline.x @@ -118,10 +118,10 @@ evas_object_is_opaque(Evas_Object_Protected_Data *obj) } static inline int -evas_object_is_on_plane(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) +evas_object_is_on_plane(Evas_Object_Protected_Data *obj) { if (obj->func->is_on_plane) - return obj->func->is_on_plane(eo_obj, obj, obj->private_data); + return obj->func->is_on_plane(obj->object, obj, obj->private_data); return 0; } -- 2.7.4