The outbuf code should free the surface structure, not the dmabuf
abstraction or a use after free occurs on fallback.
Re-organize some code to make sure we don't rely on anything that may
have already been freed.
Add a wl_surface_commit() to keep the animation timer alive through
the fallback process.
This adds a separate backend to the "shm" engine that allows allocation
of buffers via libdrm that can be turned into dmabuf handles and used
with the wayland dmabuf extension.
Currently only the intel buffer manager is supported.
The benefit of dmabuf buffers is that they don't require a texture upload
like shm buffers do, and when we have plane support they can be dropped
directly into a plane without a memcpy.
Split this into two parts, one that makes the base surface, one that
calls the potential back ends.
Once the dmabuf backend is added this will allow a fallback path to
re-initialize the surface as wl_shm if dmabuf fails.
This doesn't really care what the buffers were allocated with, so
let's make this chunk of code useful to both the shm method and the
upcoming dmabuf one
Refactor evas_outbuf_setup a bit so there's only one call to
_evas_shm_surface_create.
Also makes the NULL return on unhandled rotation a lot more obvious.
Prior to this fix, window rotation was not operating correctly and the
surface contents would get rendered at the wrong size and position.
This patch fixes the engine so that rotation operates properly now.
NB: Tested with the Window States(2) test in elementary
Thanks to shiin for reporting :)
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Summary:
wl_surface.damage_buffer() takes surface damage in buffer co-ordinates.
Right now since we don't use wayland's scaling, transforms, or viewports
it's exactly the same as wl_surface.damage(). In the future if we start
using those features it's much easier to do so with damage_buffer().
Reviewers: zmike, devilhorns
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3457
Following this patch, the correct enum type is now passed to this
function. It's also passing the same value (0), but now from the correct
enum. This doesn't change behaviour, and looks like what was intended.
This fixes the clang warning.
Summary: As we loop the regions of the output buffer and accumulate
changes to post, we should be freeing the rectangles when we are done
with them.
@fix
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:
It doesn't redraw anything, it posts a buffer full of data to the
compositor.
Reviewers: zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2887
Summary:
Looks like the recent changes to swap/redraw have fixed a problem with
damage tracking and we no longer need this.
Damage history seems ok without it now.
@fix
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2876
Summary:
The way things were, we'd be committing a buffer we hadn't rendered to
yet.
Now redraw() contains all the attach/damage/commit logic, and swap() is
called afterwards to set up a new target buffer for the next render.
@fix
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2875
Summary: This fixes an issue where we may been missing a frame
callback due to the wl_surface_commit being called before the frame
callback listener was setup. Now we will setup the frame callback
listener before doing any wl_surface_commit so that we don't miss
frames.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This fixes an issue where the wrong swapmode was being
returned to the evas render function. This was causing focused windows
to blink.
NB: Big thanks to Derek for assisting !! :)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: evas_cache and evas_cache2 are expecting the width of the
buffer when caching so just use that directly rather than calculating
bpl.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: As reported by derek & zmike, the previous engine refactor
left some issues where the app would 'flash' during redraws due to
buffer handling. This commit fixes that issue along with flashing
during resize.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This patch set fixes the issue of Evas wayland shm engine
causing crashes when resizing efl apps in the E wayland compositor. It
refactors the evas engine to wait for release events on buffers, and
hooks into frame callbacks so that release events will get triggered
at the appropriate time.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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