Commit Graph

198 Commits

Author SHA1 Message Date
Youngbok Shin 7a4b65c735 evas/text: fix the issue that size of evas text object be shorten repeatly when ellipsis is shown.
Summary:
When the text was shorten by ellipsis, object size was fit to the text width.
If new text was set to the object, the text calculated with the smaller size.
It made shorten the object size when the text is set repeatly.
If the text is cutted off with ellipsis, it means there is no need to
resize the object.

Test Plan: elementary_test -> FileSelector Entry -> Click "Toggle Folder Only mode" button repeatly.

Reviewers: woohyun, tasn, raster, so.penible.animation, Hermet

Reviewed By: raster

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D636
2014-03-17 19:29:17 +09:00
Daniel Zaoui 9b8f036beb Eolian: Integration of Evas Text 2014-03-09 13:18:57 +02:00
Jean-Philippe Andre 688c9c3676 Evas filters: Minor change (type is void*) 2014-03-07 10:39:55 +09: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 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 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 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 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 56d73cb897 Evas filters: Fix warnings on shadowed variables
Also, remove globals A, R, G, B from parser.c... these are
temp variables used in a macro.

My CFLAGS didn't include -Wshadow so I missed those.
Thanks Tom for spotting :)
2014-02-12 10:36:11 +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
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 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 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 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 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 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 b54eb40006 Evas filters: Optimize Text redraw with filters
Fix case when a proxy source has changed: need to fully render
the effect again.
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 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 f723d8af8f Evas filters: Fix automatic buffers with Evas_Object_Text 2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 22b8377255 Evas filters: Rename Text's special_effect into filter_chain
For consistency with Textblock.
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 0450e027e7 Evas filters: Add Eo APIs and some comments
The entry points on evas text are there!
2014-02-07 17:33:16 +09:00
Tom Hacohen c7addf4083 Changed Eo class names to be consistent.
All the class names are now of the format: Lib_Type_Subtype_Extra.
2013-11-07 11:17:52 +00:00
Cedric Bail 2d54ae83bf evas: force complete items rebuild on evas_object_font_font_set. 2013-11-04 15:28:16 +09:00
Cedric Bail f4ae52ea67 evas: make mmap_set use const Eina_File. 2013-11-04 11:27:59 +09:00
Carsten Haitzler 4eb7b81925 evas - re-fix to use first, last or if item is list head on text recomp 2013-11-03 20:33:05 +09:00
Carsten Haitzler f982f6f0a5 evas - text - only remove item from list if its in a list
this fixes a n eina complaint - valid as elipsis item was being
deleted and it was not in the list of items.
2013-11-02 19:35:45 +09:00
Cedric Bail e9614a9fdd evas: fix uninitialized use of font instance when no font is selected. 2013-10-31 11:02:28 +09:00
Cedric Bail 6bc393e740 evas: fix leak of ellipsis object in Evas_Object_Text. 2013-10-28 19:45:46 +09:00
Cedric Bail 8b01f7b06d evas: fix possible memory leak in the ellipsis code. 2013-10-28 18:44:26 +09:00
Cedric Bail 3abf3a19f4 evas: request ellipsis from the right font. 2013-10-16 17:57:54 +09:00
Cedric Bail 44988e4798 evas: more fix for ellipsis.
This one fix size of the object that didn't take into account the style
of the text since we added the support of ellipsis in Evas. It also
correctly detect when we insert an ellipsis in the text to relayout
properly on resize.
2013-10-02 20:57:29 +09:00
Cedric Bail 4c572c827a evas: we actually need to take those additional value into account. 2013-10-02 20:57:29 +09:00
Cedric Bail 3b93896e54 evas: fix Evas_Object_Text alignment with ellipsis. 2013-10-02 11:02:05 +09:00
Cedric Bail 5487b75635 evas: fix some ellipsis case. 2013-10-01 20:45:21 +09:00
Cedric Bail 2e5a0215e6 evas: reduce number of relayout of text object to the strict minimum. 2013-10-01 16:38:47 +09:00
Tom Hacohen 682c69764d Revert "eo: libs,test,benchmarks Eo_Class -> Eo"
This reverts commit 1714fe93f4.

