Commit Graph

14 Commits

Author SHA1 Message Date
Jean-Philippe Andre 8441290767 Evas filters: Add support for displacement map alpha
Not tested yet!
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre e7a67dd13b Evas filters: Remove complicated displacement flags
The displacement effect is way too complicated. Let's keep it
simple and have only one displacement map format (RG + Alpha).

Here's what's missing now:
- Alpha support, to blend in the input with a variable intensity
- Extra padding (see below)

Also, the intensity VS. map values are not perfectly defined yet.

Problems: How to create a complete mirror effect (map needs to go
over boundaries... add extra padding to the buffers).
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre df60cd30c0 Evas filters: Start implementing stretch for blend
The fillmode is ignored when blending... for now.
First, implement none and stretch options for RGBA.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 12ddad2867 Evas filters: Reuse output buffer in Text object
This is the first possible optimization: save the rendered
text (since we already have the output buffer anyways), and
reuse it if the text + filter didn't change.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 2da17927da Evas filters: Implement fill with padding
Add parameters l, r, t, b to clip the fill area.
While l=x and t=y, the width and height of the clip are determined
at filter run-time, since we don't know the buffer size before.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 40bb984b42 Evas filters: Implement mask stretch in RGBA blend
Brutal method for now: allocate YET ANOTHER buffer,
render scaled image to it (smooth scaling, oh yeah),
use this as a new mask.

For now, supports:
Alpha Input, RGBA mask, RGBA output, X,Y,XY stretching
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 9623e1f238 Evas filters: Pass fillmode to the filters
I just need to actually implement them, now :)
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 37eb6b6233 Evas filters: Change default buffer size to input size
This should make more commands work intuitively.
Now we still need to specify how to repeat or stretch buffers
when running commands.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 0ad8b02c16 Evas filters: Fix compilation after merge from master
- CRIT becomes CRI
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 9da4789b66 Evas filters: Disable styles when filter_chain is set
Since the default theme includes a dark shadow behind normal
lines text (white on dark grey), we need to skip those when using
a filter program.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 109894bb56 Evas filters: Add fill command
This will simply clear the target buffer with the specified color.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 91e20084c1 Evas filters: Clear buffers after allocation
malloc() and mmap() don't return empty buffers, so blending on top
will present tons of artifacts.
Visible mostly on very small buffers as they are malloc()'ed from
previously used memory segments.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre a5abbf784e Evas filters: Add basic support for clip in blend
Right now, clip is used only when blending RGBA surfaces.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre af106ffc81 Evas filters: Import main implementation file
evas_filter.c contains the entry points for the evas filters subsystem,
in particular, the filter API, the (yet very basic) buffer management
system, the command queue and main context handling functions.

Right now, the Evas engine is left untouched, so these implementations
will work ONLY in the software engine.

NOTE: This will not compile on its own (thus, not added to Makefile.am),
as it will require the filter implementations to be linked.
2014-02-07 17:33:16 +09:00