platform/upstream/efl.git
10 years agocleanup - Remove the extra copy of the code and use a define instead
Albin Tonnerre [Sun, 9 Feb 2014 10:44:49 +0000 (19:44 +0900)]
cleanup - Remove the extra copy of the code and use a define instead

_op_blend_pan_mas_dp is just a duplication of the code in
_op_blend_pas_mas_dp. Remove the extra copy of the code and use a define
instead; this is what the SSE3 code already does.

10 years agoin case font_instance is null in text_props... avoid using it
Carsten Haitzler (Rasterman) [Sun, 9 Feb 2014 10:39:30 +0000 (19:39 +0900)]
in case font_instance is null in text_props... avoid using it

10 years agoedje - feature - add channel types for sounds and ability to mute them
Carsten Haitzler (Rasterman) [Sun, 9 Feb 2014 10:08:12 +0000 (19:08 +0900)]
edje - feature - add channel types for sounds and ability to mute them

this adds a new feature to be able to assign a sample to a given
"type" of audio channel, and then to be able to mute these from code.

10 years agoformatting - make parse enum easier to read
Carsten Haitzler (Rasterman) [Sun, 9 Feb 2014 04:38:36 +0000 (13:38 +0900)]
formatting - make parse enum easier to read

10 years agoedje_cc - sample play - document speed param and allow wider range
Carsten Haitzler (Rasterman) [Sun, 9 Feb 2014 04:30:23 +0000 (13:30 +0900)]
edje_cc - sample play - document speed param and allow wider range

10 years agoevas/common - add comments for maintainance
ChunEon Park [Sun, 9 Feb 2014 01:14:05 +0000 (10:14 +0900)]
evas/common - add comments for maintainance

10 years agoevas/common - code cleanup
ChunEon Park [Sun, 9 Feb 2014 01:13:02 +0000 (10:13 +0900)]
evas/common - code cleanup

removed white trailing
modified for better readibility.

10 years agonot using changelog during dev now - remove entires since 1.8
Carsten Haitzler (Rasterman) [Sun, 9 Feb 2014 00:47:17 +0000 (09:47 +0900)]
not using changelog during dev now - remove entires since 1.8

10 years agoecore_evas: added window manager rotation to manage the rotation of windows by the WM.
Gwanglim Lee [Sun, 9 Feb 2014 00:46:51 +0000 (09:46 +0900)]
ecore_evas: added window manager rotation to manage the rotation of windows by the WM.

Summary: The window manager rotation allows the WM to controls the rotation of application windows. It is designed to support synchronized rotation for the multiple application windows at same time.

Reviewers: raster, seoz, cedric, Hermet

Reviewed By: raster

CC: cedric
Differential Revision: https://phab.enlightenment.org/D529

10 years agoevas/op_blend: rename LOOP_ALIGNED_U1_A48_SSE3 to LOOP_ALIGNED_U1_A48
Albin Tonnerre [Sun, 9 Feb 2014 00:42:52 +0000 (09:42 +0900)]
evas/op_blend: rename LOOP_ALIGNED_U1_A48_SSE3 to LOOP_ALIGNED_U1_A48

Summary:
There's nothing SSE3-specific about that macro, let's use a more generic name
for it. Since that's just a generic macro, we can also allow non-SSE (eg.
NEON) code to use it if they want to

Reviewers: cedric

CC: cedric
Differential Revision: https://phab.enlightenment.org/D528

10 years agoEvas Textgrid: Don't leak an eina_stringshare when scale_update is
Chris Michael [Sat, 8 Feb 2014 17:16:05 +0000 (17:16 +0000)]
Evas Textgrid: Don't leak an eina_stringshare when scale_update is
called.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
10 years agoAdd quadruple swap mode for partial rendering
Wonsik Jung [Sat, 8 Feb 2014 14:04:04 +0000 (23:04 +0900)]
Add quadruple swap mode for partial rendering

Summary: This patch is for QUADRUPLE window buffers.

