diff options
author | Hermet Park <hermetpark@gmail.com> | 2019-06-21 17:32:37 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2019-06-21 17:35:48 +0900 |
commit | 625e11f584fa00c6a2adc160ed20d96f3763d130 (patch) | |
tree | 77ad5b58d58583fdea7e5f9ab76d272fb35bf410 /src/lib/evas/canvas/evas_vg_private.h | |
parent | 23af6ec640c4166aa912f8d6be1e3b78b0780913 (diff) |
evas vector: support lottie animation as using json loader.
Summary:
This patch extends efl_canvas_vg_object class to implement efl_gfx_frame_controller
to suppor any playable animation on it.
Plus, vector object takes care of lottie animation by using json loader.
it's caching mechanism is changed to cache only static frame, not all frames.
vg_cache supports json loader and make it animation request properly.
This feature has been stabilized enough, it's using in Samsung Galaxy Watch active product,
proved its stability enough.
Depends on {D8940}
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
Reviewers: #committers, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8941
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_private.h')
-rw-r--r-- | src/lib/evas/canvas/evas_vg_private.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h index 73ff63e7d8..0fad40d15c 100644 --- a/src/lib/evas/canvas/evas_vg_private.h +++ b/src/lib/evas/canvas/evas_vg_private.h | |||
@@ -23,7 +23,7 @@ typedef struct _Vg_Cache_Entry | |||
23 | Eina_Stringshare *key; | 23 | Eina_Stringshare *key; |
24 | int w; | 24 | int w; |
25 | int h; | 25 | int h; |
26 | Efl_VG *root; | 26 | Efl_VG *root[3]; //0: default, 1: start frame, 2: end frame |
27 | int ref; | 27 | int ref; |
28 | Vg_File_Data *vfd; | 28 | Vg_File_Data *vfd; |
29 | } Vg_Cache_Entry; | 29 | } Vg_Cache_Entry; |
@@ -48,6 +48,8 @@ struct _Efl_Canvas_Vg_Object_Data | |||
48 | Eina_Array cleanup; | 48 | Eina_Array cleanup; |
49 | double align_x, align_y; | 49 | double align_x, align_y; |
50 | Efl_Canvas_Vg_Fill_Mode fill_mode; | 50 | Efl_Canvas_Vg_Fill_Mode fill_mode; |
51 | int frame_idx; | ||
52 | int cached_frame_idx; | ||
51 | 53 | ||
52 | Eina_Bool changed : 1; | 54 | Eina_Bool changed : 1; |
53 | }; | 55 | }; |
@@ -123,11 +125,14 @@ void evas_cache_vg_init(void); | |||
123 | void evas_cache_vg_shutdown(void); | 125 | void evas_cache_vg_shutdown(void); |
124 | Vg_Cache_Entry* evas_cache_vg_entry_resize(Vg_Cache_Entry *entry, int w, int h); | 126 | Vg_Cache_Entry* evas_cache_vg_entry_resize(Vg_Cache_Entry *entry, int w, int h); |
125 | Vg_Cache_Entry* evas_cache_vg_entry_create(const Eina_File *file, const char *key, int w, int h); | 127 | Vg_Cache_Entry* evas_cache_vg_entry_create(const Eina_File *file, const char *key, int w, int h); |
126 | Efl_VG* evas_cache_vg_tree_get(Vg_Cache_Entry *vg_entry); | 128 | Efl_VG* evas_cache_vg_tree_get(Vg_Cache_Entry *vg_entry, unsigned int frame_num); |
127 | void evas_cache_vg_entry_del(Vg_Cache_Entry *vg_entry); | 129 | void evas_cache_vg_entry_del(Vg_Cache_Entry *vg_entry); |
128 | Vg_File_Data * evas_cache_vg_file_open(const Eina_File *file, const char *key); | 130 | Vg_File_Data * evas_cache_vg_file_open(const Eina_File *file, const char *key); |
129 | Eina_Bool evas_cache_vg_file_save(Efl_VG *root, int w, int h, const char *file, const char *key, const Efl_File_Save_Info *info); | 131 | Eina_Bool evas_cache_vg_file_save(Efl_VG *root, int w, int h, const char *file, const char *key, const Efl_File_Save_Info *info); |
130 | Eina_Bool evas_cache_vg_entry_file_save(Vg_Cache_Entry *vg_entry, const char *file, const char *key, const Efl_File_Save_Info *info); | 132 | Eina_Bool evas_cache_vg_entry_file_save(Vg_Cache_Entry *vg_entry, const char *file, const char *key, const Efl_File_Save_Info *info); |
133 | double evas_cache_vg_anim_duration_get(const Vg_Cache_Entry *vg_entry); | ||
134 | unsigned int evas_cache_vg_anim_frame_count_get(const Vg_Cache_Entry *vg_entry); | ||
135 | Eina_Size2D evas_cache_vg_entry_default_size_get(const Vg_Cache_Entry *vg_entry); | ||
131 | void efl_canvas_vg_node_vg_obj_set(Efl_VG *node, Efl_VG *vg_obj, Efl_Canvas_Vg_Object_Data *vd); | 136 | void efl_canvas_vg_node_vg_obj_set(Efl_VG *node, Efl_VG *vg_obj, Efl_Canvas_Vg_Object_Data *vd); |
132 | void efl_canvas_vg_node_change(Efl_VG *node); | 137 | void efl_canvas_vg_node_change(Efl_VG *node); |
133 | void efl_canvas_vg_container_vg_obj_update(Efl_VG *obj, Efl_Canvas_Vg_Node_Data *nd); | 138 | void efl_canvas_vg_container_vg_obj_update(Efl_VG *obj, Efl_Canvas_Vg_Node_Data *nd); |