Commit Graph

997 Commits

Author SHA1 Message Date
Youngbok Shin cb5026137b evas/font: Added evas_font_path_global_* APIs.
Summary:
These APIs will be used for adding font paths for the application.
The existing APIs for font path, such as evas_font_path_append,
are used for adding font paths to the given evas.
But, these APIs will affect to every evas in the process.

Reviewers: tasn, woohyun, Hermet, seoz

CC: cedric, herdsman

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

@feature
2014-03-11 11:21:56 +00:00
WooHyun Jung 2791c3dc06 evas: Replace EINA_LIST_FOREACH_SAFE to while statement.
Clipees can be cleared before the loop is finished because
evas_object_clip_unset calls smart function of clip_unset.
So, if we use EINA_LIST_FOREACH_SAFE, invalid next list pointer
can be kept and read after obj->clip.clipees is freed.

Thanks to Davide Andreoli for reporting.

@fix
2014-03-11 16:34:56 +09:00
Yossi Kantor 1b2f732d2a Eolian: Integration of Evas Table 2014-03-11 07:37:48 +02:00
Daniel Zaoui e203ec008e Eolian: Integration of Evas Smart Clipped 2014-03-11 07:37:48 +02:00
Daniel Zaoui 44f9da675c Eolian: Integration of Evas Smart 2014-03-11 07:37:47 +02:00
Tom Hacohen cb9a06f550 Evas font: Don't add canvas specific path to the global fontconfig path list.
This will come back when D621 gets in (which implements it correctly).
2014-03-10 16:17:21 +00:00
Tom Hacohen d175b8aa69 Evas textblock: Fix clipping issues with some texts with width > advance.
This happens with many texts. The issue occurs when the width of the
last char is larger than it's advance. Before this patch, we didn't the
width into account when calculating width, thus causing clipping issues
in some cases.
2014-03-10 14:58:18 +00:00
Daniel Zaoui 4e33fd16e2 Eolian: add support of eo_prefix and data.
You can add in the .eo file the eo_prefix:... and data:... in case
you want to override respectively the Eo prefix and the data type.
If "data: null" is used, no data type will be added.
2014-03-10 15:07:05 +02:00
Daniel Zaoui 2fe6c88cf0 Eolian: Integration of Evas Text Grid 2014-03-10 13:28:03 +02:00
Daniel Zaoui ee7541e202 Eolian: Integration of Evas Text Block 2014-03-10 13:28:03 +02:00
Tom Hacohen 4b758f71c1 Evas map: fixed shadow warnings.
evas_map_image_loop is included from within code, so local variables
should not shadow other local variables. I just gave them a more
unique name.
2014-03-10 09:25:21 +00:00
Daniel Zaoui 9b8f036beb Eolian: Integration of Evas Text 2014-03-09 13:18:57 +02:00
Daniel Zaoui b545750bee Eolian: Integration of Evas Rectangle 2014-03-09 13:18:41 +02:00
Daniel Zaoui 1de10ce9fe Eolian: Integration of Evas Polygon 2014-03-09 13:18:17 +02:00
Tom Hacohen 1d79ce75ff Evas line: Fix out of source builds.
The build system only adds top lib dir to include path, so we have to
specifically put the path there.

This should probably be fixed, so we can drop the canvas dir prefix in
our includes altogether, but until then, this is needed.
2014-03-07 09:50:17 +00:00
Jean-Philippe Andre 182eaad43d Evas: Reduce verbosity of alpha functions
And remove commented-out code.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 5a77d1aae0 Evas filters: Reduce verbosity (INF --> DBG) 2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 887585129b Evas filters: Improve detection of the GL engine
According to cedric's horrified comment :)

And add a comment in the code. Yes, this IS a temporary solution,
but the GL engineS being what they are (tons of duplicated code),
I think it's still better for now to just make things work.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre a97844d415 Evas filters: Complete GL support with scaling function
Directly use the scale functions from scalecache when
running the GL engine.

With this, and glReadPixels support, the GL engine support is now
100% complete. It will be DAMN SLOW, but ALL filters should work
in both OpenGL and Software rendering.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 7690e33b49 Evas filters: Implement proxy rendering for GL
Make use of glReadPixel to access the source's pixel data.
Use all classic CPU functions to blend and use that data.
Save pointer to the GL image and update it with the latest data
during target render.

Use ENFN's surface_lock, read_pixels, unlock.

Also, add some more error checks to make sure the images are valid,
or return an error at runtime.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 2225587e5e Evas filters: Allow image copy with the GL engine
For now, this simply uses memcpy.
The SW engine equivalent uses image_draw, which wouldn't work
under the GL engine.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 59f5216391 Evas gl_x11: Add support for glReadPixels
This will be needed by the filters for proxy rendering,
for textures and maps (displacement).