Test Plan:
When enlightenment uses quadruple buffers or window system can support quadruple buffers,
application can use quadruple buffers with partial rendering

Reviewers: tasn, seoz, raster

Reviewed By: raster

CC: cedric
Differential Revision: https://phab.enlightenment.org/D527

10 years agoevas - textblock ... fix valign handling to actually work as documented
Carsten Haitzler (Rasterman) [Sat, 8 Feb 2014 13:54:56 +0000 (22:54 +0900)]
evas - textblock ... fix valign handling to actually work as documented

valign handling was really broken. this fixes it to pretty much work
again. ie 0.0 == top, 0.5 == centered, 1.0 == bottom align and -1.0
== baseline. only baseline worked before.

10 years agoevas/common - removed unnecessary handling.
ChunEon Park [Sat, 8 Feb 2014 10:15:09 +0000 (19:15 +0900)]
evas/common - removed unnecessary handling.

Actually the range checking will be accomplished when u, v is decided.
just duplicated.

10 years agoevas/common - removed unused vars.
ChunEon Park [Sat, 8 Feb 2014 09:40:32 +0000 (18:40 +0900)]
evas/common - removed unused vars.

my fault. they were not intended to push in.

10 years agoevas/common - fix indentation
ChunEon Park [Sat, 8 Feb 2014 09:36:18 +0000 (18:36 +0900)]
evas/common - fix indentation

10 years agoevas/common - code clean up
ChunEon Park [Sat, 8 Feb 2014 09:16:09 +0000 (18:16 +0900)]
evas/common - code clean up

add better descriptive comments.
modify the code for better readibility.

10 years agoevas/common - more useful comment.
ChunEon Park [Sat, 8 Feb 2014 07:32:52 +0000 (16:32 +0900)]
evas/common - more useful comment.

10 years agoevas/common - code clean up
ChunEon Park [Sat, 8 Feb 2014 07:26:01 +0000 (16:26 +0900)]
evas/common - code clean up

removed unncessary backet depth in.

10 years agoevas text filter - fix va_arg usage to not cause compiler internal errs
Carsten Haitzler (Rasterman) [Sat, 8 Feb 2014 05:25:07 +0000 (14:25 +0900)]
evas text filter - fix va_arg usage to not cause compiler internal errs

10 years agoconfigure - don't add -mfpu-neon on arm - this breaks building for armv6/4...
Carsten Haitzler (Rasterman) [Sat, 8 Feb 2014 03:55:27 +0000 (12:55 +0900)]
configure - don't add -mfpu-neon on arm - this breaks building for armv6/4...

10 years agoecore_x: fix wrong Atom name.
Jaehwan Kim [Sat, 8 Feb 2014 03:34:42 +0000 (12:34 +0900)]
ecore_x: fix wrong Atom name.

10 years agofix warnings in evas filter plus a memleak in _vflip_cpu()
Carsten Haitzler (Rasterman) [Sat, 8 Feb 2014 03:15:35 +0000 (12:15 +0900)]
fix warnings in evas filter plus a memleak in _vflip_cpu()

10 years agofix distckeck for filter
Carsten Haitzler (Rasterman) [Sat, 8 Feb 2014 02:36:06 +0000 (11:36 +0900)]
fix distckeck for filter

10 years agoEdje entry: Enable allow_set for DEFAULT select mode.
Tom Hacohen [Fri, 7 Feb 2014 14:19:05 +0000 (14:19 +0000)]
Edje entry: Enable allow_set for DEFAULT select mode.

We need to be able to disable selection even when the mode is default.
A good use case is thumb scrolling on a desktop.

10 years agoEdje entry: always finish selection when mouse is up.
Tom Hacohen [Fri, 7 Feb 2014 13:43:06 +0000 (13:43 +0000)]
Edje entry: always finish selection when mouse is up.

Even when the event is held. This actually needs some better fixing.

10 years agoevas/common - code clean up
ChunEon Park [Fri, 7 Feb 2014 13:37:53 +0000 (22:37 +0900)]
evas/common - code clean up

