By tranversing the whole of the map target's tree,
it decides to update the map surface to be redrawn if one of the objects is changed except the clipper itself.
Wayland subsurfaces can be used as video surfaces too, similarly to
Ecore_X windows. However, they support a different set of features. Some
of them, like subsurface clipping and scaling, might be added in the
future, but so far we must work with what we have.
This commit allows to set an enum bitfield to the Video_Surface, with
the default value being one that will keep the same behavior as before,
for Ecore_X window. Thus, backward compatibility should not be broken.
It's possible to inform Evas that the surface in question is not able to
resize or scale, or that it's above or below the original canvas
surface. This allows Evas to show the surface itself, or use a buffer of
pixels instead, when the capabilities are not available.
If we are running on async render, some operations must be delayed, so
they will happen at the same time that the canvas rendering result gets
updated on the window/surface.
I'm sorry, but those kind of commit messages are unacceptable for code
I'm the only maintainer of. It's bad enough that to have them in the
project in general, but this I won't accept.
I wanted to review this commit, but the lack of explanation about what
you are trying to fix and why you think this is the good fix prevents me
from doing my job. However, without really looking too much into it,
this commit looks wrong. evas_textblock_cursor_format_is_visible_get
should verify there's a format node...
Please come up with a better commit message and re-commit.
This reverts commit fe33aa7408.
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.
This add finally support for JPEG 2000, but be aware that libopenjpeg
is very badly managed. There is currently only version 1.5.x that does
provide the right files, is usable by a third party and portable. You
can seriously forget any other version.
when using genlist and the edje item objects, there seem to be a lot
of excess textblock layouts happening. i was seeing about 12 layouts per tb
part in the edje before this patch. with this it's down to about 3.
Only the key is worth being a stringshare as it is used to do an efficient
binary comparison instead of iterating over all possibility. Also reused
some already known value and a few other speedup.
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
objects that were visible and marked as "render del" rects during render are now detected when they magically change visibility during the same render loop, fixing a very hard to reproduce E19 corner case related to fullscreen client rendering with nocomp disabled
<raster> for now all i can say is "put the patch in and lets see if things break"
Although we kinda use them as max in some situations, they are actually
just the regular ascent and descent. Following commits will make this
separation even stronger.
NB: Master clip is needed so that things don't draw outside the client
area.
NB: This is a partial fix. Still a work in progress. Some remaining
issues with some various elm_tests that use evas_map.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Markup_get was misbehaving and returning wrong results with some escaped
chars. markup_to_utf8 was working correctly. Merged the code together
and now both are consistent and correct.
Thanks to WooHyun for reporting.
Tracking only the async rendering canvases and just waiting for the last one
to finish rendering. This should be enough to sync all canvases since the
render thread orderly executes the commands.
evas_render_sync() will loop through all canvases and wait for their
rendering to finish. Since this function will execute from the main
thread that will sync all of them.
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.
This issue cause non-letter RTL characters not to be detected as RTL
which in turn turned off bidi for those strings.
Example broken text: <RLM><LRO>[PAS<RLO>[--DES<PDF><PDF>.
Thanks to Yakov Goldberg for reporting this issue.
This check is not necessary but causes incorrect clipping issues.
At this moment, if primitive objects (except image) is the source then that code may be helpful but it doesn't guarantee same behavior for all the primitive objects.
So, right now removed it.
NB: Image_Entry passed in to this function Could be NULL (hence the
previous if ie check above. Do not call evas_cache_image_drop on a
NULL Image_Entry as evas_cache_image_drop does not validity checking.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
NOTE: I am tempted to mark evas_object_memfile_set() as deprecated due
to the forced memcpy it introduced and the fact that it is now a 3 lines
of code to do the same in a more efficient way.
This is not the perfect solution at this moment. This doesn't consider the cached clipper's visibility at all.
But at least this would be better than exist works. Should be improved.
as pointed out by y.usishchev@samsung.com - this code is copy & paste
badness, but the compiler optimizer fixed it up already, so it made no
difference in real life.
Since we locked the font_draw mutex earlier, we should unlock it
before we return.
NB: Fixes Coverity CID1039382
Signed-off-by: Chris Michael <cp.michael@samsung.com>
wanted here...Or (!(ob->map->cur.map->count == 4)) ... but not much
difference either way ;)
NB: Fixes Coverity CID1039673
Signed-off-by: Chris Michael <cp.michael@samsung.com>
would not have gotten to this error handler if it did (so no point in
checking for it and calling functions using it).
NB: Fixes Coverity CID1039926
Signed-off-by: Chris Michael <cp.michael@samsung.com>
In some cases we could return extra formats that are outside of the
range. It's actually not completely fixed yet.
Thanks to clang-analyzer for detecting this.
When opening an image, OPEN and SETOPTS were always sent
consecutively. Merging these two messages may improve the
performance a bit (not measured), but also simplify the
whole thing.
Note: cserve2 debug tools have not been fixed yet.
Evas loaders' open() function expect the key to be a stringshare,
so declare it as such and keep using ref() without add().
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Most of the time, the SETOPT message is sent only
to carry 0 data. Let's add a flag to the OPEN message to
avoid useless socket calls.
Server-side: implement with message faking.
Also, fix image ID logic on client side:
- alloc data entry asap,
- assign image_id during call to OPEN
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
The LRU should not be limited to 0 byte otherwise all scaled
images will be dropped and reloaded constantly, killing the
performance.
The size is inspired from the scalecache's size of 4Mb.
Variable: EVAS_CSERVE2_SIZE (number in Mb)
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
evas_common_font_int_cache_glyph_get), then we should free that
allocation when we have an error.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Fixes a memory leaks in evas_common_convert_yuv_42* and actually makes
these functions more useful. It's a win-win.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
NOTE: when using Evas_Object image preload infrastructure the GL texture
upload was uploaded from the main loop during the rendering stage. This
could lead to some frame drop during fast animation due to the time needed
to upload that texture.
This patch fix this problem by uploading a small texture quickly (16x16)
and waiting for going back to the main loop to be able to use the same GL
context from another thread to do the texture upload asynchronously without
blocking the main loop.
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.
In case of EACCESS, there is no point trying forever
In case of EINTR (interrupt), we can consider for now
that any signal will prevent the use of cserve2.
If we don't do that, Ctrl+C simply won't work :)
Evas_GL Direct rendering is an optimization path that renders
directly to the window if conditions are met. Because evas gl
backend used to re-render the entire screen, evas_gl direct
rendering didin't have to concern with partial region rendering.
Now that partial rendering/swapping has been applied to evas gl-
backend, evas_gl direct rendering also had to take into account
clip regions. in order to properly apply it, some adjustments
were made to the engine functions and etc.
This reverts commit 9473c4a9a5.
This commit is not correct. It just goes through every font in the
fontset, which is usually all the fonts in the system and tries to get
their ascent/descent and by that getting the max ascent/descent. This
won't work nicely.
The solution is to properly fix textblock, if you think there's
something lacking (I.e in the same way I did text).
However, my changes did not change previous behaviour, but were just
wrappers, so I don't see why extra changes would be needed. Please
elaborate.
I'm reverting this because:
1. I don't think it's correct.
2. It severly broke e in some cases (reference:
http://www.enlightenment.org/ss/e-51b5d5e98cd387.04568822.png ).
If this function is called recursively, it will free the list of post
callbacks before the list stops being used, which will cause a segfault.
The only place where this seems to happen is on
https://phab.enlightenment.org/T124, probably due to the extensive mouse
events which are launched in an unexpected way.
This bug started happening after commit
164cc07237395f8fe6efa465e4f0c0c4863f78ed, where the
_elm_scroll_page_x_get() started being called by a post_event callback,
and forcing an edje recalc. This recalc triggered another post_event
callback, thus causing the mentioned segfault.
If there's a better way to prevent this from happening, please change
the mentioned code.
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).
Account for the framespace offset on perspective fx and fy of each map
point.
This is just a workaround because I could not understand exactly why it
is needed. When no perspective is used, the viewport is set to the size
of the surface, and each map point seems to be used as is, with no
adjustment being needed.
However, when the map is not flat (perspective is used), a more complex
math is used to find the glViewport size. It ends up being bigger, but
there are some offsets used to compensate that, gc->shared->ax/y, which
are added to each vertex before pushing them. Thus, it seems to me that
the framespace offset should not be added to them, but things are weird
if this is not done.
Anyway, I just added those offsets, and it should not impact on gl_x11
since it's not using framespace, and software engines don't seem to
implement perspective anyway, so it all should be fine.
If anyone understands better what's going on here, please make a proper
fix or at least contact me to explain the problem, and maybe I can fix
it by myself.
It seems some images are fully loaded even when we request
only preload. The load handler will take care of both cases anyway.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
This is an astonishing bug, I wonder since how long it has been there. It
is basically due to the use of void * and a wrong cast. Type checking is
clearly useful, let's use it more !
This causes the textblock layouting problem.
It should be checked when does it really render_pre() called.
If someone knows the reason of this, please ping me.
This reverts commit 3c53b824d8.
This is a bad idea for now, as we need to mark some more events as hot
(including compat generated ones) before doing it.
For native surface rendering (glX, egl) in gl-backend, if pixel get callback
function is called for native rendering, there is a case where evas will
try to call evas_gl_common_context_flush() to flush its remaining commands
in its command queue while the context is set current to the native surface/
context that is called within the pixel get callback. So, I've added an
engine function that forces a flush before it enters the pixel get callback
function.
CEDRIC... it WAS YOU!... YOU BROKE ETHUMB!... i was.. RIGHT! :) well
done. your borking skills are pretty good. :) you broke load opt
downscaling for jpegs in general.. it just happened to turn up in
ethumb.
Before this patch, the proxy will be clipped if the source is clipped by output area even if the soure_clip is disabled,
Additionally, src_clip/src_event/src_visible options must be supported in edje.
Goal is to be able to remove all internal Evas call from inside all
loader module. To do so we are going to open and hold a reference to the
file from outside of the module, read the header, create the image data,
load the data, close that reference.
Once that done, the next step is to let the file remain open as soon as
the filename/key is set and add an API to set an Eina_File directly. This
way edje can maintain the same file open as it use for an edje object,
keeping things in sync and avoid rendering glitch during update.
Ecore_Evas_Input should use this function to report mouse move events.
The previous used function should be used to refeed events, or to
artificially feed mouse move events to the canvas. Basically every other
feed_mouse_move use case that is not an event from the input system.
This function should be used internally by the input system
(Ecore_Evas_Input) to feed Evas with move events. The x,y event info is
relative to the base of the window/surface, instead of the 0,0 of the
canvas.
This case only happens for now under Wayland, where the 0,0 of the
canvas is translated due to the window decorations that are drawn by the
client.
The framespace offset must be taken into account when searching the list
of objects which received events, since the objects now have their
original position.
Instead of moving the objects by adding the framespace offset to them,
use this offset when rendering them. This way there's no change in the
object's geometry/position, it works correctly with map, and will be
automatically updated in case that the framespace values change (for
instance if one sets a window to borderless).
There are 2 main places where changes were needed:
- output redraws, when they come from an object being changed, must be
add the framespace offset to their damaged area;
- checks to see if the object is inside a given rendering area, must
also add this offset, since the object is actually being rendered on
a different position;
Now, Evas.h includes three new files:
- Evas_Eo.h: Eo API functions (functions defines, enums, base id).
- Evas_Legacy.h: contains the API functions related to objects
- Evas_Common.h: common data (structs, enums...) +
functions not related to objects.
This phase is needed for the EFL 1.8 release to disable Eo APIs if we
consider it is not enough mature to be used by applications.
This clipper caused several bugs already, and there are some bugs still
not fixed. Let's remove it and try to fix any remaining with some other
kind of solution that does not depend on adding or clipping objects
during the evas render phase, which causes unexpected behavior.
These objects should be clipped only during rendering, since keeping
them clipped after that allows for unexpected behavior on the
application side. For instance, an application could check if objects
have clippers before doing something to them, assuming that some objects
should have no clipper, but under wayland, after the first render
iteration, there will be no objects without a clipper.
This commit fixes this behavior by unclipping objects that had no
clipper prior to the render iteration.
Additionally, it fixes a bug where a maximized/fullscreen window could
have not all of its content rendered immediately. This was occuring
because some objects could be clipped to the framespace clipper, but
considered invisible in the beginning of the render phase, where they
are evaluated. They were considered invisible because the framespace
clipper object was not resized at that phase yet, and thus these objects
were being clipped out from the viewport.
Eina value type does not support pointer so I used int as of now.
This needs to be converted into hexa later.
By using Clouseau, one can see this Clipper information.
If logical cursor is between LTR/RTL text two cursors will be shown.
Upper cursor is shown for the text of the same direction as
paragraph, lower cursor - for opposite.
NOT DONE YET
Signed-off-by: Tom 'TAsn' Hacohen <tom@stosb.com>
%f causes 0.0000 to always be printed... changed to %d
to get the desired/correct output result.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
If query at x coord, which points to rigth half of LTR char,
next position will be returned. The same for left half of RTL char.
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
Address sanitizer found this. Not really a serious error as text[i] will
be 0 in that case (I believe) and the loop is aborted in any case.
Still, better safe than sorry.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Since the objects are moved by the framespace offset, it must be
considered when populating map points. This is done when the map is
applied to an object (the map points are updated with the framespace
offset of the canvas that is parent of that object.
Additionally, a flag is set on the map struct to indicate that it had
its points updated already to avoid re-adding the offset.
Applications using these functions should not know of any offset. This
patch makes the canvas pointer position to be returned exactly the same
as on X11 backends.
This check makes no sense, since objects can be on outside of the
screen, with negative position, but they still need to be adjusted by
the framespace offset.
Framespace offset adjustment should be applied to every object not
marked with "is_frame".
Additionally, it should be applied only once. Since it is already being
applied on the *_feed_mouse_* functions, there's no need to apply it
again on the _evas_event_source_mouse_* functions, which are called by
the former ones.
Also add the missing adjustment to the feed_mouse_move one.
- mark all children of a given smart object as "is_frame" if the smart
object is also marked as a frame;
- when moving a smart object, use the originally requested move
coordinate to calculate the offset that the children should be moved
too;
- _smart_move_children_relative will fetch the child position with
geometry_get(), this way getting the corrected object position, before
adding the offset.
1. Added evas_obj_image_preload_begin/cancel APIs.
2. Removed evas_obj_image_preload. This accepts 'cancel' as a parameter and it's so confusing to developers.
3. No ChangeLog/NEWS for this change because Eo APIs were not released yet.
4. Discussed with Raster.
5. It's encouraged to use elm_image however. elm_image has elm_image_preload_disabled_set() API.
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.
* Use an Eina_Hash for the garbage collector list.
* Turn off garbage collection on object that are unlikely to match.
This patch make 1.8 as fast as 1.7 again.
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>
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>
Evas_Object_Polygon are a little bit special and track their position
to avoid rebuilding various property when just moved. The offset.{x,y}
are there for that. For a strange reason they got a += instead of just
an = and there our offset did go quickly out of screen...
The _pixel_alpha_get() function used in evas_object_image_is_inside won't
work with engines other than software - since it relies on engine data
being *always* RGBA_Image * - which is wrong for OpenGL backend that uses
Evas_GL_Image * for "engine_data" pointer.
memfile are not used that often like other direct pixels manipulation code.
Merging them into the same structure make sense and reduce the memory cost
for normal image object. Save between 8 to 16 bytes per image object.
SVN revision: 83843
The issue happens when selecting in strings that have both bidi and different
scripts in the same bidi run. E.g: "עבריתenglishрусскийעברית".
SVN revision: 83786