We actually want this type, it makes things clearer.

Conflicts:
	src/tests/eo/function_overrides/function_overrides_inherit2.c
	src/tests/eo/function_overrides/function_overrides_simple.c
	src/tests/eo/suite/eo_test_class_simple.c
2013-09-27 16:40:32 +01:00
Jérémy Zurcher 1714fe93f4 eo: libs,test,benchmarks Eo_Class -> Eo
Conflicts:
	src/tests/eo/suite/eo_test_general.c
2013-09-27 14:01:46 +01:00
Cedric Bail b37494503f evas: update to new eo_parent_get/set API. 2013-09-25 13:34:18 +09:00
Jean-Philippe Andre cafa763817 evas: Fix sigsegv after font rehint
If a text object is rehinted after it is deleted,
baaad things happen. Mark Evas_Object_Text as dead by
setting font to NULL.

Note the crash happened with cserve2 and maybe not in normal
cases.
2013-09-02 15:00:01 +09:00
Carsten Haitzler 4aaf857fc8 fix apparent tb item leak (definitely lost) 2013-08-27 17:20:56 +09:00
Cedric Bail 35e1ddc6f6 evas: limit resize to always be of the right size.
This should fix T157.
2013-08-05 17:46:37 +09:00
Cedric Bail 48b40640b5 evas: no need to call eo_data_scope_get in many case after this change.
Reduce CPU usage by 5% in some case (especially when the CPU is not the
limiting factor like with the GL backend).
2013-07-09 09:48:09 +09:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Carsten Haitzler c979a52553 fix bug introduced by: f1ba71147e
max ascent/descent are not the same as ascent and descent... get them
specifically.
2013-06-09 17:30:34 +09:00
Tom Hacohen f2317ac875 Evas font: Fix initialization of ascent/descent for empty objects. 2013-06-07 18:09:51 +01:00
Tom Hacohen e1cffeecef Evas text: Removed unused variables. 2013-06-07 18:09:50 +01:00
Tom Hacohen f1ba71147e Evas font: Fixed line size calculation using multiple fonts.
Additional fixes to cc4cf77865.
There were two problems:
1. Usage of max_ascent instead of ascent.
2. Initialization of the ascent value according to the first font,
   instead of 0 (as the first font might not even be used).
2013-06-06 15:42:41 +01:00
Tom Hacohen e81edab826 Evas font: Remove useless multiplication and division.
Does nothing, just looks ugly.
2013-06-06 15:42:41 +01:00
Tom Hacohen cc4cf77865 Evas font/text: Fixed an issue with asc/desc calculation in text object.
Added font_int asc/desc getters in order to achieve that.

Thanks to MinSu Seo for reporting.
2013-05-10 17:48:26 +01:00
Carsten Haitzler f8c9a8d167 revert the revert... damn you git!
Revert "Revert "Efl: replace eo_data_get for objects data referencing.""

This reverts commit b64a2994b3.
2013-05-02 16:47:16 +09:00
Carsten Haitzler b64a2994b3 Revert "Efl: replace eo_data_get for objects data referencing."
This reverts commit 654a3f5f94.
2013-05-02 14:17:19 +09:00
Daniel Zaoui 654a3f5f94 Efl: replace eo_data_get for objects data referencing. 2013-05-01 10:37:08 +03:00
Cedric Bail f1dfbc4e0e evas: remove one useless pointer (-30KB). 2013-04-07 14:00:10 +09:00
Tom Hacohen b7e8bb556d Evas text: Add apparently important NULL checks.
Apparently obj->layer and obj->layer->evas can sometimes be NULL. It is
checked in other objects, for example, image object. Add the checks here
to "fix" a crash reported by Christopher Michael.
2013-03-26 11:09:58 +00:00
Tom Hacohen a170683334 Change usage of eo_do_super to the new prototype. 2013-03-18 16:14:18 +00:00
Cedric BAIL d79a2efa39 evas: use Eina_Cow a lot more and we are closer to the memory size of 1.7. 2013-03-13 14:35:25 +09:00
Cedric BAIL 4d316f3bec eo, evas, edje: reorder structure for reducing memory usage. 2013-03-12 19:17:11 +09:00
Paulo Cavalcanti ddfd471c71 efl/evas/text: Fix rendering issue with changed texts of same size
Introduce a new function called evas_object_content_change(). It should
be used when object contents get changed.