one if-else if compare is enough. don't try compare twice.

10 years agoevas/common - don't compare if twice. one is enough.
ChunEon Park [Fri, 7 Feb 2014 13:31:57 +0000 (22:31 +0900)]
evas/common - don't compare if twice. one is enough.

10 years agoEvas textblock: Fixed test shadow warnings.
Tom Hacohen [Fri, 7 Feb 2014 13:18:38 +0000 (13:18 +0000)]
Evas textblock: Fixed test shadow warnings.

10 years agoEvas textblock: Fixed *_cursor_char_coord_set with some y values.
Tom Hacohen [Fri, 7 Feb 2014 13:05:06 +0000 (13:05 +0000)]
Evas textblock: Fixed *_cursor_char_coord_set with some y values.

Specifically y values that are between par->y and the first ln->y.

This should fix some selection issues with elm.

10 years agoEvas textblock: Added tests for *_cursor_char_coord_set.
Tom Hacohen [Fri, 7 Feb 2014 13:10:54 +0000 (13:10 +0000)]
Evas textblock: Added tests for *_cursor_char_coord_set.

There are issues with values between the beginning of the first par and
the beginning of the first line.

10 years agoevas/common - code clean up for more readability.
ChunEon Park [Fri, 7 Feb 2014 11:35:35 +0000 (20:35 +0900)]
evas/common - code clean up for more readability.

10 years agoevas/common - code cleanup
ChunEon Park [Fri, 7 Feb 2014 08:46:57 +0000 (17:46 +0900)]
evas/common - code cleanup

useless to consider this optimization on these days
this just make people read code much awkward.

And actually the code have been unused.

10 years agoEvas filters: Implement advanced text effects
Jean-Philippe Andre [Fri, 7 Feb 2014 09:12:21 +0000 (18:12 +0900)]
Evas filters: Implement advanced text effects

Add a new module in Evas to implement text effects.
The basic idea is to create some buffers (alpha/rgba),
draw some text into them, and apply various filters in a
sequential way.

A small script language allows you to set a filter to a
text object. This can then be passed through an Eo API
or using Edje directly (under the field description.text.filter).

Right now, the software engine should work fine, but GL rendering
suffers from a few limitations (no scaling and no proxy rendering,
which means a few effects might not work well).

More documentation will follow, and examples as well.

But, please bear in mind: this is a HIGHLY EXPERIMENTAL feature.
I'm including it to EFL 1.9 so that people can play with it,
but it should not be considered stable at this point in time.

10 years agoEvas filters: Disable proxies with the GL engine
Jean-Philippe Andre [Fri, 7 Feb 2014 08:27:27 +0000 (17:27 +0900)]
Evas filters: Disable proxies with the GL engine

Well, proxy sources are rendered to a... GL texture! But we
actually want the image pixels. So we'll need to call glReadPixels
to get them.

Yes, it will be horribly slow. But there isn't really a way around.
This will require a new internal API. For now, just disable the
feature. Hopefully I can make it work soon enough for the release?

10 years agoEvas filters: Fix crash when using the GL backend
Jean-Philippe Andre [Fri, 7 Feb 2014 07:06:46 +0000 (16:06 +0900)]
Evas filters: Fix crash when using the GL backend

Buffer management was broken, and we tried to free the GL texture
as if it were a simple RGBA_Image.

10 years agoEvas filters: Allow calling program_set and source_set in any order
Jean-Philippe Andre [Fri, 7 Feb 2014 05:23:29 +0000 (14:23 +0900)]
Evas filters: Allow calling program_set and source_set in any order

If source_set was called after program_set, then parsing would fail.
It used to work because the program was re-parsed at source_set.
Now, save the code, mark the filter as changed, and reparse again
if the source changed (keep track of invalid programs to avoid
excessive parsing).

10 years agoEvas filters: Prevent buffer creation when running filter
Jean-Philippe Andre [Fri, 7 Feb 2014 02:22:36 +0000 (11:22 +0900)]
Evas filters: Prevent buffer creation when running filter

