This is a huge patch, but keep in mind that 4326 line changes
were automatically generated from the template GLSL files.
This also adds some minor refactors here and there to accomodate
for the new shaders, but nothing crazy.
"GL fast-path" downsampled masks should now look pretty good.
Summary:
cur_tex* are unsigned int, so minus value should not be set.
Also, add cur_texa, cur_texm here.
Test Plan: Local tests
Reviewers: jpeg
Subscribers: mer.kim, wonsik, cedric
Differential Revision: https://phab.enlightenment.org/D3036
Summary:
The server can render, only after the server get the OP_SHOW from the client.
However, if the server relaunches while client is running, the server cannot get the OP_SHOW.
In this case, the client should send the OP_SHOW, when the server is added.
Test Plan: Relaunch a server especially the indicator, while client is running.
Reviewers: raster, cedric, Hermet, woohyun, jaehwan, jypark, jpeg
Subscribers: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D3028
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
After clip_image_get, the old mask may be replaced by a new one,
and unref'ed, but it is later on set back as the context mask image.
Maybe it's possible that there was 0 reference and the image
got freed in between.
No idea how to test this.
@fix
Okay, I'm being paranoid and this can't possibly happen (calloc
fail? yeaaaah) but this makes sure we don't return NULL after
freeing the original image.
evas gl common was simply resetting to the wrong texture id in the gl
context struct - it was using pipe[0] not state.current. why i don't
know. i know i wrote the pipe[0] code many years ago - really don';t
know. it may have been a transitional piece of code that just happened
t6o work 99% of the time that never got fixe when i added pipes.
@fix
this pulls yuv in line with yuy2 textures and dobule buffers them.
this is a workaround some driver bugs where either the driver doesnt
block and wait for the gpu to finish with a texture when updating OR
it does wait, and when it does it blocks and spins using cpu.
so... if you load a non-jp2k file using openjpeg, you can get an abort
deep inside the openjpeg library that we can't do anything about. we
set all error handlers but literally the openjpeg code has ab assert
there that causes this bug. it shouldn't and newer opengjpeg libs have
it removed, but 1.5.2 has it and this causes an untrappable crash.
this is simply bad behavior in openjpeg not allowing it to be used
safely to loade image files. the relevant backtrace:
w=w@entry=0x7fffffffb548, h=h@entry=0x7fffffffb54c,
alpha=alpha@entry=0x7fffffffb556 "", map=map@entry=0x7fff29ac2000,
length=<optimized out>, error=error@entry=0x7fffffffb5bc,
opts=<optimized out>)
at modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c:111
the relevant code in openjpeg:
int cio_numbytesleft(opj_cio_t *cio) {
assert((cio->end - cio->bp) >= 0);
return cio->end - cio->bp;
}
so that assert is triggered. and nothing can be done about it which is
pretty poor.
so an upgrade of openjpeg should fix this as in newer versions have
dropped the assert line in that function, but until poeople have that from
their distro, this adds magic number checks for file headers that avoids
using openjpeg if it's not "apparently" a jp2k file. this does not
stop a corrupt file or a maliciously designed file still causing this
problem, but it does just result in an abort() and isnn't seemingly an
overflow isse that can be exploted, so if you still suffer, find a way to
upgrade openjpeg to 2.x. until then... this reduces inadvertent damage.
@fix
Summary:
When Evas GL apis are called outside of on pixels callback,
evas gl backend context may have been made current, and Evas GL will
render into a wrong context.
So here we provide context restore mechanism of keeping track of
currently bound context and calling make current when needed.
@feature
Test Plan: Run Evas GL test cases
Reviewers: jpeg, cedric
Subscribers: mythri, mer.kim, wonsik, cedric
Differential Revision: https://phab.enlightenment.org/D2956
Summary: if EGL_KHR_partial_update extension is implemented in the
driver, set damage region. This is done before the draw calls.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Some files were still including SDL-1 headers even though we only link
against SDL2 libs.
URL: https://bugs.gentoo.org/551882
Reported-by: Barnaby <badbit@me.com>
Reported-by: Romain Naour <romain.naour@openwide.fr>
Summary:
If EGL_KHR_partial_update extension is implemented by the driver,
set the damage region. This is done before the draw calls.
@feature
Reviewers: wonsik, spacegrapher, jpeg
Reviewed By: spacegrapher
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2828
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
The root cause of the crash is freed memory.
The evas_object_image_data_set api called with extn buffer in _ipc_server_data.
But there is no inform to render when free this buffer.
@fix
Reviewers: Hermet, jpeg, jypark
Subscribers: stefan_schmidt, cedric
Differential Revision: https://phab.enlightenment.org/D2902
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Summary: This fixes T2625 where launching filemanager would cause a
deadlock. The issue here is that wl_display_dispatch actually uses
poll() which will block and wait, while using
wl_display_dispatch_pending does not case any blocking.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
This fixes a rendering issue with wayland apps. We consume all buffers then
drop any attempted renders that take place while we have no buffers.
This fix now waits for the server to give us some buffers back.
This is the cause of T2612
@fix
#Kansas
Reviewers: zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2897
Summary: As we no longer need the wdata here (see previous commit), we
can remove the usage of this variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This function should really not be called here as it triggers
an xdg_surface_set_window_geometry call which (in turn) should only be
getting called when the window geometry (meaning visible region)
itself has changed.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: As we need access to the wl_display in order to dispatch
events on the queue while we wait for free buffers, pass it in to the
surface creation function and set it in the Shm_Surface structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: These functions need to have an additional wl_display
parameter so that we can set the field inside the Surface structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: In order to fix an existing rendering issue, we need access
to the wl_display so that we can dispatch events on the que while we
wait for a free buffer
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This sets the wl_display field of the Evas engine info
structure so that the wl_display can later be used for dispatching
queue while we await a free buffer
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This just adds a field so we have some place to store the
wl_display for use in the evas wayland engine
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This fixes a crash which Could occur if no outbuf depth was
given during a call to reconfigure.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
We now track each shm buffer's time since last draw so evas can tell
what it needs to re-render.
Reviewers: zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2893
Summary:
This is when we're about to start a new render, so it's the best
time to set up the next buffer to draw to.
Reviewers: zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2892
Summary:
We already have *current, but we're not using it properly. Let's throw
out curr_buff and just use *current.
This temporarily makes swapmode_get do full renders, this will be
fixed in a future commit that adds proper buffer ages.
Reviewers: zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2890
Summary:
Split out the buffer picking stuff because we're going to want to call
it from somewhere else.
Reviewers: zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2889