Commit Graph

378 Commits

Author SHA1 Message Date
junsu choi 442fae5c56 Efl.Canvas.Vg.Object: Optimize Ector Surface Size
Summary:
The ector surface size was determined by the size of the vg object.
vg object is usually sized by the size of the container.
So, the ector surface is set unnecessarily large.
This patch sets the ector surface size to the path boundary.
And the path boundary refers to the stroke width and miterlimit.

Test Plan:
vector sample
{F3887634}
{F3887632}

[grey area is ector surface size]
{F3887633}

Reviewers: Hermet, kimcinoo, smohanty, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11865
2020-06-03 11:37:23 +09:00
Marcel Hollerbach 8e3606698e refactor build
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.

this is preparation work for efl-one.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
2020-05-27 11:06:46 +02:00
Stefan Schmidt 3ca9d72825 build: lib: harmonize the use of package_c_args in all libs
Add it to subprojects which are not using it and remove and old
ELEMENTARY_BUILD define we no longer use. This allows us to have a
central place in the main meson.build file to set this variable.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11854
2020-05-26 10:15:21 +02:00
Carsten Haitzler 63b5d81983 Revert "Fix EAPI definition by defining EFL_BUILD for each built DLL"
This reverts commit 3ade45cbc8.
2020-05-18 11:13:59 +01:00
Vincent Torri 3ade45cbc8 Fix EAPI definition by defining EFL_BUILD for each built DLL
Summary: EAPI must be defined to dllexport when building DLL, and to dllimport when using these DLL. To achieve this, define EFL_BUILD for each library and module, and set DLL_EXPORT unconditionally. Static library are and will be not supported

Test Plan: compilation

Reviewers: zmike, raster, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11834
2020-05-18 09:51:48 +01:00
Daniel Kolesa 7791d9fac6 remove unused imports in eo/eot files 2020-04-19 01:44:50 +02:00
Marcel Hollerbach 8cb311357c meson: do not install namespace problem legacy files
these files are not required for the unified API, but they have
namespace problems, so for now, do not install them

Differential Revision: https://phab.enlightenment.org/D11665
2020-04-14 12:25:59 +02:00
junsu choi 720db8694c Ector: Refer to visibility of Ector_Renderer when doing rle_update.
Summary:
An object with visibility false may not have a normal path or data.
It can cause invalid access or affect other ector renderers.
This is a patch to prevent them.

Test Plan: N/A

Reviewers: Hermet, kimcinoo, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11689
2020-04-13 13:41:17 +09:00
Marcel Hollerbach 6934a9623e ector: fix pointer checking
we want to check if the pointer is available, and not the value of the
pointer. This fixes some "Jump depends on uninitialized value" messages
from valgrind.
2020-03-23 11:22:09 +01:00
Xavi Artigas 9f4b5458ea doxygen: fix duplicated toc sections 2020-02-28 11:44:19 +01:00
Hermet Park 11a1fc9f2b ector software: catch up losing tasks among the threads.
This is a subsequent change after 8465904c19.

The major change is almost same but just for gradient stuff.
2019-12-19 20:30:31 +09:00
Hermet Park 8465904c19 ector software: catch up losing tasks among the threads.
Summary:
ector sw uses thread pool internally to process rle job parallel.

First of all, we lost task handles which allocated to each threads,
we must free the task data after thread done.

Secondly, tasks can be managed by one shape instance,
the instance can't catch upon multiple instances alive.
only last task can be attached to the shape instance.

Thus, obvisouly the instance doesn't expect to handle multiple tasks
at the same time, one instance only take care of one task on threading pool.

Reviewers: jsuya, cedric, smohanty, kimcinoo

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10916
2019-12-19 17:01:25 +09:00
Ali Alzyod 4318fe1254 ector: Fix build warning about unused variable
Reviewers: bu5hm4n, Hermet, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10851
2019-12-10 12:03:01 -05:00
Hermet Park 19ef155526 vg ector: Call a pair of ector begin/end for ector buffer drawing.
While we render vector drawing on ector,it uses ector buffers for subsequent compositions.
In this sequence, it switches ector buffer with a composition target,
while resuing the global ector context.