In async mode, the filter runs in the render thread, so can't
allocate buffers on the fly.
This case should not happen, unless maybe a source has a null
size (eg. it's invisible and not properly rendered).

10 years agoEvas filters: Quick check for existing part name
Jean-Philippe Andre [Wed, 5 Feb 2014 11:35:44 +0000 (20:35 +0900)]
Evas filters: Quick check for existing part name

We just add all buffer source names to the part lookup queue,
so that edje_cc will check that the source part exists.

The final int key is discarded.

10 years agoEvas filters: Fix proxy usage (source unset)
Jean-Philippe Andre [Wed, 5 Feb 2014 11:09:05 +0000 (20:09 +0900)]
Evas filters: Fix proxy usage (source unset)

Proxy sources & objects were not properly unset.
This results either in crashes (especially in the Edje tests)
or dangling objects with tons of references.

Remove the refcount increase/decrease, as it is redundant.
Store pairs proxy+source instead of just the source in all hashes,
so we can unset the is_proxy flag on the proxy when there are no
sources anymore.

10 years agoEvas filters: Add support for proxies in Edje
Jean-Philippe Andre [Wed, 5 Feb 2014 10:40:24 +0000 (19:40 +0900)]
Evas filters: Add support for proxies in Edje

They will be defined with the following syntax:
buffer:buf(src=part);

10 years agoEvas filters: Implement basic Edje support
Jean-Philippe Andre [Wed, 5 Feb 2014 06:36:05 +0000 (15:36 +0900)]
Evas filters: Implement basic Edje support

Does not support proxies yet.
Implemented as "filter" field in a part.description.text (next
to a "font").

10 years agoEvas filters: Check that program code changes before updating
Jean-Philippe Andre [Wed, 5 Feb 2014 06:34:28 +0000 (15:34 +0900)]
Evas filters: Check that program code changes before updating

Save the code and compare with the new one. This way we can
safely call program_set from the edje_calc functions.

10 years agoEvas filters: Add argument src for buffer declaration
Jean-Philippe Andre [Wed, 5 Feb 2014 10:25:14 +0000 (19:25 +0900)]
Evas filters: Add argument src for buffer declaration

Basically, in an edje file, we'll declare buffers manually,
using the "buffer:buf(src=part)" syntax.

10 years agoEvas filters: Avoid adding multiple sources under the same name
Jean-Philippe Andre [Wed, 5 Feb 2014 10:35:45 +0000 (19:35 +0900)]
Evas filters: Avoid adding multiple sources under the same name

10 years agoEvas filters: Rename bind to source_set
Jean-Philippe Andre [Wed, 5 Feb 2014 02:40:10 +0000 (11:40 +0900)]
Evas filters: Rename bind to source_set

Because that's what we call it for proxy images :)

10 years agoEvas filters: Disable gauss blur
Jean-Philippe Andre [Tue, 4 Feb 2014 10:08:08 +0000 (19:08 +0900)]
Evas filters: Disable gauss blur

And fix doc in parser

10 years agoEvas filters: Remove FIXME and unimplemented code
Jean-Philippe Andre [Tue, 4 Feb 2014 03:32:15 +0000 (12:32 +0900)]
Evas filters: Remove FIXME and unimplemented code

Remove compilation warnings: we don't really need cubic
interpolation at this point, we can still add it back
later if wanted.

Also, make it clear that buffer #2 is the output buffer.
Remove meaningless FIXME.

10 years agoEvas filters: Add proxy source only once
Jean-Philippe Andre [Fri, 24 Jan 2014 07:41:21 +0000 (16:41 +0900)]
Evas filters: Add proxy source only once

If the proxy has already been added to the list of
proxy sources, don't add it again. This is for the filters
case where unset isn't even called :)

10 years agoEvas filters: Fix memory leaks with buffers
Jean-Philippe Andre [Fri, 24 Jan 2014 01:54:51 +0000 (10:54 +0900)]
Evas filters: Fix memory leaks with buffers

In async rendering case, basically all buffers were leaked or
freed from the wrong thread. Fix that :)