Add new engine functions to unleash the (sluggish) power of glReadPixels.
The idea is to be able to bypass glReadPixels later, so 3 new APIs are
added:
- surface_lock
- surface_read_pixels
- surface_unlock
They must be called in that order.

Note (for history):
glReadPixels was always getting the wrong data during first draw,
but the right data during a redraw...
Why? Well simply because for OpenGL itself, the image had never
been drawn in teh first place! Only the Evas GL context knew
about the image drawing, as it was queued somewhere in the pipe.

One line solution: Call evas_gl_common_context_flush before
doing anything else.
2014-03-07 11:07:09 +09:00
Jean-Philippe Andre 688c9c3676 Evas filters: Minor change (type is void*) 2014-03-07 10:39:55 +09:00
Gustavo Sverzut Barbieri e4c5d75993 evas: @fix convert to 24bits so dst_jump is used properly.
in all other convert functions, dst_jump is provided in pixesl and
multiplied by the number of bytes-per-pixel either explicitly or
implicitly by using a different type for dst pointer (DATA16,
DATA32...).

As in 24 bits we use DATA8 we must explicitly multiply dst_jump by 3.
2014-03-06 11:19:12 -03:00
Tom Hacohen 9110d490e3 Fix evas compilation and installation. 2014-03-06 15:12:51 +02:00
Daniel Zaoui a3e38d7884 Eolian: generation of the first Eo file.
The first object that we generate with Eolian is Evas_Line, as it is a
simple one.
Two files are generated during build:
- the .eo.c contains the APIs definitions invoking Eo, the Eo functions
extracting the parameters and calling the hand written functions and
Eo structures to define the objects. These hand written functions are
located in e.g evas_object_line.c.
- the .eo.h contains the APIs and Eo prototyes.

We will continue with the other objects. If you note something wrong,
please update us asap:
daniel.zaoui@samsung.com
yossi.kantor@samsung.com
2014-03-06 15:12:51 +02:00
Jean-Philippe Andre 8ddfa35da6 Evas filters: Add return value in filter callback
This will inform the client whether an asynchronous filter properly
rendered or not.

I actually don't know any case where rendering can fail at runtime.
2014-03-04 15:17:11 +09:00
Jean-Philippe Andre 752fde1025 Evas cserve2: Fix excessive warnings during shutdown
The global index for fonts will be freed after cserve2 shutdown
but Evas keeps trying to free all its fonts after that.
2014-03-04 14:59:27 +09:00
Jean-Philippe Andre 63a18f3fce Evas filters: Fix errors in Evas_Object::destructor
Remove invalid call to source_unset and call the appropriate
Eo evas_obj_text_filter_source_set in case of Evas_Text with
proxy sources.
2014-03-04 14:17:25 +09:00
Jean-Philippe Andre cc21f8f173 Evas filters: Clean up some duplicate includes
No functional change
2014-03-04 13:58:53 +09:00
Jean-Philippe Andre ac8140ccd1 Evas filters: Rename RGBA_Image::mask.data into image.data8
The structure should not be changed, despite the union modification.

I am renaming for consistency with older branches that had a mask
field in RGBA_Image. Also, the mask.data or data8 is really just
a way to avoid casting between DATA8 and DATA32 (and it shows
clearly what kind of data you are dealing with).
2014-03-04 12:10:29 +09:00
Jean-Philippe Andre 993bd965ed Evas filters: Fix a typo (wrong value checked)
This was all a bad copy and paste :)
2014-03-04 11:52:53 +09:00
Jean-Philippe Andre 51f216973a Evas filters: Minor fix for consistency (clip_to_target)
Make sure sx and sy are properly set.
No need to backport as the function actually expect these values to
be initialized to 0 in the first place.
2014-03-04 11:44:19 +09:00
Jean-Philippe Andre 8e795109ac Evas filters: fix clip to target calculation
It was possible to keep negative values for dx,dy which would
then draw pixels out of bounds (= crash).

Make check crashed after the previous commit.

@fix
2014-03-04 10:37:34 +09:00
Jean-Philippe Andre e05885e0e3 Evas filters: Fallback to normal rendering in case of error
If the filters fail to render at runtime (that is, parsing went fine
but a command failed to run properly), fallback to normal rendering.
This should prevent text from disappearing when using proxies and
the OpenGL engine (for now).
2014-03-04 10:37:34 +09:00
Jean-Philippe Andre c783b8d450 Evas filters: Avoid potential memory leaks
Properly free the buffers when they are not in the current context list.
2014-03-04 10:37:34 +09:00
Jean-Philippe ANDRE 6d4dd3f194 Evas filters: fix random cases of 'dancing text'
In some situations, text with filters would be rendered in an invalid
position (somewhere too high).
I am not entirely sure of the reason why the original code with BLEND
doesn't work, but this new version is simpler as GL and SW have more
similar behaviours:

- render text to our 'output' buffer
- draw this buffer as an image onto the set target

Thanks zmike for reporting the issue.
And thanks A LOT for using the filters :D

@fix

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2014-03-04 10:37:28 +09:00
Jean-Philippe ANDRE 83746e5629 Evas filters: fix black squares with the GL engine
If a text object changes regularily, there might be cases where
the object will be rendered as a simple black rectangle for just
one frame.

It seems that the previous output buffer is deleted before being
actually rendered on screen. This patch will delay the deletion
of the previous buffer until the current one has been rendered
to the target surface.

And again, thanks zmike for reporting.

@fix

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2014-03-04 10:37:19 +09:00
Jean-Philippe ANDRE 7f63b4a3eb Evas filters: Avoid CRI message when using the GL engine
A CRItical message was always displayed when setting a filter
on a text object, saying that proxy rendering is not supported on GL.

Reduce CRI to ERR and skip proxy rendering altogether if there are
no proxy sources.

This @fix needs to be backported.

Thanks zmike for reporting this.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2014-03-04 10:37:03 +09:00
Jean-Philippe Andre a9558235f6 Evas filters: Improve RGBA to alpha conversion (visual quality)
Add weights to the R,G,B components when converting to greyscale.
The weights are those used in the RGB to YCbCr conversion formula.
2014-03-04 10:37:03 +09:00
Jean-Philippe Andre 7a7738e9bb Evas filters: Implement mapped blend for alpha buffers
Allow repeat fillmode in blend() for:
alpha --> alpha
alpha --> rgba
rgba --> alpha

Alpha scaling is not implemented yet, but it is not actually
required. Indeed, only proxies can have a different size and
proxies are RGBA images, not alpha.

Alpha scaling may or may not become a requirement in the future,
or for other purposes, but not yet.
2014-03-04 10:37:03 +09:00
Tom Hacohen 46361148b2 Evas textblock: Implemented mid-contextualization formatting.
There are many situations (e.g all the time with Arabic text) in which
characters change their appearance depending on the context they lie
within. Before this patch, we didn't support changing font appearance
mid-context. So for example one couldn't do "a<color=#f00>b" without
messing up 'a' and 'b's change to their contextual forms.

Although Arabic is a very good example, this also applies to Latin text
in many cases, and should fix some wrong spacing that might have
appeared when changing styles.

@feature
2014-02-28 10:47:56 +00:00
Snacker (Vladimir) 8e17290f19 @feature - Apply NEON intrisics improvement to rotation 2014-02-28 07:04:52 +09:00
WooHyun Jung 6093e68cb0 evas: replace EINA_LIST_FREE to EINA_LIST_FOREACH_SAFE.
EINA_LIST_FREE does eina_list_remove_list, and clip_unset does
the same thing to the same list pointer. So, EINA_LIST_FOREACH_SAFE
is proper for this case.
2014-02-27 10:31:42 +09:00
Jérémy Zurcher f98c1393b8 evas: rename macro EVAS_COMMON_CLASS -> EVAS_COMMON_INTERFACE as it is one 2014-02-26 16:25:00 +01:00
Tom Hacohen 0378e41958 Evas textblock: removed unused internal function. 2014-02-26 12:25:08 +00:00
Jean-Philippe Andre afcbabb004 Doc: Fix filters documentation
Since the doc mentions colors in the examples, fix it to match the
new dox theme :)
2014-02-24 11:18:10 +09:00
Carsten Haitzler 2bb9d9563c textgrid - with new fallback fonts we cant depend on glyph extents anymore
now that glyphs can exceed the bounds of the original query for the
font, there is no pointusing max ascent/descent bounds. back to plain
ascent and decent then so you may get fewer gaps in some fonts. this
fixes font gaps consiering trying to wrk otherwise now is pointless.
2014-02-23 22:25:19 +09:00
Carsten Haitzler 8ca7a21403 textgrid - out-of-bounds chars cause update artifacts - fix.
over-redner by 1 char cell in each direction of an update region to
clean up overflow artifacts.
2014-02-23 22:11:02 +09:00
Tom Hacohen dae9eacb14 Revert "Evas font: Change font fallback to not depend on fontconfig >= 2.11."
It seems that before 2.10, this was not stable, and was causing issues
to some people. I guess we'll have to bring the dependency back, at
least until we can find a better solution.

This reverts commit ec41f67be4.

This fixes T1006.
2014-02-21 09:47:30 +00:00