Previously, it trickly switched ector buffer, it broke the ector begin/end pair.
Now, it needs to recover global ector buffer once the composition finished.
Thus ector buffer need to return the current pixels information for this.
2019-12-06 15:31:30 +09:00
junsu choi 562ae738cc ector_software_rasterizer: use dynamic array by span size.
Summary:
When use with intersect mask, if span_count over span array size, composition is to be wrong.
So, In this case, we use dynamic array by span_count.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10748
2019-12-06 10:37:31 +09:00
junsu choi c1f3ad86df Ector: Prevent access to NULL
Summary: ector thread can called *data(task) after deleting task object.

Test Plan: N/A

Reviewers: Hermet, kimcinoo, smohanty

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10804
2019-12-05 20:25:26 +09:00
Lauro Moura f203c164d8 eo files: Avoid container<ptr(value_type)> usage.
Summary:
Value types are already assumed to be stored by pointer (e.g.
`int val = *(node->data);`)

This commit just changes the current usage of the `ptr` modifier in the
ptr, not affecting the parser.

Reviewers: q66, segfaultxavi, bu5hm4n, felipealmeida

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers, brunobelo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10769
2019-11-29 17:22:07 -03:00
WooHyun Jung 247331363a eolian: fix eolian errors with EOLIAN_ENFORCE_SINCE=1
Summary:
This is not the end of fixing eolian errors. I need to keep fixing
more.

Test Plan:
1. export EOLIAN_ENFORCE_SINCE=1
2. ninja

Reviewers: q66, segfaultxavi, zmike, bu5hm4n, Jaehyun_Cho

Reviewed By: segfaultxavi, Jaehyun_Cho

Subscribers: Jaehyun_Cho, stefan_schmidt, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10370
2019-10-14 16:55:52 +09:00
Hermet Park 24ed24a9db ector: refer exact stride size for jumping buffer lines.
Actual buffer and used width size could be different,
stride must be referred.
2019-09-17 12:03:25 +09:00
Hermet Park dc0056ca93 ector: removed cairo backend.
For reducing maintainability burden,
We drop supporting cairo backend.

The default backend is to software implementation from now.
It's well maintained so far and works good.x
2019-09-11 13:14:56 +09:00
Hermet Park 3d50083f41 ector: don't alloc memory if the size is 0. 2019-09-11 12:01:25 +09:00
Hermet Park 20abcba3b0 ector: code refactoring.
more neat and clean code, no logical changes.
2019-09-11 12:01:19 +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
Hermet Park c5b88ca745 ector: add FIXME for coming issues.
We have no any test resouce but it seems very weird code...
Leave a comment for future task.
2019-09-04 20:03:05 +09:00
Hermet Park f90c8b8910 ector: fix a wrong target buffer size.
the target buffer is allocated by backend engine,
The buffer size must be specified with the stride, not the width.
It's real dimension can be different with the our request.
2019-09-04 20:03:05 +09:00
Hermet Park 9a4b6728d5 ector gradient: ++ optmization.
we know what size will be used for every span,
this graident buffer will be overwritten with new one,

So it doesn't need to clear every spans.
2019-08-30 17:15:06 +09:00
Hermet Park e4b9807ee3 ector: remove unnecessary blending processing.
gradient buffer in masking doesn't need to apply anti-aliasing
since it would be taken by masking buffer.

