As portions of this code have been derived from existing code in
Weston, we should also be including their copyright/license text to
give credit.
Fixes T3421
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
We're supposed to allocate a large pool at startup and use it for
resizing to save pool allocations. However, this was broken and
we ended up allocating both a large pool and a proper sized pool
every resize.
This restores correct behaviour.
Summary:
printf %m stringifies and prints errno. I've tried to remove its use
anywhere that the immediately preceding function might not set errno
or is a complicated function for which knowing errno doesn't really
give any useful information.
I've left a few of the drmMode calls because they're just wrappers
around ioctl, which legitimately sets errno.
@fix
Reviewers: zmike, devilhorns
Reviewed By: zmike, devilhorns
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3572
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
Summary: We really don't need to be allocating a shm pool this large
during resize, so reduce the size of the pool.
Signed-off-by: Chris Michael <cp.michael@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 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:
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
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: Since the surface_swap functionality is changed now, we no
longer need to bother checking if the leaf is busy as we don't use the
leaf itself inside this function anymore.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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:
We don't need to - all the frame callback does for us is ensure a queue
push.
We should destroy any callback we receive when we receive it.
@fix
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2874
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: This fixes a possible race condition that could happen when
using more than 2 buffers. Instead of searching for a free buffer in
various places, find a free buffer when evas requests the buffer data
and save that free buffer as the 'current buffer'
@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>