10 years agoEvas filters: Allocate buffer in the main loop (part 2)
Jean-Philippe Andre [Thu, 23 Jan 2014 07:54:50 +0000 (16:54 +0900)]
Evas filters: Allocate buffer in the main loop (part 2)

Now the allocation is really done in the main loop.
Rendering fails, only happens in case of redraw.

10 years agoEvas filters: Alloc/Dealloc buffers from the main loop only
Jean-Philippe Andre [Thu, 23 Jan 2014 05:58:05 +0000 (14:58 +0900)]
Evas filters: Alloc/Dealloc buffers from the main loop only

This is a problem I didn't spot immediately... but with
tons of nasty consequences.

10 years agoEvas filters: Simplify clip_to_target
Jean-Philippe Andre [Wed, 22 Jan 2014 09:41:00 +0000 (18:41 +0900)]
Evas filters: Simplify clip_to_target

10 years agoEvas filters: Fix uninitialized memory access and unsupported call
Jean-Philippe Andre [Wed, 22 Jan 2014 09:26:09 +0000 (18:26 +0900)]
Evas filters: Fix uninitialized memory access and unsupported call

10 years agoEvas filters: Fix mapped rendering for mask, blend
Jean-Philippe Andre [Wed, 22 Jan 2014 09:19:29 +0000 (18:19 +0900)]
Evas filters: Fix mapped rendering for mask, blend

If dx, dy are 0, there was a miscalculation of bottom and right,
leading to segvs.

10 years agoEvas filters: Implement all rgba mask operation
Jean-Philippe Andre [Wed, 22 Jan 2014 00:41:44 +0000 (09:41 +0900)]
Evas filters: Implement all rgba mask operation

RGBA + RGBA blended to an RGBA target.
Uses existing infrastructure to combine all buffers together.

10 years agoEvas filters: Implement repeat and stretch for rgba to alpha
Jean-Philippe Andre [Tue, 21 Jan 2014 07:49:43 +0000 (16:49 +0900)]
Evas filters: Implement repeat and stretch for rgba to alpha

Use the mapped rendering to implement repeat and stretch
with rgba to alpha buffers blending.
If stretch is required, it will add one more (expensive)
scaling step.

10 years agoEvas filters: Fix mask function
Jean-Philippe Andre [Tue, 21 Jan 2014 07:01:19 +0000 (16:01 +0900)]
Evas filters: Fix mask function

Mask iteration was not valid.

10 years agoEvas filters: OpenGL support part 2.
Jean-Philippe Andre [Fri, 17 Jan 2014 06:05:23 +0000 (15:05 +0900)]
Evas filters: OpenGL support part 2.

This patch implements the final draw from RGBA_Image to the
OpenGL surface. We can even steal the output buffer and
redraw it quickly, without having to re-render everything
(same as in SW).

10 years agoEvas filters: Move font draw inside the filters functions
Jean-Philippe Andre [Fri, 17 Jan 2014 04:32:25 +0000 (13:32 +0900)]
Evas filters: Move font draw inside the filters functions

Since the filters will have to decide on which engine (SW, GL) to
choose from to render the font and the effects, move the font
draw call inside the filters module.

10 years agoEvas filters: OpenGL support part 1.
Jean-Philippe Andre [Fri, 17 Jan 2014 02:19:02 +0000 (11:19 +0900)]
Evas filters: OpenGL support part 1.

Quick and dirty solution to support the OpenGL engine:
[1] Allocate CPU buffers
[2] Render text and process all effects to these buffers
[3] Push final image as an OpenGL texture.

This patch implements [1].

10 years agoEvas fitlers: Implement SLOW font draw to alpha targets
Jean-Philippe Andre [Thu, 16 Jan 2014 05:38:11 +0000 (14:38 +0900)]
Evas fitlers: Implement SLOW font draw to alpha targets

Well, raster did some great job at optimizing font draw... but only
to RGBA32 targets. In this font effects case, we also want to render
text on ALPHA buffers.

