summaryrefslogtreecommitdiff
path: root/src/lib/evas/vg/evas_vg_cache.c
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-09-10 20:06:18 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2019-09-10 20:06:18 +0900
commit6d465b0b1ffec1cf0f87243143c5a1a5b441b496 (patch)
treecb04e94158db0bbd26ab0d6e6a593df35938e9b9 /src/lib/evas/vg/evas_vg_cache.c
parentf78b4861af140bd5b333fb530556e81915acbaab (diff)
evas_vg_cache: Hashkey in cache uses evas
Summary: Vg_entry is shared by different child windows. When two or more objects load the same file When resizing, cache_vg_entry_render can delete an active entry while creating a new entry and deleting an existing entry. Therefore, use cache data added evas Test Plan: [enable json loader] --- a/meson_options.txt +++ b/meson_options.txt @@ -203,7 +203,7 @@ option('evas-loaders-disabler', type : 'array', description : 'List of modular image/vector load ..... choices : ['gst', 'pdf', 'ps', 'raw', 'svg', 'rs ..... - value : ['webp', 'json'] + value : ['webp'] [Test] elementary_test -> Animation View click -> play -> Animation View click again -> ... Reviewers: Hermet, smohanty, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9740
Diffstat (limited to 'src/lib/evas/vg/evas_vg_cache.c')
-rw-r--r--src/lib/evas/vg/evas_vg_cache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/evas/vg/evas_vg_cache.c b/src/lib/evas/vg/evas_vg_cache.c
index dd85349ee9..f6a1c1cab2 100644
--- a/src/lib/evas/vg/evas_vg_cache.c
+++ b/src/lib/evas/vg/evas_vg_cache.c
@@ -365,11 +365,12 @@ evas_cache_vg_file_open(const Eina_File *file, const char *key)
365Vg_Cache_Entry* 365Vg_Cache_Entry*
366evas_cache_vg_entry_resize(Vg_Cache_Entry *vg_entry, int w, int h) 366evas_cache_vg_entry_resize(Vg_Cache_Entry *vg_entry, int w, int h)
367{ 367{
368 return evas_cache_vg_entry_create(vg_entry->file, vg_entry->key, w, h); 368 return evas_cache_vg_entry_create(vg_entry->evas, vg_entry->file, vg_entry->key, w, h);
369} 369}
370 370
371Vg_Cache_Entry* 371Vg_Cache_Entry*
372evas_cache_vg_entry_create(const Eina_File *file, 372evas_cache_vg_entry_create(Evas *evas,
373 const Eina_File *file,
373 const char *key, 374 const char *key,
374 int w, int h) 375 int w, int h)
375{ 376{
@@ -381,7 +382,7 @@ evas_cache_vg_entry_create(const Eina_File *file,
381 //TODO: zero-sized entry is useless. how to skip it? 382 //TODO: zero-sized entry is useless. how to skip it?
382 383
383 hash_key = eina_strbuf_new(); 384 hash_key = eina_strbuf_new();
384 eina_strbuf_append_printf(hash_key, "%p/%s/%d/%d", file, key, w, h); 385 eina_strbuf_append_printf(hash_key, "%p/%p/%s/%d/%d", evas, file, key, w, h);
385 vg_entry = eina_hash_find(vg_cache->vg_entry_hash, eina_strbuf_string_get(hash_key)); 386 vg_entry = eina_hash_find(vg_cache->vg_entry_hash, eina_strbuf_string_get(hash_key));
386 if (!vg_entry) 387 if (!vg_entry)
387 { 388 {
@@ -396,6 +397,7 @@ evas_cache_vg_entry_create(const Eina_File *file,
396 vg_entry->key = eina_stringshare_add(key); 397 vg_entry->key = eina_stringshare_add(key);
397 vg_entry->w = w; 398 vg_entry->w = w;
398 vg_entry->h = h; 399 vg_entry->h = h;
400 vg_entry->evas = evas;
399 vg_entry->hash_key = eina_strbuf_string_steal(hash_key); 401 vg_entry->hash_key = eina_strbuf_string_steal(hash_key);
400 eina_hash_direct_add(vg_cache->vg_entry_hash, vg_entry->hash_key, vg_entry); 402 eina_hash_direct_add(vg_cache->vg_entry_hash, vg_entry->hash_key, vg_entry);
401 } 403 }