summaryrefslogtreecommitdiff
path: root/src/lib/evas/vg/evas_vg_cache.c
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-10-08 18:13:43 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2019-10-08 20:33:20 +0900
commit6b2504ba56467fa3409cbfc56214ef3c8b38bd76 (patch)
treeca0ae0f326cf65d81a0492df3754a3f0fd88eac5 /src/lib/evas/vg/evas_vg_cache.c
parent4867c4bdaf3fd2bef2d46b1e3bc872768431a0ea (diff)
evas_vg_cache: Hashkey of cache use value provider list
Summary: Even if the same window, the same file, and the same size, different images may be requested due to property changes caused by value_provider. Test Plan: N/A Reviewers: Hermet, smohanty, kimcinoo Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10303
Diffstat (limited to 'src/lib/evas/vg/evas_vg_cache.c')
-rw-r--r--src/lib/evas/vg/evas_vg_cache.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/evas/vg/evas_vg_cache.c b/src/lib/evas/vg/evas_vg_cache.c
index f6a1c1cab2..391d3cb2a9 100644
--- a/src/lib/evas/vg/evas_vg_cache.c
+++ b/src/lib/evas/vg/evas_vg_cache.c
@@ -365,14 +365,14 @@ 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->evas, 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, vg_entry->vfd->vp_list);
369} 369}
370 370
371Vg_Cache_Entry* 371Vg_Cache_Entry*
372evas_cache_vg_entry_create(Evas *evas, 372evas_cache_vg_entry_create(Evas *evas,
373 const Eina_File *file, 373 const Eina_File *file,
374 const char *key, 374 const char *key,
375 int w, int h) 375 int w, int h, Eina_List *vp_list)
376{ 376{
377 Vg_Cache_Entry* vg_entry; 377 Vg_Cache_Entry* vg_entry;
378 Eina_Strbuf *hash_key; 378 Eina_Strbuf *hash_key;
@@ -380,9 +380,9 @@ evas_cache_vg_entry_create(Evas *evas,
380 if (!vg_cache) return NULL; 380 if (!vg_cache) return NULL;
381 381
382 //TODO: zero-sized entry is useless. how to skip it? 382 //TODO: zero-sized entry is useless. how to skip it?
383 383 //
384 hash_key = eina_strbuf_new(); 384 hash_key = eina_strbuf_new();
385 eina_strbuf_append_printf(hash_key, "%p/%p/%s/%d/%d", evas, file, key, w, h); 385 eina_strbuf_append_printf(hash_key, "%p/%p/%s/%d/%d/%p", evas, file, key, w, h, vp_list);
386 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));
387 if (!vg_entry) 387 if (!vg_entry)
388 { 388 {
@@ -412,6 +412,7 @@ evas_cache_vg_entry_create(Evas *evas,
412 return NULL; 412 return NULL;
413 } 413 }
414 vg_entry->vfd->ref++; 414 vg_entry->vfd->ref++;
415 vg_entry->vfd->vp_list = vp_list;
415 416
416 return vg_entry; 417 return vg_entry;
417} 418}
@@ -462,6 +463,17 @@ evas_cache_vg_tree_get(Vg_Cache_Entry *vg_entry, unsigned int frame_num)
462} 463}
463 464
464void 465void
466evas_cache_vg_entry_value_provider_update(Vg_Cache_Entry *vg_entry, Eina_List *vp_list)
467{
468 if (!vg_entry) return;
469
470 Vg_File_Data *vfd = vg_entry->vfd;
471 if (!vfd) return;
472
473 vfd->vp_list = vp_list;
474}
475
476void
465evas_cache_vg_entry_del(Vg_Cache_Entry *vg_entry) 477evas_cache_vg_entry_del(Vg_Cache_Entry *vg_entry)
466{ 478{
467 if (!vg_cache || !vg_entry) return; 479 if (!vg_cache || !vg_entry) return;