For now, reuse the existing alpha blending & glyph decompress
functions. It's MUCH easier, and works. Definitely slower than
decompressing on-the-fly and optimizing everything. But for now,
this will not even be the performance bottleneck in an effect
(blur will be a lot slower).

10 years agoEvas filters: Remove (never implemented) motion blur
Jean-Philippe Andre [Wed, 8 Jan 2014 02:12:03 +0000 (11:12 +0900)]
Evas filters: Remove (never implemented) motion blur

10 years agoEvas filters: Add offset parameter to vflip
Jean-Philippe Andre [Tue, 7 Jan 2014 09:38:22 +0000 (18:38 +0900)]
Evas filters: Add offset parameter to vflip

It is not possible to logically handle padding and offset at the same
time for a proper mirror effect, unless this is handled directly at the
transformation level.

Also, add support for blend() operation padding computation.

10 years agoEvas filters: Add transform filter
Jean-Philippe Andre [Tue, 7 Jan 2014 07:44:10 +0000 (16:44 +0900)]
Evas filters: Add transform filter

This is the simplest solution I can come up with for "mirror" effects.
Displacement maps are HARD to generate and use properly, since the buffer
size is unknown until runtime.
Even if we align the map to the text itself (using the padding information),
it's still hard to describe properly how to apply the displacement map, and
to generate it... So let's just add a simple flip operation.

10 years agoEvas filters: Add padding info to filter runtime context
Jean-Philippe Andre [Tue, 7 Jan 2014 05:55:27 +0000 (14:55 +0900)]
Evas filters: Add padding info to filter runtime context

10 years agoEvas filters: Add support for displacement map alpha
Jean-Philippe Andre [Tue, 7 Jan 2014 02:03:46 +0000 (11:03 +0900)]
Evas filters: Add support for displacement map alpha

Not tested yet!

10 years agoEvas filters: Remove complicated displacement flags
Jean-Philippe Andre [Tue, 7 Jan 2014 01:16:39 +0000 (10:16 +0900)]
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).

10 years agoEvas filters: Optimize Text redraw with filters
Jean-Philippe Andre [Mon, 6 Jan 2014 10:13:36 +0000 (19:13 +0900)]
Evas filters: Optimize Text redraw with filters

Fix case when a proxy source has changed: need to fully render
the effect again.

10 years agoEvas filters: Factorize blend map logic
Jean-Philippe Andre [Mon, 6 Jan 2014 05:44:20 +0000 (14:44 +0900)]
Evas filters: Factorize blend map logic

10 years agoEvas filters: Implement fill mode in blend
Jean-Philippe Andre [Fri, 3 Jan 2014 09:55:54 +0000 (18:55 +0900)]
Evas filters: Implement fill mode in blend

None, repeat (x,y) and stretch (x,y) are now working for RGBA
blending. The same logic shall be applied to alpha as well.

10 years agoEvas filters: Start implementing stretch for blend
Jean-Philippe Andre [Fri, 3 Jan 2014 06:51:17 +0000 (15:51 +0900)]
Evas filters: Start implementing stretch for blend

The fillmode is ignored when blending... for now.
First, implement none and stretch options for RGBA.

10 years agoEvas filters: Reuse output buffer in Text object
Jean-Philippe Andre [Fri, 3 Jan 2014 02:11:40 +0000 (11:11 +0900)]
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.

10 years agoEvas filters: Implement fill with padding
Jean-Philippe Andre [Thu, 2 Jan 2014 09:44:01 +0000 (18:44 +0900)]
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.

10 years agoEvas filters: Fix padding in blur with offset
Jean-Philippe Andre [Thu, 2 Jan 2014 09:04:06 +0000 (18:04 +0900)]
Evas filters: Fix padding in blur with offset

If ox, oy were set, the padding was wrong in blur.

10 years agoEvas filters: Implement curve script API
Jean-Philippe Andre [Thu, 2 Jan 2014 06:57:44 +0000 (15:57 +0900)]
Evas filters: Implement curve script API

