Commit Graph

76 Commits

Author SHA1 Message Date
Youngbok Shin 1750410650 evas: Add scale feature for embedded bitmap fonts.
Summary:
When evas selects a strike of embedded bitmap font,
calculate ratio and use it for scaling embedded bitmap.
@feature

Reviewers: jpeg, tasn, woohyun, raster, herdsman

Reviewed By: raster

Subscribers: charlesmilette, Francesco149, cedric

Differential Revision: https://phab.enlightenment.org/D2713
2017-09-26 11:31:31 +09:00
Bryce Harrington c955625c44 evas: Textgrid doxygen grammar/spelling cleanup
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5177
2017-09-19 16:55:37 +09:00
Jean Guyomarc'h 9e3a344454 evas: fix invalid return of evas_textgrid_cellrow_get()
evas_textgrid_cellrow_get() is supposed to return NULL if the row index
fed to the function is outside of the textgrid's range. It was instead
returning garbage pointer.

@fix
2017-08-29 20:56:31 +02:00
Cedric BAIL ef55155e0e evas: switch font backend function to rely on engine instead of output. 2017-08-25 10:51:24 -07:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Cedric BAIL 35e54acc46 evas: stat introducing a concept of engine and output in the backend. 2017-05-12 15:24:45 -07:00
Cedric BAIL 55e1b3f205 evas: remove engine.data.output.
This is the first step toward handling multi output. This patch
remove engine.data.output from Evas structure and use an Eina_List
for it instead. It also start moving code around to fetch an output
or an engine context (which are the same at the moment, but will be
split in a later patch).
2017-04-24 15:10:48 -07:00
Daniel Kolesa 3fb4bc336e eo: hide dbg_info from eo files
Continues b780cf2af2.
2017-04-21 17:59:32 +02:00
Carsten Haitzler 51638afbeb evas render - drop eo overhead by using ptrs we already have
several calls, specifically evas_object_change_reset,
evas_object_cur_prev, and evas_object_clip_changes_clean that are
called directly or indirectly as part of evas render on at least every
active object if not more, were doing full eo obj lookups when their
calling functions already all had the eo protected data looked up.
tha's silly and just adds overhead we don't need. my test dropped
_eo_obj_pointer_get overhead in perf profiles from 4.48% to 2.65%. see:

   4.48%  libeo.so.1.18.99            [.] _eo_obj_pointer_get
   4.23%  libevas.so.1.18.99          [.] evas_render_updates_internal
   2.61%  libevas.so.1.18.99          [.] evas_render_updates_internal_loop
   1.68%  libeo.so.1.18.99            [.] efl_data_scope_get
   1.57%  libc-2.24.so                [.] _int_malloc
   1.42%  libevas.so.1.18.99          [.] evas_object_smart_changed_get
   1.09%  libevas.so.1.18.99          [.] evas_object_clip_recalc.part.37
   1.08%  libpthread-2.24.so          [.] pthread_getspecific
   1.05%  libevas.so.1.18.99          [.] efl_canvas_object_class_get
   1.01%  libevas.so.1.18.99          [.] evas_object_cur_prev
   0.99%  libeo.so.1.18.99            [.] _efl_object_event_callback_legacy_call
   0.87%  libevas.so.1.18.99          [.] _evas_render_phase1_object_ctx_render_cache_append
   0.82%  libpthread-2.24.so          [.] pthread_mutex_lock
   0.81%  libevas.so.1.18.99          [.] _evas_render_phase1_object_process
   0.79%  libc-2.24.so                [.] _int_free

vs now the improved:

   4.82%  libevas.so.1.18.99          [.] evas_render_updates_internal
   3.44%  libevas.so.1.18.99          [.] evas_render_updates_internal_loop
   2.65%  libeo.so.1.18.99            [.] _eo_obj_pointer_get
   2.22%  libc-2.24.so                [.] _int_malloc
   1.46%  libevas.so.1.18.99          [.] evas_object_smart_changed_get
   1.04%  libeo.so.1.18.99            [.] _efl_object_event_callback_legacy_call
   1.03%  libevas.so.1.18.99          [.] _evas_render_phase1_object_ctx_render_cache_append
   0.97%  libeina.so.1.18.99          [.] eina_chained_mempool_malloc
   0.93%  libevas.so.1.18.99          [.] evas_object_clip_recalc.part.37
   0.92%  libpthread-2.24.so          [.] pthread_mutex_lock
   0.91%  libevas.so.1.18.99          [.] _evas_render_phase1_object_process
   0.84%  libc-2.24.so                [.] _int_free
   0.84%  libevas.so.1.18.99          [.] evas_object_cur_prev
   0.83%  libeina.so.1.18.99          [.] eina_chained_mempool_free
   0.80%  libeo.so.1.18.99            [.] efl_data_scope_get

