Commit Graph

11 Commits

Author SHA1 Message Date
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
Jean Guyomarc'h 37adb060dd ector: fix redefinition of type and bizarre typedef
Maybe there is a trick here I am not aware of, but
redefining a type as itself seems a mistake to me.
This raised a warning anyway. Now it's gone.
2016-05-28 22:17:22 +02:00
Tom Hacohen 28a2d34ae2 Ector generic: Remove .Generic and .Base (hack no longer needed). 2016-05-11 12:57:55 +01:00
Jean-Philippe Andre dc4790e08b Ector GL: Add skeletton for Evas.Ector.GL.Image.Buffer
This is an ector buffer backed by an existing Evas_GL_Image
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre e3a7f657d9 ector: add Ector.GL.Buffer.* support. 2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 5e075c193c ector: on-the-fly convert sw buffers during map()
Also use map to generate spans.
This should simplify some filters code, making things work,
albeit inefficiently. At least they should work.

Fix doc too.
2016-01-05 15:43:43 +09:00
Jean-Philippe Andre 9121e503a3 ector: track maps in software buffer 2016-01-05 15:43:43 +09:00
Jean-Philippe Andre 7a8879ba8b ector: add engine-specific evas image buffer wrapper
Since Evas still relies entirely on Image_Entry and Evas_GL_Image,
we will need an engine-specific wrapper object creating a Buffer
around an existing cached image.

Currently only SW support is implemented. GL will be more fun to
do (with glReadPixels and whatnot).
2016-01-05 15:43:43 +09:00
Jean-Philippe Andre 85f23d96e7 ector: add typedef Ector_Buffer 2016-01-05 15:43:43 +09:00
Jean-Philippe Andre 4bcea3eada Ector: Move cairo surface back to ector
The original plan was to have two different surfaces for GL and SW,
but this is probably not going to happen anytime soon. So, move
the implementation back to lib/ector. This avoid a file duplication.
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