This also fixes memory overflow case if the tbuffer is lack of size.
2019-08-30 13:44:56 +09:00
Hermet Park 17320a1318 ector: code refactoring.
just renamed internal variables, no logical changes.
2019-08-30 13:44:56 +09:00
Daniel Kolesa 9c018613ee eolian: drop @cref
In the end this was just a failed experiment that didn't turn
out to be practical. For now, revert back to ptr(const(T)) until
a proper replacement for pointer syntax is added.
2019-08-29 13:58:16 +02: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
junsu choi ca8df7067c ector_software_rasterizer: Change default value of stroke linejoin
Summary:
SW_FT_STROKER_LINEJOIN_MITER is same SW_FT_STROKER_LINEJOIN_MITER_VARIABLE
We pass miterlimit values in fixed-point type.
Therefore, change the default value to SW_FT_STROKER_LINEJOIN_MITER_FIXED.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9656
2019-08-22 12:38:57 +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 9b7d71df79 ector: ++safety.
null handling just in corner case.
2019-08-08 23:34:02 +09:00
junsu choi 949cf2750b ector_software_rasterizer: Add default value for stroke's miter_limit
Summary:
Currently the default value of miter_limit is defined as 0.
miter_limit should be specified to a value other than 0. becuase it is affected by width.
See below for an explanation of this.
https://www.freetype.org/freetype2/docs/reference/ft2-glyph_stroker.html#ft_stroker_linejoin

There is no particular reason why the default value is 0x4.
It only refers to the standard of web svg.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit

Test Plan:
   setenv("ECTOR_BACKEND", "default", 1);
   elm_init(argc, argv);
   Evas_Object *win = elm_win_util_standard_add(NULL, "test");
   evas_object_smart_callback_add(win, "delete,request", win_del, 0);
   elm_win_autodel_set(win, 1);
   Evas_Object *bg = elm_bg_add(win);
   elm_bg_color_set(bg, 255,255,255);
   evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(bg);

   Evas *evas = evas_object_evas_get(win);

   Evas_Object *vg = evas_object_vg_add(evas);
   evas_object_show(vg);
   Evas_Object *container = evas_vg_container_add(vg);

   Evas_Object *shape = evas_vg_shape_add(container); //Default is EFL_GFX_JOIN_MITER
   evas_vg_shape_append_rect(shape, 0, 0, 100 , 100, 0, 0);
   evas_vg_shape_stroke_color_set(shape, 255, 0, 0, 255);
   evas_vg_shape_stroke_width_set(shape, 10);
   evas_vg_node_origin_set(shape, 50, 150);

   shape = evas_vg_shape_add(container);
   evas_vg_shape_append_rect(shape, 0, 0, 100 , 100, 0, 0);
   evas_vg_shape_stroke_join_set(shape, EFL_GFX_JOIN_BEVEL);
   evas_vg_shape_stroke_color_set(shape, 255, 0, 0, 255);
   evas_vg_shape_stroke_width_set(shape, 10);
   evas_vg_node_origin_set(shape, 200, 150);

   shape = evas_vg_shape_add(container);
   evas_vg_shape_append_rect(shape, 0, 0, 100 , 100, 0, 0);
   evas_vg_shape_stroke_join_set(shape, EFL_GFX_JOIN_ROUND);
   evas_vg_shape_stroke_color_set(shape, 255, 0, 0, 255);
   evas_vg_shape_stroke_width_set(shape, 10);
   evas_vg_node_origin_set(shape, 350, 150);

   evas_object_vg_root_node_set(vg, container);
   elm_object_content_set(bg, vg);

   elm_win_resize_object_add(win, bg);
   evas_object_resize(win, WIDTH, HEIGHT);
   evas_object_show(win);
   elm_run();
   elm_shutdown();

Reviewers: smohanty, Hermet, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9492
2019-08-05 18:08:50 +09:00
junsu choi 3210fa3d69 ector: Prevent access to NULL buffer in software rasterizer
Summary:
Prevents a crash caused by a null pointer exception
when ector surface buffer is NULL.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9390
2019-07-26 13:12:48 +09:00
junsu choi 1ce14bc85d Ector.Renderer : Implement Ector.Renderer.(Software).Image class
Summary:
Implement a class and drawer that outputs image data from the Ector.
Image data is output with a vector object and supports transform.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9218
2019-07-22 13:29:02 +09:00
junsu choi be419d64d2 Ector.Renderer: Prevent too many unref.
Summary:
pd-> surface will try efl_xref whenever surface_set is called.
desturctor is called from a subclass, ref and unref do not match.
So, Add this condition temporarily.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9235
2019-07-09 15:46:41 +09:00
junsu choi c7b1a40b5e ector: Fix precomp layer rendering issue when it has alpha value
Summary:
When the precomp layer(parent layer) has alpha transparency and has more than 1 child layer
and they overlap each other if vg object just propagate the alpha to child layer
it will be applied twice in overlapped area.
Even if the child layer does not have alpha transparency, parent alpha is applied to each child.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, #reviewers, kimcinoo, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9072
2019-06-20 16:07:05 +09:00
Daniel Kolesa 13ddc5dbc1 eolian: rename @warn_unused and its associated API
@warn_unused in syntax is now called @no_unused - this is because
"warning about unused" is a C thing (or rather, an extension to C)
and various languages might want to use stricter behavior for this.

