xwayland: Do flush GPU work in xwl_present_flush
The Present code sends the idle notification event to the client after
xwl_present_flush returns. If we don't flush our GPU work here, the
client may race to draw another frame to the same buffer, so we may end
up copying (parts of) that new frame instead of the one we meant to.
Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/835
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(Cherry picked from commit 2a2234ad1a
)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
8aad09dd79
commit
87ca1bdf69
|
@ -24,6 +24,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "xwayland.h"
|
#include "xwayland.h"
|
||||||
|
#include "glamor.h"
|
||||||
|
|
||||||
#include <present.h>
|
#include <present.h>
|
||||||
|
|
||||||
|
@ -412,9 +413,7 @@ xwl_present_abort_vblank(WindowPtr present_window,
|
||||||
static void
|
static void
|
||||||
xwl_present_flush(WindowPtr window)
|
xwl_present_flush(WindowPtr window)
|
||||||
{
|
{
|
||||||
/* Only called when a Pixmap is copied instead of flipped,
|
glamor_block_handler(window->drawable.pScreen);
|
||||||
* but in this case we wait on the next block_handler.
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
|
Loading…
Reference in New Issue