diff options
author | subhransu mohanty <sub.mohanty@samsung.com> | 2017-10-27 09:11:02 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-10-27 14:58:38 +0900 |
commit | 64231ae699858b34d65f6e27d665a1411ff1bcf0 (patch) | |
tree | d62003b960d325d8d91e9688003055ee96f28159 /src/lib/evas/canvas/evas_vg_private.h | |
parent | bf79ec359d7f7c6bbb5d6cd5dbb22d233551ae58 (diff) |
evas/vg: Added vg tree caching support
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_private.h')
-rw-r--r-- | src/lib/evas/canvas/evas_vg_private.h | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h index d3e151aba1..dda171bdad 100644 --- a/src/lib/evas/canvas/evas_vg_private.h +++ b/src/lib/evas/canvas/evas_vg_private.h | |||
@@ -3,18 +3,41 @@ | |||
3 | 3 | ||
4 | #include <Ector.h> | 4 | #include <Ector.h> |
5 | 5 | ||
6 | typedef struct _Efl_VG_Data Efl_VG_Data; | 6 | typedef struct _Efl_VG_Data Efl_VG_Data; |
7 | typedef struct _Efl_VG_Container_Data Efl_VG_Container_Data; | 7 | typedef struct _Efl_VG_Container_Data Efl_VG_Container_Data; |
8 | typedef struct _Efl_VG_Gradient_Data Efl_VG_Gradient_Data; | 8 | typedef struct _Efl_VG_Gradient_Data Efl_VG_Gradient_Data; |
9 | typedef struct _Efl_VG_Interpolation Efl_VG_Interpolation; | 9 | typedef struct _Efl_VG_Interpolation Efl_VG_Interpolation; |
10 | 10 | ||
11 | typedef struct _Efl_Canvas_Vg_Data Efl_Canvas_Vg_Data; | 11 | |
12 | typedef struct _Efl_Canvas_Vg_Data Efl_Canvas_Vg_Data; | ||
13 | |||
14 | typedef struct _Evas_Cache_Vg_Entry Evas_Cache_Vg_Entry; | ||
15 | typedef struct _Evas_Cache_Vg Evas_Cache_Vg; | ||
16 | |||
17 | struct _Evas_Cache_Vg | ||
18 | { | ||
19 | Eina_Hash *vg_hash; | ||
20 | Eina_Hash *active; | ||
21 | int ref; | ||
22 | }; | ||
23 | |||
24 | struct _Evas_Cache_Vg_Entry | ||
25 | { | ||
26 | char *hash_key; | ||
27 | Eina_Stringshare *file; | ||
28 | Eina_Stringshare *key; | ||
29 | int w; | ||
30 | int h; | ||
31 | Efl_VG *root; | ||
32 | int ref; | ||
33 | }; | ||
12 | 34 | ||
13 | struct _Efl_Canvas_Vg_Data | 35 | struct _Efl_Canvas_Vg_Data |
14 | { | 36 | { |
15 | void *engine_data; | 37 | void *engine_data; |
16 | Efl_VG *root; | 38 | Efl_VG *root; |
17 | Efl_VG *vg_tree; | 39 | Efl_VG *vg_tree; |
40 | Evas_Cache_Vg_Entry *vg_entry; | ||
18 | Eina_Rect fill; | 41 | Eina_Rect fill; |
19 | Eina_Rect viewbox; | 42 | Eina_Rect viewbox; |
20 | unsigned int width, height; | 43 | unsigned int width, height; |
@@ -70,6 +93,16 @@ struct _Efl_VG_Interpolation | |||
70 | Eina_Point_3D skew; | 93 | Eina_Point_3D skew; |
71 | }; | 94 | }; |
72 | 95 | ||
96 | |||
97 | void evas_cache_vg_init(void); | ||
98 | void evas_cache_vg_shutdown(void); | ||
99 | Evas_Cache_Vg_Entry* evas_cache_vg_entry_find(const char *file, const char *key, int w, int h); | ||
100 | Efl_VG* evas_cache_vg_tree_get(Evas_Cache_Vg_Entry *svg_entry); | ||
101 | void evas_cache_vg_entry_del(Evas_Cache_Vg_Entry *svg_entry); | ||
102 | Vg_File_Data * evas_cache_vg_file_info(const char *file, const char *key); | ||
103 | |||
104 | Eina_Bool evas_vg_save_to_file(Vg_File_Data *evg_data, const char *file, const char *key, const char *flags); | ||
105 | |||
73 | static inline Efl_VG_Data * | 106 | static inline Efl_VG_Data * |
74 | _evas_vg_render_pre(Efl_VG *child, Ector_Surface *s, Eina_Matrix3 *m) | 107 | _evas_vg_render_pre(Efl_VG *child, Ector_Surface *s, Eina_Matrix3 *m) |
75 | { | 108 | { |