diff options
author | Cedric Bail <cedric.bail@samsung.com> | 2013-07-09 09:46:15 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@samsung.com> | 2013-07-09 09:48:09 +0900 |
commit | 48b40640b5b6bdab59568ae4ef663216589c951e (patch) | |
tree | 0c12283578ef5afbe3d9501bac1af5bffd3388fd /src/lib/evas/include | |
parent | 87b49cf103ae2cefe2afd584b766342072b128a6 (diff) |
evas: no need to call eo_data_scope_get in many case after this change.
Reduce CPU usage by 5% in some case (especially when the CPU is not the
limiting factor like with the GL backend).
Diffstat (limited to 'src/lib/evas/include')
-rw-r--r-- | src/lib/evas/include/evas_inline.x | 4 | ||||
-rw-r--r-- | src/lib/evas/include/evas_private.h | 29 |
2 files changed, 19 insertions, 14 deletions
diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x index 1ce86b847e..31de720c2b 100644 --- a/src/lib/evas/include/evas_inline.x +++ b/src/lib/evas/include/evas_inline.x | |||
@@ -69,7 +69,7 @@ evas_object_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) | |||
69 | if (obj->cur->cache.clip.a == 255) | 69 | if (obj->cur->cache.clip.a == 255) |
70 | { | 70 | { |
71 | if (obj->func->is_opaque) | 71 | if (obj->func->is_opaque) |
72 | return obj->func->is_opaque(eo_obj, obj); | 72 | return obj->func->is_opaque(eo_obj, obj, obj->private_data); |
73 | return 1; | 73 | return 1; |
74 | } | 74 | } |
75 | if (obj->cur->render_op == EVAS_RENDER_COPY) | 75 | if (obj->cur->render_op == EVAS_RENDER_COPY) |
@@ -214,7 +214,7 @@ evas_object_coords_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) | |||
214 | //// obj->cur->cache.geometry.h = | 214 | //// obj->cur->cache.geometry.h = |
215 | //// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur->geometry.h) - | 215 | //// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur->geometry.h) - |
216 | //// evas_coord_world_y_to_screen(obj->layer->evas, 0); | 216 | //// evas_coord_world_y_to_screen(obj->layer->evas, 0); |
217 | if (obj->func->coords_recalc) obj->func->coords_recalc(eo_obj, obj); | 217 | if (obj->func->coords_recalc) obj->func->coords_recalc(eo_obj, obj, obj->private_data); |
218 | //// obj->cur->cache.geometry.validity = obj->layer->evas->output_validity; | 218 | //// obj->cur->cache.geometry.validity = obj->layer->evas->output_validity; |
219 | } | 219 | } |
220 | 220 | ||
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 76c557a837..8af4b27ce0 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h | |||
@@ -577,6 +577,7 @@ struct _Evas_Object_Protected_Data | |||
577 | } clip; | 577 | } clip; |
578 | 578 | ||
579 | const Evas_Object_Func *func; | 579 | const Evas_Object_Func *func; |
580 | void *private_data; | ||
580 | 581 | ||
581 | struct { | 582 | struct { |
582 | Evas_Smart *smart; | 583 | Evas_Smart *smart; |
@@ -716,10 +717,11 @@ struct _Evas_Device | |||
716 | 717 | ||
717 | struct _Evas_Object_Func | 718 | struct _Evas_Object_Func |
718 | { | 719 | { |
719 | void (*free) (Evas_Object *obj, Evas_Object_Protected_Data *pd); | 720 | void (*free) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); |
720 | void (*render) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async); | 721 | void (*render) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data, |
721 | void (*render_pre) (Evas_Object *obj, Evas_Object_Protected_Data *pd); | 722 | void *output, void *context, void *surface, int x, int y, Eina_Bool do_async); |
722 | void (*render_post) (Evas_Object *obj, Evas_Object_Protected_Data *pd); | 723 | void (*render_pre) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); |
724 | void (*render_post) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); | ||
723 | 725 | ||
724 | unsigned int (*type_id_get) (Evas_Object *obj); | 726 | unsigned int (*type_id_get) (Evas_Object *obj); |
725 | unsigned int (*visual_id_get) (Evas_Object *obj); | 727 | unsigned int (*visual_id_get) (Evas_Object *obj); |
@@ -731,18 +733,21 @@ struct _Evas_Object_Func | |||
731 | int (*is_visible) (Evas_Object *obj); | 733 | int (*is_visible) (Evas_Object *obj); |
732 | int (*was_visible) (Evas_Object *obj); | 734 | int (*was_visible) (Evas_Object *obj); |
733 | 735 | ||
734 | int (*is_opaque) (Evas_Object *obj, Evas_Object_Protected_Data *pd); | 736 | int (*is_opaque) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); |
735 | int (*was_opaque) (Evas_Object *obj, Evas_Object_Protected_Data *pd); | 737 | int (*was_opaque) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); |
736 | 738 | ||
737 | int (*is_inside) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord x, Evas_Coord y); | 739 | int (*is_inside) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data, |
738 | int (*was_inside) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord x, Evas_Coord y); | 740 | Evas_Coord x, Evas_Coord y); |
741 | int (*was_inside) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data, | ||
742 | Evas_Coord x, Evas_Coord y); | ||
739 | 743 | ||
740 | void (*coords_recalc) (Evas_Object *obj, Evas_Object_Protected_Data *pd); | 744 | void (*coords_recalc) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); |
741 | 745 | ||
742 | void (*scale_update) (Evas_Object *obj); | 746 | void (*scale_update) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); |
743 | 747 | ||
744 | int (*has_opaque_rect) (Evas_Object *obj, Evas_Object_Protected_Data *pd); | 748 | int (*has_opaque_rect) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); |
745 | int (*get_opaque_rect) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); | 749 | int (*get_opaque_rect) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data, |
750 | Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); | ||
746 | 751 | ||
747 | int (*can_map) (Evas_Object *obj); | 752 | int (*can_map) (Evas_Object *obj); |
748 | }; | 753 | }; |