Commit Graph

20 Commits

Author SHA1 Message Date
Taehyub Kim e4964f94fa evas_vg_shape: return NULL in evas_vg_shape_add when the parent of shape is NULL
Summary:
evas_vg_shaep_add should returned NULL when the parent is NULL
because the function does not allow the NULL parent.
@fix

Reviewers: jsuya, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11839
2020-05-18 15:35:43 +02:00
Taehyub Kim 2a54c0505f evas_vg: refined the evas vector APIs set
Reviewers: jsuya, Hermet

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11517
2020-03-17 16:23:45 +09:00
Taehyub Kim 47107a45ae efl_canvas_vg_shape: fix the wrong parameter order in the wrapper of evas_vg_shape_append_cubic_to()
Summary: The x, y parameter order should be the end of efl_gfx_path_append_cubic_to()

Reviewers: Hermet, jsuya

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11491
2020-03-12 12:17:07 -04:00
junsu choi 59419006b8 efl_canvas_vg : Propagates the alpha color of the parent
Summary:
The current color is affected by the parent's opacity.
If p_opacity is set, it will be applied to the current color.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10399
2019-10-16 15:12:13 +09:00
Hermet Park 44d362e1ef evas vg: fix gradient stroke fill memory leaks.
There were continous creation of gradient objects,
We can stop it by caching it properly,

Also, fix mismatched ref/unref counts.
2019-09-24 11:49:10 +09:00
Hermet Park 690dd5d33a ector: code refactoring.
Current vector drawing requires several methods for compositing,
it's shouldnt have only masking but other blending functions
such as matte in lottie, porter&duff in android, etc.

Previously we didn't specify this method name,
just reserved the options and now we started to define the methods
with ector_renderer_composite_method() with Efl.Gfx.VG_Composite_Method
instead of mask_set().
2019-09-06 17:56:02 +09:00
junsu choi 34dc52dbd2 efl_canvas_vg_shape/ector_software : Set and use stroke miterlimit
Summary:
efl_canvas_vg_shape is set to miterlimit with Efl.Gfx.Shape.stroke_miterlimit
and pass the value from rasterizer to freetype.

NOTE: The default value is 4. It only refers to the standard of web svg.
      https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit

Depends D9657

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Subscribers: cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9665
2019-08-22 13:00:01 +09:00
Hermet Park b0737c7434 Revert "ector: code refactoring."
This reverts commit dad166f84a.

Ector is not public, this breaks enlightenment compilation,
2019-08-20 20:24:27 +09:00
Hermet Park dad166f84a ector: code refactoring.
Current vector drawing requires several methods for compositing,
it's shouldnt have only masking but other blending functions
such as matte in lottie, porter&duff in android, etc.

Previously we didn't specify this method name,
just reserved the options and now we started to define the methods
with ector_renderer_composite_method() instead of mask_set().
2019-08-20 18:23:41 +09:00
Hermet Park b9661d85cd evas vector: set proper parents of clone objects.
fill, marker, stroke need proper parent when they were cloned.

Here, they would get the container of the shape which is going to be copied.

@fix
2019-06-26 17:16:32 +09:00
Mike Blumenkrantz 5bfe2e89d2 evas: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D8107
2019-03-06 19:05:48 +01:00
Hermet Park da36a87bb3 evas vg: improve masking render logic.
Previous masking image is generated on vg rendering time,
though context is changed to main vg rendering to masking,
This had a issue that ector context switching which is not allowed
in software backend because of asynchronou method.

Now, this improvment brings the masking rendering move to
vg render pre step with synchronous rendering method,
then use the masking surface in the main vg rendering.
2019-01-28 16:57:56 +09:00
Hermet Park 5a46f2136a evas vg: more strict check for the argument.
a shape node must have vg node as the parent.
2018-12-28 13:39:37 +09:00
Hermet Park d2ec3ce170 efl gfx_path: remove EFL_GFX_PATH_EVENT_CHANGED
Summary:
Here is an additional optmization patch for removing
unnecessary updation of path,

For instance, let's assume this scenario:

If one vg object has 20 path nodes(shapes),
and every single nodes would have 50 path changes.
(like, append_cubic, append_rect, append_xxx ...);
There would 1000 events triggering.

Furthermore, if there are 20 vector objects in one view,
hese events would be triggered 20000 in one frame.

It's insane, actually I could figured out that happens.
and it took a lot of cpu consumption in some vector usages.

efl_gfx_path_commit() is my idea to avoid this.
When path is ready, the path need to get this api call in the last
 to make object changed properly.

@feature

Reviewers: #committers, cedric

Reviewed By: #committers, cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7494
2018-12-28 12:20:15 +09:00
Hermet Park 0e278d1de8 Revert "efl gfx_path: remove EFL_GFX_PATH_EVENT_CHANGED"
This reverts commit 7c38c0c915.

Oops, didn't intend this patch.
2018-12-26 19:32:42 +09:00
Hermet Park 7c38c0c915 efl gfx_path: remove EFL_GFX_PATH_EVENT_CHANGED
Summary:
Here is an additional optmization patch for removing
unnecessary updation of path,

For instance, let's assume this scenario:

If one vg object has 20 path nodes(shapes),
and every single nodes would have 50 path changes.
(like, append_cubic, append_rect, append_xxx ...);
There would 1000 events triggering.

Furthermore, if there are 20 vector objects in one view,
hese events would be triggered 20000 in one frame.

It's insane, actually I could figured out that happens.
and it took a lot of cpu consumption in some vector usages.

efl_gfx_path_commit() is my idea to avoid this.
When path is ready, the path need to get this api call in the last
 to make object changed properly.

@feature

Reviewers: #committers, cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7494
2018-12-26 19:29:10 +09:00
Hermet Park 149dcb17cb evas vg: optimize vg object internal connections.
Dectected huge amount of unnecessray internal events triggering
which were signaled via vg nodes.

By events, nodes were connected with each others,
and finally reaches to vg object to update its rendering properly.

However GFX_PATH_CHANGE signal is too commonly triggered for scenarios,
listening and response it is too burdensome.

We acutally don't need to do this if all nodes could share the
vg object. Nodes directly notify vg object to update it.

Next patch will come to remove stupid GFX_PATH_CHANGE that's aweful
in performance wise.
2018-12-20 14:42:38 +09:00
Hermet Park fbe92aa67f evas ector: add software implmentation for masking feature.
This implementation uses Ector_Buffer to generate mask image from vg container,
and pass it to Ector engine. Ector renderer could blend this image as a mask.
Yet only vg container works as a mask, we could extend shape to support masking later.

Still vector gl drawing is not completed, We use software ector buffer to draw on it.
This is on progessing.
2018-12-07 19:50:08 +09:00
Hermet Park 507a705d5d evas vg: add one comment todo. 2018-11-28 15:38:56 +09:00
Hermet Park ce8b9e4b85 evas vg: rename evas_vg prefix to efl_canvas for consistency. 2018-11-23 20:01:53 +09:00