Commit Graph

33 Commits

Author SHA1 Message Date
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 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
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
Hermet Park e6f66e56fd ector software: Be careful at alloca() usage.
allocate one spare span memory then reuse it.
2018-12-07 19:54:41 +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 cfc66dd0bd ector: code refactoring.
make code clean and neat.
no logical changes.
2018-12-07 15:50:57 +09:00
Hermet Park c373f4936b ector/software: remove duplicate call. 2018-11-14 16:08:09 +09:00
Cedric Bail e380ddb742 ector: move RLE shape/stroke computation to a pool of thread.
This has been a long standing plan for improving performance in rendering
vector object. Depending on the test, you will get an improvement between
10 to 35% when rendering vector based object.

We are still maintaining the Cairo backend as the default one at the moment
due to a lack of result comparison tests between the two engine. Hopefully
we should get that covered and we can all enjoy a backend that is 4 times
faster by default.
2017-09-17 11:49:48 -07:00
Bryce Harrington d5346d4e24 ector: cleanup grammar in comments
Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5132

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-29 16:24:23 -07:00
Jean-Philippe Andre 2ef8d6f39a evas filters: Refactor ector and gfx filters A LOT
Alright, so this is a massive patch that is the result of
trying to get rid of unused or poorly implemented classes in
ector. Originally ector was meant to support VG but extend to
things like filters as well. At the moment, ector's design
makes it quite hard to plug in the filters.

For now I think it's easier to implement the GL support for
the filters directly in the engine, where I hope to interfere
as little as possible.

This massive patch keeps only the required minimum to support
a versatile gl buffer that can be mapped, drawn or rendered to (FBO).
It's extremely inefficient as it relies on glReadPixels and lots
of texture uploads, as well as conversions between ARGB and Alpha.

Another type of GL buffer is a wrap around an existing GL image,
but that one is read-only (map or draw: no write map, no FBO).

No, all the filters run fine, and the high-level implementation
(evas_filters.c) does not need to know whether the underlying engine
is SW or GL. One problem though appears with the blending or blurring
of some Alpha buffers, the colors are wrong.

This patch removes more lines than it adds so it must be good ;)
2017-04-14 11:26:43 +09:00
Subhransu Mohanty 355a4e3830 evas/vg: fix handling of stroke width in cairo and native backend
T3351

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-15 15:21:17 -08:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Jean-Philippe Andre c09199f0e0 Ector: use uint32_t instead of uint
This fixes the build for Windows. Thanks @vtorri for the report.

I'm not using "unsigned int" as uint was mostly used like DATA32,
ie. color data (one pixel color or a pixel buffer).
2015-12-03 20:28:27 +09:00
Jean-Philippe Andre dc621e2316 Ector: Kill compilation warnings
Remove unimplemented function (no test case yet).
Convert #warning into comments.
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre 33cd26a4b2 Ector: Another minor code cleanup
Remove DATA8, DATA16, DATA32
Remove empty data structure
Remove unnecessary typedef
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre 615b2442b7 Ector: Move drawhelper to static_libs
Rename a few things:
 - draw helper -> efl_draw
 - Ector_Rop -> Efl.Gfx.Render_Op
 - ECTOR_ bla bla -> DRAW_ bla bla (base pixel ops)
 - ector_memfill -> draw_memset32 (and invert arg order to match memset)

The main rasterizer file is now draw.h in static_libs/draw
This is a non functional change, simple code refactor.
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre bad7911cd0 Ector: Use Ector Buffer inside SW and Cairo renderers
Ector Surface now inherits from Ector Buffer, and the current
two renderers (SW and Cairo SW) use Ector.Software.Buffer
implementations for pixel surfaces.

Basic pixel handling is merged and will allow easy extension
(color conversion, etc...).

Buffer classes are Mixins to be fully implemented by the final
class, such as: Ector.Software.Buffer, Ector.Software.Surface
or Ector.Cairo.Surface.

This is a large ugly commit. Sorry.
The code is quite a mess right now.
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre 0cf5719e52 Ector: Implement pixel buffer support
The objective of this patch is to propose a standardized
format for pixel buffers to use within Ector and Evas.

The basic EO API provided here is not meant to be the
fastest path for all operations, simply the most convenient
to generalize. Performance will be achieved by implementing
(or porting) custom draw functions.

This implements support for:
- Generic pixel buffers
- Generic buffer renderer to draw images with ector
- Software engine pixel buffers, ie. malloc buffers
- Software buffer renderer

Cairo support has not been implemented yet.

The only renderer is still extremely limited, as it does not
support Fill modes, Scaling, etc... yet.

Not a single line from this patch has been tested yet.
It compiles. That's pretty damn good for a start!

@feature
2015-12-03 18:42:50 +09:00
Cedric BAIL ef975a9fd2 ector: follow function naming convention. 2015-11-09 10:42:35 -08:00
Vivek Ellur 96f936e6d3 ector: fix null pointer dereference issue
Summary:
Fix Coverity CID1293003

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3220

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-31 02:12:06 +01:00
Subhransu Mohanty 2766ce57ce ector: refactored software drawing backend to use composition function.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-08-19 15:07:36 +02:00
Subhransu Mohanty f1a4f461c2 ector: add bounding box info in RLE data for software backend.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-08-19 14:56:29 +02:00
Subhransu Mohanty 146f3c52b5 ector: now software rasterizer allocates memory on stack to work in multi threading env.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-08-19 14:56:11 +02:00
Daniel Kolesa 917a2bcab5 ector: always initialize the array contents even without fetchfunc
Also use a static array instead of a VLA as we know the size at compile time.

Fixes CID 1294210.

@fix
2015-06-09 15:12:07 +01:00
Jean-Philippe Andre 841403e415 Ector: More clang silencing 2015-04-21 20:40:27 +09:00
Chris Michael d3d909bf9e ector: Fix Coverity CID1293003
Summary: This fixes an issue of coverity reporting Explicit null
dereference as fetchfunc is defaulted to NULL, yet no check is made
later before calling it.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-12 21:13:18 -04:00
Subhransu Sekhar Mohanty 0ec75ca05f ector: fix coding style of freetype backend. 2015-04-03 16:33:50 +02:00
Subhransu Sekhar Mohanty 5753b43812 ector: fix pre multiplied color issue with FreeType backend.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-03 16:33:29 +02:00
Subhransu Sekhar Mohanty 10dca9f68e ector : add path cliping feature in FreeType software backend. 2015-04-03 16:33:05 +02:00
Subhransu Sekhar Mohanty 891ec14585 ector: add software backend using FreeType rasterizer. 2015-04-03 16:31:45 +02:00