Page MenuHomePhabricator

Efl.Gfx.Vg.Value_Provider: Introduce property change feature of Efl.Ui.Animation_View
Needs ReviewPublic

Authored by jsuya on Mon, Sep 9, 5:49 AM.

Details

Summary

Efl.Gfx.Vg.Value_Provider is an object for integrating and managing the properties of vector objects.
These values are dependent on the keypath.
Keypath is the target a specific content or a set of contents that will be updated.
It can include the specific name of the contents, wildcard(*) or Globstar(**).

The valueProvider is borrowed from another library that uses a vector object of type json, such as Efl.Ui.Animation_View
(https://github.com/airbnb/lottie-ios/blob/5fc0e59e0cb85d3586b1d0d1cf4a2c9669b91d15/lottie-swift/src/Public/iOS/AnimatedControl.swift#L50)

This feature should be used with some patches that apply to the vg json loader and Efl.Canvas.Vg.Object.

Test Plan

N/A

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13435
Build 9449: arc lint + arc unit
jsuya created this revision.Mon, Sep 9, 5:49 AM
jsuya requested review of this revision.Mon, Sep 9, 5:49 AM
jsuya updated this revision to Diff 24878.Tue, Sep 10, 4:20 AM

code update

jsuya updated this revision to Diff 24879.Tue, Sep 10, 4:22 AM

remove unnecessary code

jsuya updated this revision to Diff 24886.Tue, Sep 10, 5:42 AM
jsuya retitled this revision from [WIP] Efl.Gfx.Vg.Value_Provider: Introduce property change feature of Efl.Ui.Animation_View to Efl.Gfx.Vg.Value_Provider: Introduce property change feature of Efl.Ui.Animation_View.

update commit message

Hermet requested changes to this revision.Thu, Sep 19, 12:19 AM

Please check comments.

src/lib/elementary/efl_ui_animation_view.c
239

before it remove the list, it must derefence the items to free them properly.
ex)
EINA_LIST_FREE(pd->vp_list, vp)

efl_unref(vp);
743

++reference.
efl_ref(value_provider);

751

I think ex vp can be just removed from the list and replaced with value_provider. thats' it. don't need to copy properties.

src/lib/evas/canvas/efl_gfx_vg_value_provider.c
38

Seems this method doesn't necessary.

src/lib/evas/canvas/efl_gfx_vg_value_provider.eo
2

This shouldn't be exposed.

12

Can we say this Value_Provider is a type of Color or Shape?
Please check shape and path whether this value_provider is satisfied with their spec.

I'd rather consider clear interfaces for overridable value list....

class value_provider {
@property keypath:
@property transform:
@property stroke_color:
..

Done.

};

This revision now requires changes to proceed.Thu, Sep 19, 12:19 AM
jsuya marked 5 inline comments as done.Thu, Sep 19, 7:02 PM
jsuya added inline comments.
src/lib/elementary/efl_ui_animation_view.c
751

I think, we have to consider this case.

ValueProvider1 "shape1.*" FillColor 0 0 0 255

StrokeColor 0 255 0 255

override( Animation_view, ValueProvider1);
ValueProvider2 "shape1.*" FillColor 255 255 255 255
override( Animation_view, ValueProvider2);
and
When user want to remove overrided FillColor value of "shape1.*" path.

When change color black to white, we have to keep Strokecolor value.
Then I think that it is better to manage valueprovider based on path.
At the very least, I think the way to delete an existing valueprovider when an override occurs cannot handle this case.
what do you think?

src/lib/evas/canvas/efl_gfx_vg_value_provider.c
38

This is necessary if we keep the logic of efl_ui_animation_view.c +748.

jsuya updated this revision to Diff 25234.Fri, Sep 20, 1:09 AM
jsuya marked an inline comment as done.

update commit
Add ref,unref for vp
Remove copy property
Change enum and get function to internal api