summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-11-15 11:19:28 -0800
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-11 11:12:06 +0100
commit8331ea048cfafd7afc007456d7b38209e862c3b0 (patch)
tree91277547ed1672cd868caa7fe4b3613a057761e4
parent2b324779c996b38f9514c6e6f29c23b1ac6e2b28 (diff)
elementary: improve data layout for Efl.Ui.PositionManager*.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10688
-rw-r--r--src/lib/elementary/efl_ui_position_manager_grid.c31
-rw-r--r--src/lib/elementary/efl_ui_position_manager_list.c19
2 files changed, 30 insertions, 20 deletions
diff --git a/src/lib/elementary/efl_ui_position_manager_grid.c b/src/lib/elementary/efl_ui_position_manager_grid.c
index 949cd66..2cec569 100644
--- a/src/lib/elementary/efl_ui_position_manager_grid.c
+++ b/src/lib/elementary/efl_ui_position_manager_grid.c
@@ -13,32 +13,37 @@
13 Efl_Ui_Position_Manager_Grid_Data *pd = efl_data_scope_get(obj, MY_CLASS); 13 Efl_Ui_Position_Manager_Grid_Data *pd = efl_data_scope_get(obj, MY_CLASS);
14 14
15typedef struct { 15typedef struct {
16 unsigned int size; 16 Api_Callbacks callbacks;
17 unsigned int groups; 17
18 Eina_Inarray *group_cache;
19 int *size_cache;
20 Eo *last_group;
21 Eina_Future *rebuild_absolut_size;
22 Efl_Ui_Win *window;
23 Evas *canvas;
24
25 Vis_Segment prev_run;
26
18 Eina_Rect viewport; 27 Eina_Rect viewport;
19 Eina_Vector2 scroll_position; 28 Eina_Vector2 scroll_position;
20 Efl_Ui_Layout_Orientation dir;
21 Vis_Segment prev_run;
22 unsigned int prev_consumed_space;
23 Eina_Size2D max_min_size; 29 Eina_Size2D max_min_size;
24 Eina_Size2D last_viewport_size; 30 Eina_Size2D last_viewport_size;
25 Eina_Size2D prev_min_size; 31 Eina_Size2D prev_min_size;
26 32
27 Eina_Inarray *group_cache; 33 Efl_Ui_Layout_Orientation dir;
34
35 unsigned int size;
36 unsigned int groups;
37 unsigned int prev_consumed_space;
38
28 Eina_Bool group_cache_dirty; 39 Eina_Bool group_cache_dirty;
29 int *size_cache;
30 Eina_Bool size_cache_dirty; 40 Eina_Bool size_cache_dirty;
31 Eo *last_group;
32 Eina_Future *rebuild_absolut_size;
33 Efl_Ui_Win *window;
34 Evas *canvas;
35 Api_Callbacks callbacks;
36} Efl_Ui_Position_Manager_Grid_Data; 41} Efl_Ui_Position_Manager_Grid_Data;
37 42
38typedef struct { 43typedef struct {
39 Eina_Bool real_group;
40 Eina_Size2D group_header_size; 44 Eina_Size2D group_header_size;
41 int items; 45 int items;
46 Eina_Bool real_group;
42} Group_Cache_Line; 47} Group_Cache_Line;
43 48
44static inline void 49static inline void
diff --git a/src/lib/elementary/efl_ui_position_manager_list.c b/src/lib/elementary/efl_ui_position_manager_list.c
index bd9dd95..3980e12 100644
--- a/src/lib/elementary/efl_ui_position_manager_list.c
+++ b/src/lib/elementary/efl_ui_position_manager_list.c
@@ -14,20 +14,25 @@
14 Efl_Ui_Position_Manager_List_Data *pd = efl_data_scope_get(obj, MY_CLASS); 14 Efl_Ui_Position_Manager_List_Data *pd = efl_data_scope_get(obj, MY_CLASS);
15 15
16typedef struct { 16typedef struct {
17 unsigned int size; 17 Api_Callbacks callbacks;
18
18 Eina_Future *rebuild_absolut_size; 19 Eina_Future *rebuild_absolut_size;
20 int *size_cache;
21 Efl_Gfx_Entity *last_group;
22 Efl_Ui_Win *window;
23 Evas *canvas;
24
25 Vis_Segment prev_run;
26
19 Eina_Rect viewport; 27 Eina_Rect viewport;
20 Eina_Size2D abs_size; 28 Eina_Size2D abs_size;
21 Eina_Vector2 scroll_position; 29 Eina_Vector2 scroll_position;
30
22 Efl_Ui_Layout_Orientation dir; 31 Efl_Ui_Layout_Orientation dir;
23 int *size_cache; 32
33 unsigned int size;
24 int average_item_size; 34 int average_item_size;
25 int maximum_min_size; 35 int maximum_min_size;
26 Vis_Segment prev_run;
27 Efl_Gfx_Entity *last_group;
28 Efl_Ui_Win *window;
29 Evas *canvas;
30 Api_Callbacks callbacks;
31} Efl_Ui_Position_Manager_List_Data; 36} Efl_Ui_Position_Manager_List_Data;
32 37
33/* 38/*