diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 21:25:00 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 21:25:00 +0100 |
commit | 5dea07c31d4d57d8d9aff68f2a9ffd73e828643f (patch) | |
tree | 9f1657e68845dee60179a7d501d57b7005578344 /tools/virtual.c | |
parent | bae41624874fa032c407f4888e7db9a07f8f1d0c (diff) |
intel-virtual-output: Reset the damage just prior to reading it back
Slightly more efficient command packing and reduces a damage race
slightly...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/virtual.c')
-rw-r--r-- | tools/virtual.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index b5959e1e..257f37f3 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -2648,15 +2648,15 @@ int main(int argc, char **argv) DBG(("%s timer expired (count=%ld)\n", DisplayString(ctx.display->dpy), (long)count)); ret = 0; - for (clone = ctx.active; clone; clone = clone->active) - ret |= clone_paint(clone); - if (ctx.active) { DBG(("%s clearing damage\n", DisplayString(ctx.display->dpy))); XDamageSubtract(ctx.display->dpy, ctx.display->damage, None, None); ctx.display->flush = 1; } + for (clone = ctx.active; clone; clone = clone->active) + ret |= clone_paint(clone); + for (i = 0; i < ctx.ndisplay; i++) display_flush(&ctx.display[i]); |