The rendering issue involving text objects was due to its map surfaces
not being freed. Thus, evas_object_content_change() is now called in
evas_object_text_text_set() during the relayout of the text for making
sure to get their map surfaces freed before rendering them.

Signed-off-by: Paulo Cavalcanti <paulo.cavalcanti@linux.intel.com>
2013-03-04 10:21:59 +09:00
Tom Hacohen 1425b0d2dc Evas text: Fixed a bug with the (kinda) newly added text object ellipsis.
There was a problem with bidi texts and ellipsis. The text would be trimmed
according to the visual position instead of the logical.
2013-02-25 15:39:32 +00:00
Tom Hacohen d6dababe78 Evas text: Fixed bug with the text object direction detection. 2013-02-21 13:39:37 +00:00
Daniel Zaoui aa488588d8 evas: Fix Evas Object Text when LTR and RTL are used together.
When harfbuzz is enabled, RTL text (arabic, hebrew...) is displayed differently
if the paragraph begins with or without LTR.
The problem was related to the function evas_common_language_script_type_get
and a wrong offset given as parameter to this function.

Thanks to EunYoung Kim for having found this bug.

Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>
2013-02-19 10:05:46 +02:00
Cedric BAIL 5acb8abc5c efl/evas: fix that awesome memory leak in E17 and every apps that don't change font name.
SVN revision: 83837
2013-02-12 06:07:25 +00:00
Cedric BAIL ad0bb4c6f6 efl/evas: small speed improvement when doing auto sizing of text object.
SVN revision: 83732
2013-02-07 10:48:07 +00:00
Tom Hacohen 70156285b0 Eo dbg: Use eina_value as the debug info type.
SVN revision: 83443
2013-01-29 16:36:01 +00:00
Aharon Hillel 028f059d32 Clouseau-Eo integration: Added debug info functions.
From now, classes implementing the Eo function with id
EO_BASE_SUB_ID_DBG_INFO_GET will be able to show in Clouseau their own
specific information.
Information contents is controlled by the class itself and no more
by Clouseau. Basic types and lists are supported..

Signed-off-by: Aharon Hillel <a.hillel@samsung.com>

SVN revision: 83410
2013-01-29 06:36:23 +00:00
Cedric BAIL d32ee023e3 efl: missing deprecated user.
SVN revision: 83049
2013-01-22 02:14:07 +00:00
Cedric BAIL b395af5e7a efl: stupid micro optimization.
This single test accounted for 1% of my terminology benchmark.
I am considering moving evas_string_char_next_get and
eina_unicode_utf8_get_next to become inline as their function
entry/exit point account for 3% of the same benchmark.

The biggest win would be to get rid of the memcpy _termpty_text_copy
that account for 16%.

In the micro optimization part, we also still do to much malloc
in font_draw_prepare as we don't recycle the array there and account
for 3% of the benchmark in malloc/free there. In the same ballpark
_text_save_top account for 2% of the time in malloc/free.

In that same benchmark, evas_object_textgrid_render account for 5%
where 4% of its time is spend in evas_common_font_draw_prepare. At this
point I am not sure that rewriting textgrid is gona help us at all. We
will win almost as much by just inlining the get_next things in evas
and eina for a minute of development time.


SVN revision: 82927
2013-01-17 09:38:49 +00:00
Tom Hacohen c089f174ca Evas obj text: Fix an issue with horiz_advance_get func.
SVN revision: 82800
2013-01-15 11:50:22 +00:00
Carsten Haitzler 440bb7c23c cut down textprop size a bit... 72 -> 64bytes. if we can wrap
tp->start/len/text_offset/text_len read/wrtie in access funcs. so we
can special case where:

1. start == text_offset == 0 && len == text_len == 1
2. start == text_offset == 0 && len == text_len < 65536
3. start == text_offset == 0 && len == text_len < 256
 


SVN revision: 82692
2013-01-12 08:40:46 +00:00
Leandro Pereira d5f91fd5c2 evas/async_render: do not use async event to unref glyphs
Patch by: Leandro Pereira <leandro@profusion.mobi>



