Page MenuHomePhabricator

evas_vg_cache: Hashkey in cache uses evas
ClosedPublic

Authored by jsuya on Aug 26 2019, 4:13 AM.

Details

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 -> ...

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jsuya created this revision.Aug 26 2019, 4:13 AM
jsuya requested review of this revision.Aug 26 2019, 4:13 AM
Hermet requested changes to this revision.Aug 27 2019, 7:05 PM

I couldn't see any issue even though playing same resource 50 numbers.
Could you please attach sample code for this?

This revision now requires changes to proceed.Aug 27 2019, 7:05 PM

As the current situation, separate vector objects could share a resource properly, there is not point to use vg object as the hash key.
Rather than this, current issue point is more like to canvases.

Let me look more details.

Hermet added a comment.Sep 5 2019, 7:18 PM

Please check a comment.

src/lib/evas/vg/evas_vg_cache.c
385

Object id doesn't works for cache, every different vg objects can't be shared cache data properly.
Here issue is come from different canvas(evas) so we can add canvas id additionally like this.

> "evas, file, key, w, h"

jsuya updated this revision to Diff 24860.Sep 9 2019, 10:25 PM

Change vg object address to evas address in hash key.

jsuya updated this revision to Diff 24862.Sep 9 2019, 10:26 PM
jsuya retitled this revision from evas_vg_cache: Hashkey in cache uses object address. to evas_vg_cache: Hashkey in cache uses evas.
jsuya edited the summary of this revision. (Show Details)

update commit message

Hermet requested changes to this revision.Sep 9 2019, 10:44 PM

Please check a comment.

src/lib/evas/canvas/efl_canvas_vg_object.c
573

I think we don't need vg here.
above obj parameter already has all properties.

src/lib/evas/vg/evas_vg_cache.c
366

How about adding an additional member field "evas" in Vg_Cache_Entry ?
so that we can guarantee this cache entry is perfectly belonged to a certain canvas instance.

example:
evas_cache_vg_entry_create(evas, file, w, h);

vg_entry->canvas = canvas;

This revision now requires changes to proceed.Sep 9 2019, 10:44 PM
jsuya updated this revision to Diff 24872.Sep 10 2019, 1:16 AM

update patch

Hermet requested changes to this revision.Sep 10 2019, 3:01 AM

Please check one more comment.

src/lib/evas/canvas/efl_canvas_vg_object.c
614

Looks cheating, Does this necessary?

This revision now requires changes to proceed.Sep 10 2019, 3:01 AM
jsuya updated this revision to Diff 24876.Sep 10 2019, 4:03 AM

update patch

Hermet accepted this revision.Sep 10 2019, 4:04 AM
This revision is now accepted and ready to land.Sep 10 2019, 4:04 AM
This revision was automatically updated to reflect the committed changes.