From 5dea07c31d4d57d8d9aff68f2a9ffd73e828643f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 5 Sep 2013 21:25:00 +0100 Subject: [PATCH] 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 --- tools/virtual.c | 6 +++--- 1 file 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]);