Currently supports interpolation modes "none" and "linear".
Cubic interpolation is not implemented yet.

10 years agoEvas filters: Move scaling to a common file
Jean-Philippe Andre [Thu, 2 Jan 2014 03:43:44 +0000 (12:43 +0900)]
Evas filters: Move scaling to a common file

NOTE: Alpha scaling is NOT supported.
It could be faked in 3 expensive steps:
1. Draw to RGBA
2. Scale RGBA
3. Draw to Alpha.

10 years agoEvas filters: Implement mask stretch in RGBA blend
Jean-Philippe Andre [Tue, 31 Dec 2013 10:38:58 +0000 (19:38 +0900)]
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

10 years agoEvas filters: Pass fillmode to the filters
Jean-Philippe Andre [Tue, 31 Dec 2013 08:51:09 +0000 (17:51 +0900)]
Evas filters: Pass fillmode to the filters

I just need to actually implement them, now :)

10 years agoEvas filters: Introduce "fill" mode in script API
Jean-Philippe Andre [Tue, 31 Dec 2013 07:01:06 +0000 (16:01 +0900)]
Evas filters: Introduce "fill" mode in script API

This would mean: repeat (X,Y) or stretch (X,Y), for buffer
operations where it means something (blend, bump, ...)

10 years agoEvas filters: Change default buffer size to input size
Jean-Philippe Andre [Tue, 31 Dec 2013 03:43:03 +0000 (12:43 +0900)]
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.

10 years agoEvas filters: Change buffer creation API in script
Jean-Philippe Andre [Tue, 31 Dec 2013 02:49:18 +0000 (11:49 +0900)]
Evas filters: Change buffer creation API in script

Syntax was: buffer(name=bla,alpha=bool);
Changed to: buffer:bla(alpha);

There's a semicolon between buffer and its name because ALL whitespaces
are discarded. This might prove useful sometime in the future, so let's
keep it this way for now :)

10 years agoEvas filters: Use common color parse function
Jean-Philippe Andre [Mon, 30 Dec 2013 10:28:55 +0000 (19:28 +0900)]
Evas filters: Use common color parse function

10 years agoEvas filters: Fix compilation after merge from master
Jean-Philippe Andre [Mon, 30 Dec 2013 06:43:52 +0000 (15:43 +0900)]
Evas filters: Fix compilation after merge from master

- CRIT becomes CRI

10 years agoEvas filters: Fix automatic buffers with Evas_Object_Text
Jean-Philippe Andre [Fri, 13 Dec 2013 09:17:59 +0000 (18:17 +0900)]
Evas filters: Fix automatic buffers with Evas_Object_Text

10 years agoEvas filters: Reduce padding to the minimum acceptable
Jean-Philippe Andre [Fri, 13 Dec 2013 07:21:59 +0000 (16:21 +0900)]
Evas filters: Reduce padding to the minimum acceptable

Padding was brutally calculated by suming ALL the filters'
individual paddings. Now we try to be a bit smarter and propagate
the padding between buffers in the filter chain.

10 years agoEvas filters: Rename Text's special_effect into filter_chain
Jean-Philippe Andre [Fri, 13 Dec 2013 01:17:13 +0000 (10:17 +0900)]
Evas filters: Rename Text's special_effect into filter_chain

For consistency with Textblock.

10 years agoEvas filters: Disable styles when filter_chain is set
Jean-Philippe Andre [Fri, 13 Dec 2013 01:03:47 +0000 (10:03 +0900)]
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.

10 years agoEvas filters: Add fill command
Jean-Philippe Andre [Thu, 12 Dec 2013 08:46:46 +0000 (17:46 +0900)]
Evas filters: Add fill command

This will simply clear the target buffer with the specified color.

10 years agoEvas filters: Fix blur with small buffers
Jean-Philippe Andre [Thu, 12 Dec 2013 06:58:14 +0000 (15:58 +0900)]
Evas filters: Fix blur with small buffers

