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>
This commit is contained in:
Chris Wilson 2013-09-05 21:25:00 +01:00
parent bae4162487
commit 5dea07c31d
1 changed files with 3 additions and 3 deletions

View File

@ -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]);