Its associated API does the reverse now - it lets you query whether
being unused is allowed at all. This is to match future behavior
of Eolian (once it supports versioning) that will likely reverse it.

@feature
2019-05-26 17:41:22 +02:00
Daniel Kolesa d0fed247bb eolian: remove param @nonull
This has been deprecated for a while and is not strictly necessary
- as a part of an effort to stabilize Eolian, remove this. Eolian
will eventually gain support for versioning and use a reversed
behavior (i.e. no NULL by default), but the API it wlll use for
that will be very different. Features can always be added, it's
much harder to drop them.

@feature
2019-05-26 17:25:15 +02:00
junsu choi 10062fd957 ector_software_rasterizer: Improved masking calculation.
Summary:
The memory allocation for the buffer size is improved to
allocate only the width size.

Test Plan: N/A

Reviewers: Hermet, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, smohanty, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8873
2019-05-15 11:22:45 +09:00
Daniel Kolesa 6312cafe20 eolian: move from eo_prefix to c_prefix 2019-05-09 16:17:44 +02:00
junsu choi c10dfc3bca ector_software_rasterizer : Move duplicate alloca
Summary: Move the alloca() outside of the loop.

Test Plan: N/A

Reviewers: Hermet, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, smohanty, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8869
2019-05-09 19:30:37 +09:00
junsu choi 4473062dd4 ector_software_rasterizer: Support gradient mask blending
Summary: This patch supports mask blending of gradient shapes.

Test Plan: N/A

Reviewers: Hermet, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, smohanty, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8855
2019-05-08 16:57:19 +09:00
junsu choi 83d5ea1a42 ector_software_rasterizer: Implement mask blending function.
Summary:
Add Mask blend function(Add, Substract, Intersect, Difference)
this blending function only use mask blending case.

Test Plan: N/A

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, kimcinoo, #reviewers, smohanty, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8509
2019-04-11 19:17:10 +09:00
Xavi Artigas 68c530080b docs: Fix common misspellings in H files
Fixed all appearances of words from this list in H files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 13:28:48 +02:00
Xavi Artigas bbd4b6e514 docs: Remove obsolete @since tags from EO files
Summary:
All legacy @since tags have already moved to the *.legacy.h files.
EO files are now devoid of @since tags (except some eldbus still
needed for legacy).
Upcoming patches will add @since 1.22 to those APIs which come out
of beta in this release.
APIs marked @beta do not need @since tags.

Test Plan: Everything builds, EO docs (like DocFX) have no Since tags.

Reviewers: zmike, bu5hm4n, lauromoura, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8430
2019-03-20 20:16:05 +01:00
Marcel Hollerbach 30bb8395c3 build: add a option to disable eo file installation
Summary:
this is done because .eo files are not stable, and in order to stop
people depending on it, its better for now to disable the installation
of them for now.

ref T7676

Reviewers: stefan_schmidt, cedric, zmike, devilhorns

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7676

Differential Revision: https://phab.enlightenment.org/D7897
2019-03-14 12:44:00 -04:00
Daniel Kolesa d3c5384cd0 eolian: enable checking of beta/stable contexts in all classes
Summary:
This enables all the checks unconditionally, without ignoring
classes that don't have an Efl namespace. This required a lot
of beta marking to make it build. It most likely doesn't
mark types correctly, as that is not fully enabled yet.

Reviewers: zmike, cedric, segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8266
2019-03-11 13:42:29 +01:00