of course other things "increase their percentage" as oe overhead now
dropped, and things seem to move around a bit, but it does make sense
to do this with no downsides i can see as we already are accessing the
protected data ptr in the parent func.
2017-02-04 11:49:56 +09:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Carsten Haitzler b0530aba4f evas cutouts - quickly avoid huge per issues with large nos of cutouts
i found evas_common_draw_context_apply_cutouts() was procsessing 300+
cutouts and as it's O(n^2)/2 to try and merge adjacent rects for
cutouts this really performs like complete junk. we apply cutout rects
a LOT. this is not the best solution, but it's quick and much faster
than doing the clipouts which drop framerate to like 1-2fps or so in the
nasty case i say (tyls -m of photos in a dir with a 2160 high
terminal).

this figures out the target area to limit the count of rects
significantly so O(n^2) is far far better when n is now < 10 most of
the time. and for the few operations where it's a high value this now
uses qsort to speed up merges etc. etc.

@optimize
2017-01-02 18:53:56 +09:00
Chris Michael 656df71b96 evas: remove float comparison warnings for evas_object_textgrid
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Guilherme Iscaro 484dae76e6 Evas: Add support for per mouse pointer mode/properties.
This patch introduces the possibility to set the pointer mode and
query other properties like current position per pointer device.
The old API will still works, however it will only act on the default seat.
2016-12-02 09:57:50 -02:00
Carsten Haitzler a479745e4f evas - add a prepare stage for objects before render
preparing an object is a good idea. especially with gl. you want to do
texture uploads BEFORE using textures all in one batch. otherwise this
may mean the gl implementation has to make a copy of your data in a
tmp location then copy it in later when texture becomes "unused" as it
may be in use at the moment, or it may have to stall and wait.

i have seen somewhere around 7-10% speedups on nvidia and intel
drivers with this on given a very special test case i brewed up (1000
32x32 images where i change 1 pixel every frame). this should have
impact really when we are modifying textures a lot. this is all i've
implemented for now, but this should/would/could do much more like
re-order map, proxy renders to render FIRST in a pre-render list
instead of inline and to pre-render fbo/buffer content for complex
objects like text or textblock etc.
2016-11-17 18:41:31 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Boris Faure 4c07f52de6 evas textgrid: unset style when trying to load bold/italic
Ref T4323

@fix
2016-08-13 00:29:05 +02:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Jean Guyomarc'h 147ef32b2b efl: fix misleading indentation
GCC's -Wmisleading-indentation is complaining...
It is a warning flag introduced in GCC 6.x, and
is enabled by -Wall.
2016-05-18 21:57:02 +02:00
Boris Faure 65892e2d8a evas_object_textgrid: try bolditalic if original is book 2016-03-23 15:32:50 +01:00
Boris Faure bdec343985 evas_object_textgrid: also try bold font when original is of weight Book
and add debug
2016-03-23 15:28:13 +01:00
Boris Faure b0d039aa02 evas_text_grid: display bold/italic/bolditalic fonts if available 2016-03-12 18:42:50 +01:00
Boris Faure f3dc094310 evas_text_grid: remove optimisation (will come back later) to make code more readable 2016-03-12 18:10:03 +01:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Youngbok Shin 33ea565347 Evas: Use proper language for harfbuzz shaping
Summary:
Evas Text, Textblock, Textgrid keeps own language information.
This language information could be vary from the result of setlocale().
Especially, Evas Textblock supports <lang> tag. The language could be
changed in the middle of text. All of these language has to be used
for harfbuzz shaping.
@fix

Test Plan: N/A

Reviewers: herdsman, raster, woohyun, tasn

Reviewed By: tasn

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3628
2016-02-04 10:07:08 +00:00
Youngbok Shin 757f842992 Evas textgrid: Use default language according to locale
Summary:
Use default language according to locale.
It's the same as the recent changes on Evas Text, Textblock.
@feature

