Coverity reports this as in incorrect expression because it was
checking cache_entry width <= 0 twice. Fairly safe to assume that the
proper check should be width || height.
Fix CID1368336
Signed-off-by: Chris Michael <cp.michael@samsung.com>
so i had a crash where my bt said the image size is 1x1 but the img
struct said its 0x0, so put in protection to not upload a texture from
a 0x0 image... just for now... because this is odd - the image data is
a real ptr i can access and there should be at least 1 pixel... but i
can't be sure this fixes it as this is one of those "one offs" i cant
reproduce...
@fix
On session recovery the engine needs to be given new copies of the
surface, dmabuf, and shm objects to run in the new connection.
This fixes session recovery breakage introduced when we stopped recreating
the outbuf on reconfigure.
so removing eglSwapInterval() is a very poor idea as then... who knwos
what it is? this broke at least nouveau (under weston AND under
enlightenment). a very skillful b0rk here than i luckily caught
quickly! :)
We have some "vsync" variable cargo culted from somewhere that is never
properly set, so is always 0 because it's in a calloced structure.
It's then used to set eglSwapInterval() to 0 always, which results
in mesa using wl_display_sync() instead of wl_surface_frame() for
its frame ready callback mechanism.
Remove it entirely and use the sensible default swapinterval.
The common code was skipping frame callback when no shell surface was
present - cursors aren't shell surfaces.
Add the frame callback to the common path and remove the bespoke callback
from the cursor code.
This keeps us from accidentally going through the fallback path twice and
crashing. It also clears up some refcounting problems that would have led
to leaked memory in the crash case.
fix T5037
so we had just 128 bytes for path to generic loader utility. in most
cases this is plenty but if you have bizarre symlinks and long paths
we may run out of space, so move up to 4k buffers as this is
realistically the max path len anyway on a system.
@fix
to date if you use async preload we still load the header
synchronously and this can be horrible especially with generic
loaders. there is no way to farm this off to the preload thread. now
there is. youhave to set it as a skip head load option before doing a
file_set AND you need to issue a preload ... but now it's possible.
@feature
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
Summary:
If user bind textureA and want to use it continuously, do not call glBindTexture(textureA) again.
But expect that textureA will be binding.
So EvasGL sould not change binded texture silently.
Restore texture to previous bound one after allocating new texture.
And when destroy texture, reset texture to 0 if it is current bound texture.
Test Plan: Tizen 3.0
Reviewers: wonsik, dkdk, cedric, jpeg
Reviewed By: jpeg
Differential Revision: https://phab.enlightenment.org/D4524
This enables the PNG saver to save images with gray and
alpha + gray colorspaces. GRY8 is usually used for alpha only.
Note: This commit also introduces whitespace changes. Sorry
about the mess, but at least now we have spaces only. Read the
commit with show -w :)
@feature
This fixes evas_object_image_save after changing the orientation
of an image in the GL engine. In SW engine the pixel data is rotated
in memory, so things worked fine from the beginning. In GL we may
have to go through loops and hoops in order to rotate and fetch the
data from the GL texture.
This should fix ce45d44.
If someone's trying to build efl git with 2.5 year old EGL headers they get
a break on missing EGLImage...
We should probably consider keeping an up to date copy of the EGL headers
in efl. There may be someone out there with even older headers.
As suggested by @k-s
I'm pretty sure that this parser will easily fail. Eg. find uchar
properties but it's not r,g,b in this exact order? No color for you.
Find no uchar at all? Fail immediately even if we can handle a
no color situation just fine.
There's actually an array of 2 in gl_x11, but it appears we only use the
first 1, except in an #if 0 block.
I gather this is legacy for some reason - it sure doesn't seem to make
any sense now, so I'm chopping off all the extra array indexes.
Note: I've not changed gl_sdl - it looks like it doesn't use the context
or surface at all and they could just be removed, but I don't build that
one here and don't want to touch it.