SVN revision: 82662
2013-01-11 19:55:40 +00:00
Cedric BAIL fee7977839 efl: let's preperly clean pointer when we delete stuff.
SVN revision: 82621
2013-01-11 08:31:09 +00:00
Cedric BAIL 4395e416f1 efl: force update of Evas_Object_Text clip cache when geometry change.
SVN revision: 82612
2013-01-11 05:27:17 +00:00
Mike McCormack 8d1683367f efl: Remove unused variables
Signed-off-by: Mike McCormack <mikem@atratus.org>

SVN revision: 82246
2013-01-05 00:06:28 +00:00
ChunEon Park 5cf84bb84a evas - use Eina_Bool
SVN revision: 82035
2013-01-03 05:38:03 +00:00
ChunEon Park bb39010a0a evas - removed unnecessary lines.
in the render main function, it will always reset changed field whenever it calls the post function.



SVN revision: 81974
2013-01-02 11:56:20 +00:00
Carsten Haitzler 5c8c36507e let's use ()'s more and... lets be consistent about the ellipsis
end/start nodes in text so we dont get bitching about removing an item
not in the list (because it isnt?)



SVN revision: 81946
2013-01-01 08:22:46 +00:00
Cedric BAIL e985899c9c efl: and fix a potential memory leak.
SVN revision: 81922
2012-12-31 01:59:00 +00:00
Cedric BAIL db2a8c62f4 efl: fix issue when text didn't get properly replaced.
Thanks to hannes.janetzek@gmail.com !


SVN revision: 81921
2012-12-31 01:49:36 +00:00
Cedric BAIL f9ebc7bdcd evas: simplify logic for ellipsis.
SVN revision: 81773
2012-12-28 00:58:10 +00:00
Leandro Pereira cb10c7d019 evas: Modify software_generic and gl_x11 to with with threaded renderer
SVN revision: 81284
2012-12-18 16:28:55 +00:00
Cedric BAIL 9cbe37a36a efl: another leak-- in Evas_Object_Text.
SVN revision: 81198
2012-12-18 01:31:52 +00:00
Cedric BAIL 6adce01faa efl: fix some of the memory leak.
SVN revision: 81136
2012-12-17 13:04:35 +00:00
Cedric BAIL dbc5d63555 efl: detect all text change properly and don't destroy text if we don't relayout it.
SVN revision: 81061
2012-12-17 03:34:08 +00:00
Carsten Haitzler fc5c62500d warn-- .. but this is suspicios as we goto the end where is_v and
was_v are used... and never do set them.



SVN revision: 81038
2012-12-16 01:49:36 +00:00
Cedric BAIL 24e8207971 efl: should fix some issue related to scale.
SVN revision: 81020
2012-12-15 14:16:08 +00:00
Cedric BAIL c4c7fe5d2d efl: don't skip redraw when needed.
SVN revision: 80921
2012-12-14 09:07:38 +00:00
Cedric BAIL 2ade3fa902 evas: fix case when we were in the middle of a charactere.
SVN revision: 80811
2012-12-13 10:36:00 +00:00
Cedric BAIL 5828c04123 evas: preserve ellipsis.
SVN revision: 80797
2012-12-13 06:50:08 +00:00
Cedric BAIL a3f52650b9 evas: make Evas_Object_Text ellipsis handle faster by not recalculating what was already calculated.
SVN revision: 80790
2012-12-13 05:12:14 +00:00
Cedric BAIL a16f6e2330 evas: add ellipsis support in evas.
Patch done with help from Tom Hacohen.



SVN revision: 80763
2012-12-12 14:05:29 +00:00
Vincent Torri c15e9c6575 merge: and now Evas
I've tested make -j 3 install and it works nicely

I've tested expedite with software and opengl xlib,
and it works. Not tested other engines, so please
report any problems (engines or other) on the ML.

TODO: examples and tests, I'll add them later

ISSUE: Eina_Unicode size check. It indirectly depends on
       eina_config.h, which is created at the end of the
       configure script. So its size is always 0. I don't
       know how that size is used, so I can't do a lot,
       for now.


SVN revision: 78895
2012-11-04 11:51:42 +00:00