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.