Commit 2a2234ad authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

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 xorg/xserver#835

Reviewed-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
parent cd999f08
Pipeline #84993 passed with stages
in 5 minutes and 16 seconds
......@@ -24,6 +24,7 @@
*/
#include "xwayland.h"
#include "glamor.h"
#include <present.h>
......@@ -409,9 +410,7 @@ xwl_present_abort_vblank(WindowPtr present_window,
static void
xwl_present_flush(WindowPtr window)
{
/* Only called when a Pixmap is copied instead of flipped,
* but in this case we wait on the next block_handler.
*/
glamor_block_handler(window->drawable.pScreen);
}
static Bool
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment