summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-04-18 11:34:07 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-04-18 11:36:28 +0100
commitfdc28205d590d560a6f3886189ef974d1d00f2cd (patch)
treee1edc472c07015287ae58b10c705c72ae13fbb44
parent924237efbddb167efc7f9f3bde42b32ffc538ee3 (diff)
sna: Always flush the shadow scanout
When the shadow scanout is active, make sure we call the BlockHandler every time, not just when we about to sleep. This is in case we are swamped by clients trying to render and forgo the important step of ensuring that their output reaches the screen. Reported-by: Ildar Nurislamov <absorbb@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_driver.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 42065f1b..51f224e5 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -627,6 +627,14 @@ cleanup:
return FALSE;
}
+static bool has_shadow(struct sna *sna)
+{
+ if (!sna->mode.shadow_damage)
+ return false;
+
+ return RegionNotEmpty(DamageRegion(sna->mode.shadow_damage));
+}
+
static void
sna_block_handler(BLOCKHANDLER_ARGS_DECL)
{
@@ -642,7 +650,7 @@ sna_block_handler(BLOCKHANDLER_ARGS_DECL)
sna->BlockHandler(BLOCKHANDLER_ARGS);
- if (*tv == NULL || ((*tv)->tv_usec | (*tv)->tv_sec))
+ if (*tv == NULL || ((*tv)->tv_usec | (*tv)->tv_sec) || has_shadow(sna))
sna_accel_block_handler(sna, tv);
}