Test Plan: N/A

Reviewers: herdsman, raster, tasn

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3642
2016-02-03 09:34:32 +00:00
Boris Faure 1df1b23e21 evas:textgrid: correctly check malloc failures 2015-09-01 23:38:43 +02:00
Boris Faure 7a7d3c4022 evas:textgrid: rename text_props to text_props_index 2015-09-01 23:38:43 +02:00
Daniel Kolesa c4d666805d evas: fix missing render2_walk initializers
This caused annoying compiler warnings that are gone now.

@fix
2015-07-21 13:54:23 +01:00
Daniel Kolesa c709f1dca2 eolian/generator: constify all prototypes for @const functions
Otherwise there would be conflicts in certain circumstances.

This also requires adding const on many existing functions,
and similar work is necessary in Elementary.

@fix
2015-06-25 12:18:43 +01:00
Daniel Hirt ed01a32c13 evas: move evas_object_inject to super's ctor
Summary:
As we always call evas_object_inject in every Evas Object's ctcor,
it seems sensible to move this repeated bit of code to the super
(Evas.Object).

Test Plan: Expedite, Elementary_Test and pretty much everything

Reviewers: cedric, raster

Subscribers: JackDanielZ, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-11 09:58:13 +02:00
Tom Hacohen 6efbfe227a Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.

This is one of the final steps towards stabilizing Eo.

@feature
2015-05-20 13:03:24 +01:00
Carsten Haitzler 7c5f92d702 evas - render - have lock point to allow for async obj walk + update add
this adds a lock for when walking all the objects to generate render
commands for an async render. this allows even the object tree walk
plus update area caluclation to be moved off into async if every oject
that can change canvas state actually does so correctly. this change
adds all those lock block calls to synchronise with an async object
tree walk.
2015-02-12 11:06:40 +09:00
Carsten Haitzler becd02aaa6 evas textgrid - fix drawing of codepoints that are 0
this fixes artifacts if you have cells with 0 codepoints and also have
underlines or strikethroughs in them.

@fix
2015-01-07 22:29:00 +09:00
Andy Williams ed7b41ce53 Make it clear in documentation that these methods are not implemented.
Even so return a more meaningful value - 0 is not a member of the Enum it returns.
2014-12-29 16:54:50 +00:00
Srivardhan Hebbar 28f0f7044a evas: fix memory leak issues in evas_object_textgrid.
Summary:
Calling eina_inarray_free to fix the memory leak issue in the error condition.

@fix

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-25 21:31:06 +01:00
Tom Hacohen a7560dbc61 Eo: Change eo_add/del/unref behaviour.
Before this change eo_add() used to create an object with 1 ref, and if
the object had a parent, a second ref.
Now, eo_add() always returns an object with 1 ref, and eo_add_ref()
    preserves the old behaviour (for bindings).

eo_unref now un-parents if refcount is 0, and eo_del() is an alias for
eo_unref (will change to be a way to ensure an object is dead and goes
        to zombie-land even if still refed).
2014-09-25 17:38:45 +01:00
Tom Hacohen ceada9523f Efl interfaces: Drop interface namespace from the used interfaces.
We don't need this namespace, it just makes the names long and complicated.
2014-08-21 11:02:11 +01:00
Tom Hacohen bf55348a92 Efl interfaces: Start using the text_properties interface. 2014-08-21 11:02:11 +01:00
Tom Hacohen 0fc3279db9 Efl: Update code to use the new class names generated by eolian. 2014-06-03 11:28:01 +01:00
ChunEon Park c399017cef evas - removed unncessary header include
it's already done in evas_common_private.h. no need it in each file.
2014-04-29 15:44:29 +09:00
Tom Hacohen 35525a53e0 Adjust eo_do calls to work with the eo2 api. 2014-04-10 04:20:21 +01:00
Daniel Zaoui 6fd341a449 Eolian: Fix ctor/dtor generation 2014-03-19 07:04:28 +02:00
Daniel Zaoui 2fe6c88cf0 Eolian: Integration of Evas Text Grid 2014-03-10 13:28:03 +02: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
Chris Michael 6e1b9de112 Evas Textgrid: Don't leak an eina_stringshare when scale_update is
called.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2014-02-08 17:17:25 +00:00
Carsten Haitzler aa761eaae9 evas - textgrid - clear up unused var warning 2014-01-24 10:01:23 +09:00