If the buffer is smaller than the blur kernel, then artifacts appear
and CRASHES happen because we read/write out of the buffer bounds.

Output buffer must be larger than the kernel diameter.
Input buffer's size is used to reduce the blurring effect on the edges.

10 years agoEvas filters: Clear buffers after allocation
Jean-Philippe Andre [Thu, 12 Dec 2013 06:54:33 +0000 (15:54 +0900)]
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.

10 years agoEvas filters: Use strcasecmp in the parser
Jean-Philippe Andre [Wed, 11 Dec 2013 10:35:24 +0000 (19:35 +0900)]
Evas filters: Use strcasecmp in the parser

We don't care about the case for our language.
EVEN for buffer names, so beware :)

10 years agoEvas filters: Add basic support for clip in blend
Jean-Philippe Andre [Tue, 10 Dec 2013 07:20:45 +0000 (16:20 +0900)]
Evas filters: Add basic support for clip in blend

Right now, clip is used only when blending RGBA surfaces.

10 years agoEvas filters: Allow empty commands
Jean-Philippe Andre [Tue, 10 Dec 2013 06:47:27 +0000 (15:47 +0900)]
Evas filters: Allow empty commands

If an instruction line contains only ';', skip it.
This is a convenience for Textblock and C++ style comments.

10 years agoEvas filters: Add Eo APIs and some comments
Jean-Philippe Andre [Mon, 9 Dec 2013 11:55:38 +0000 (20:55 +0900)]
Evas filters: Add Eo APIs and some comments

The entry points on evas text are there!

10 years agoEvas filters: Add all filters to Makefile
Jean-Philippe Andre [Mon, 9 Dec 2013 11:27:33 +0000 (20:27 +0900)]
Evas filters: Add all filters to Makefile

Compile the following evas_filter files:
- evas_filter.c
- blend.c
- blur.c
- bump.c
- curve.c
- displace.c
- mask.c
- parser.c

10 years agoEvas filters: Implement style parser
Jean-Philippe Andre [Mon, 9 Dec 2013 11:20:33 +0000 (20:20 +0900)]
Evas filters: Implement style parser

So, the (font) effects will be described by a string. It's
basically a new language (yeah yeah sorry), VERY simple, based
on function calls a la Python, with sequential and named arguments.

This string is intended to be passed directly to an evas text object
and embedded into the evas textblock's markup tags.

This file implements both the basic parsing functions, the
compilation of instructions into a queue of commands, and the glue
code for the rest of the filter infrastructure.

10 years agoEvas filters: Implement bump maps
Jean-Philippe Andre [Mon, 9 Dec 2013 07:56:44 +0000 (16:56 +0900)]
Evas filters: Implement bump maps

These bump maps implement two light effects at once:
- 3D Shadows
- Specular lights

The specular light is activated by a flag.
Another flag enables compensation for darkening/whitening of
horizontal surfaces.

NOTE: This implementation is VERY SLOW.
It uses double values and divisions all over the place.
It might be possible to optimize by computing two LUTs before
running the algorithm.

10 years agoEvas filters: Implement displacement maps
Jean-Philippe Andre [Mon, 9 Dec 2013 07:43:52 +0000 (16:43 +0900)]
Evas filters: Implement displacement maps

Displacement maps are a simple but powerful tool to move pixels
around in a buffer, based on a displacement map (image).

Currently, various modes are implemented:
- X, Y or XY displacement
- Alpha map or RGBA map where R and G only are used

An intensity parameter is given as well.

Some of these might not be useful, we can just strip them off when
the final API is decided.

10 years agoEvas filters: Implement color curves filter
Jean-Philippe Andre [Mon, 9 Dec 2013 07:32:38 +0000 (16:32 +0900)]
Evas filters: Implement color curves filter

Color curves are a very simple tool to alter the colors of an image,
on a per-pixel basis. This implementation will simply map each pixel
to a 256 bytes buffer, provided by the application.

NOTE: There are no convenience functions yet for easy curve
generation, but this is the plan (give point A, B, B and interpolate
between them to generate the 256 values array).