Commit Graph

24488 Commits

Author SHA1 Message Date
ChunEon Park 8775e0e58d evas/common - fix indentation 2014-02-08 18:36:18 +09:00
ChunEon Park f0b1854d10 evas/common - code clean up
add better descriptive comments.
modify the code for better readibility.
2014-02-08 18:16:09 +09:00
ChunEon Park 738bcb07ff evas/common - more useful comment. 2014-02-08 16:32:52 +09:00
ChunEon Park 72d90c0768 evas/common - code clean up
removed unncessary backet depth in.
2014-02-08 16:26:01 +09:00
Carsten Haitzler 131fc99e79 evas text filter - fix va_arg usage to not cause compiler internal errs 2014-02-08 14:26:50 +09:00
Carsten Haitzler c94252a14c configure - don't add -mfpu-neon on arm - this breaks building for armv6/4... 2014-02-08 14:26:50 +09:00
Jaehwan Kim be4d28be6c ecore_x: fix wrong Atom name. 2014-02-08 12:34:42 +09:00
Carsten Haitzler 078099d63d fix warnings in evas filter plus a memleak in _vflip_cpu() 2014-02-08 12:15:35 +09:00
Carsten Haitzler 3fe36441ef fix distckeck for filter 2014-02-08 12:03:44 +09:00
Tom Hacohen 211845c885 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.
2014-02-07 14:21:26 +00:00
Tom Hacohen c061e76927 Edje entry: always finish selection when mouse is up.
Even when the event is held. This actually needs some better fixing.
2014-02-07 14:21:26 +00:00
ChunEon Park 0541d1ebe6 evas/common - code clean up
one if-else if compare is enough. don't try compare twice.
2014-02-07 22:37:53 +09:00
ChunEon Park fff4661095 evas/common - don't compare if twice. one is enough. 2014-02-07 22:32:35 +09:00
Tom Hacohen 13664f3af1 Evas textblock: Fixed test shadow warnings. 2014-02-07 13:18:38 +00:00
Tom Hacohen 354691e03e 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.
2014-02-07 13:14:21 +00:00
Tom Hacohen 97f625c021 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.
2014-02-07 13:14:21 +00:00
ChunEon Park de8362defe evas/common - code clean up for more readability. 2014-02-07 20:35:35 +09:00
ChunEon Park 4f905edca3 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.
2014-02-07 19:19:19 +09:00
Jean-Philippe Andre 407eaf029c 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.
2014-02-07 18:12:21 +09:00
Jean-Philippe Andre 6d1356adea 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?
2014-02-07 17:59:23 +09:00
Jean-Philippe Andre 9917962ffb 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.
2014-02-07 17:59:23 +09:00
Jean-Philippe Andre 637416d62e 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).
2014-02-07 17:59:18 +09:00
Jean-Philippe Andre 71080b220e 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).
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre 22e94df0f7 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.
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre 9d821a402a 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.
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre a25b212bac Evas filters: Add support for proxies in Edje
They will be defined with the following syntax:
buffer:buf(src=part);
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre 08f2624e6a Evas filters: Implement basic Edje support
Does not support proxies yet.
Implemented as "filter" field in a part.description.text (next
to a "font").
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre e112d49e0b 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.
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre 748501a5af 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.
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre 28d469237b Evas filters: Avoid adding multiple sources under the same name 2014-02-07 17:33:18 +09:00
Jean-Philippe Andre 8570b38dd1 Evas filters: Rename bind to source_set
Because that's what we call it for proxy images :)
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre 7043c8bb89 Evas filters: Disable gauss blur
And fix doc in parser
2014-02-07 17:33:18 +09:00
Jean-Philippe Andre 43962135be 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.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 712566939d 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 :)
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 95550feb30 Evas filters: Fix memory leaks with buffers
In async rendering case, basically all buffers were leaked or
freed from the wrong thread. Fix that :)
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 2e401c2e91 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.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre eea049f988 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.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre bf46a1d26c Evas filters: Simplify clip_to_target 2014-02-07 17:33:17 +09:00
Jean-Philippe Andre c471ee03d6 Evas filters: Fix uninitialized memory access and unsupported call 2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 9c1b323bd3 Evas filters: Fix mapped rendering for mask, blend
If dx, dy are 0, there was a miscalculation of bottom and right,
leading to segvs.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 62d7a2cb3f Evas filters: Implement all rgba mask operation
RGBA + RGBA blended to an RGBA target.
Uses existing infrastructure to combine all buffers together.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 1c9865a8ae 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.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 2d071a2cd4 Evas filters: Fix mask function
Mask iteration was not valid.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 8062df320c 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).
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre f007cd5665 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.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 0135b45c12 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].
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 4c4b44a575 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).
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre e08a8fd934 Evas filters: Remove (never implemented) motion blur 2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 209a7077a0 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.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre d9fb0cdc34 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.
2014-02-07 17:33:17 +09:00