hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d05c2169a89bb17f0ab985ea01f48ca26b2218c1

commit d05c2169a89bb17f0ab985ea01f48ca26b2218c1
Author: Hermet Park <hermetp...@gmail.com>
Date:   Fri Nov 29 11:18:15 2019 +0900

    vector cache: skip animation update as possible.
    
    Since the vector file data is shareable among the multiple vg instances,
    vfd could keep the requested frame data already by the other instance.
    
    This case vector cache quickly return the vector data withouth any further 
progress.
---
 src/lib/evas/vg/evas_vg_cache.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/vg/evas_vg_cache.c b/src/lib/evas/vg/evas_vg_cache.c
index ed65f50099..5c0242db23 100644
--- a/src/lib/evas/vg/evas_vg_cache.c
+++ b/src/lib/evas/vg/evas_vg_cache.c
@@ -432,8 +432,17 @@ evas_cache_vg_tree_get(Vg_Cache_Entry *vg_entry, unsigned 
int frame_num)
    if (!vfd) return NULL;
 
    //No need to update.
-   if (!vfd->anim_data && vg_entry->root)
-     return vg_entry->root;
+   if (vfd->anim_data)
+     {
+        if (vg_entry->root &&
+            vfd->anim_data->frame_num == frame_num)
+          return vg_entry->root;
+     }
+   else
+     {
+        if (vg_entry->root)
+          return vg_entry->root;
+     }
 
    if (!vfd->static_viewbox)
      {

-- 


Reply via email to