Commit Graph

28 Commits

Author SHA1 Message Date
Hermet Park d05c2169a8 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.
2019-11-29 11:20:48 +09:00
Hermet Park 153b5cffd8 evas vector: operate cached vector file data per evas instances.
each vfd loaders construct vector tree data, these can be belongs to evas instance,
they are not likely shareable.

We should operate vfd separately.
2019-11-29 10:51:19 +09:00
Hermet Park 408bfb3e35 evas vector: make it stable caching logic.
We need a more precise caching mechanism to save memory.
Current root node(key) is limited for caching buffers,
when to share by the multiple animated instances.

This patch is a step for further optmization work,
at the moment we disable the caching buffers for the animated instances.
2019-11-28 14:20:08 +09:00
Hermet Park 618bce8038 evas vg: improve caching methods for better precise behaviors.
Previously, json file data won't be shared between instances.
Now, objects can share the json data if they use the same file resource.
2019-11-18 13:08:29 +09:00
junsu choi 93551ca58e evas_cache_vg : Implements sector_get/set internal APIs
Summary:
These APIs to get and set frames for a specific section in vg animation.
get API looks for a sector by name in the markerlist of VG_File_Data.
Then return start and end frames.

Depends on D10504

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10505
2019-11-12 14:29:50 +09:00
junsu choi 6b2504ba56 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
2019-10-08 20:33:20 +09:00
junsu choi 6d465b0b1f 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
2019-09-10 20:06:18 +09:00
Hermet Park 625e11f584 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
2019-06-21 17:35:48 +09:00
Hermet Park d45e3df689 evas vg: replace to eina_file instance caching by vg.
Here is a replacement to use eina_file from a vg obj instance
to map file data by vg loaders.

This brings a benefit that integrated access to load data
between vg object and vg loaders.
2019-03-12 12:58:31 +09:00
Mike Blumenkrantz 6b046ec845 efl.gfx: remove Efl.Gfx.Image_Load_Error
Summary:
this is now implemented through Eina.Error

ref T7718

Depends on D8066

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8067
2019-03-04 13:36:57 -05:00
Mike Blumenkrantz 540d3b9587 efl.file_save: rework save flags
Summary:
instead of passing a string which requires reading docs to know which
arbitrary string key=value sets can be passed, use an extensible struct
which contains more easily referenced values

ref T7672

Depends on D8035

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7672

Differential Revision: https://phab.enlightenment.org/D8039
2019-02-27 13:17:35 -05:00
Yeongjong Lee 100a5b210d evas vg: fix correct increment for tflags
Summary:
There is warning.

```
lib/evas/vg/evas_vg_cache.c: In function ‘_vg_file_save’:
lib/evas/vg/evas_vg_cache.c:185:30: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
         tflags = alloca(len) + 1;
```
Previous code of a8d5f275c7 is intended to increase flags length.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7972
2019-02-21 14:17:18 +09:00
Hermet Park a8d5f275c7 evas vg: use strncpy() instead of strcpy() for better security. 2019-02-21 10:36:49 +09:00
Hermet Park 950059ce9a evas vg: revise basic vg cache logic.
There was a big trouble that vg cache didn't free cached data properly.
Plus, there was a unnecessary copy of vg tree data.

This revised version is a improvement of our evas vg cache
in stable and optmization.
2018-12-07 19:08:34 +09:00
Hermet Park 072f5a2fa0 evas vg: code refactoring.
capsulate vector file data from efl canvas vg.

hide vector file data structure, capsulate it,
cut off the dependency by vector object.
yet it has evas_cache_entry interface.
2018-12-07 18:06:38 +09:00
Hermet Park 093e32a0fb evas vg: code refactoring.
keep internal variable and structre names consisteny.
no logical changes.
2018-12-07 17:14:15 +09:00
Bryce Harrington cd6e7fe685 evas vg: Check for OOM in evas_cache_vg_entry_create 2018-11-21 20:38:50 +09:00
Hermet Park b29209ac4b canvas vg: check expcetional case.
Summary: if file is not exists.

Reviewers: devilhorns, #committers, zmike

Reviewed By: #committers, zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6546
2018-07-11 16:08:49 +09:00
Hermet Park 5733994b02 evas vg: fix wrong obj deletion.
Cached roots are constructed out of canvas.
Means, they have no parents, generated efl_add_ref()
which requests to call efl_unref() instead of explicit deletion.
2018-06-11 20:10:07 +09:00
Hermet Park ca3fb6bf94 evas vg: fix broken vg rendering.
This fixes vg to connect node tree properly on copying nodes.

Vector rendering was broken when vg cache tries to reconstruct the scene-graph
tree on copying from the original cached one. Exactly, nodes lost parents on
copying. Here it fixes the lost links of the scene-graph tree.

@fix T6993
2018-06-11 17:18:36 +09:00
Mike Blumenkrantz 7eb0375c0e efl_vg: namespace moves
efl.vg -> efl.canvas.vg.node
efl.vg.* -> efl.canvas.vg.*

ref T6714
2018-02-21 14:04:59 -05:00
Amitesh Singh 196b6f1ba4 interface: rename Efl.Dup to Efl.Duplicate.
dup is considered too short and maybe confusing,
hence rename it to duplicate instead.
2017-12-11 15:25:31 +09:00
Jean-Philippe Andre bd5b76508b efl: Introduce interface Efl.Dup
A few classes allow their objects to be duplicated, so they should all
use the same interface.

Also, rename VG's dup to copy_from as it's not conforming to the
definition of dup.
2017-11-30 10:48:24 +09:00
subhransu mohanty 8952c3e524 evas/vg: changed the efl_vg_dup api signature.
Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5440
2017-11-08 15:55:52 +09:00
Vitalii Vorobiov 7d9c1256a3 vg_savers/svg: empty (for now) module that will save svg in original file
Just as a starter to make a working background that, later on, will go
through Svg_Node's and build a certain source code to be saved in SVG
picture as a file
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 3f75c92ca9 evas_vg_cache: load svg from any file, not from defined only
so it doesn't only load from eet or edj only
but also from those any extensions who is ACTUALLY eet, but named as,
for example, like, "file_with_svg.dev"

@fix
2017-11-07 11:54:08 +09:00
Jean-Philippe Andre ec1acca74d evas vg: Add FIXME and fix strbuf use
This is the result of a really quick review of the new VG code. Most of
it was moved around, but this merge includes the following:
 - Move logic from edje to evas
 - Create static lib for common VG handling
 - Add file_set() API
 - Add a basic VG cache in evas side
 - Add savers modules, implement loaders and savers.
2017-10-27 14:58:38 +09:00
subhransu mohanty 64231ae699 evas/vg: Added vg tree caching support 2017-10-27 14:58:38 +09:00