Skip to content

Commit

Permalink
Set DamageSetReportAfterOp to true for the damage extension
Browse files Browse the repository at this point in the history
Change the damage extension reporter to queue up events after we chain
to the wrapped functions.  Damage events are typically sent out after
the rendering happens anyway, since we submit batch buffers from the
flush callback chain and then flush client io buffers.  Compositing
managers relie on this order, and there is no way we could reliably
provide damage events to clients before the rendering happens anyway.

By queueing up the damage events before the rendering happens, there's
a risk that the client io buffer may overflow and send the damage
events to the client before the driver has even seen the rendering
request.  Reporting damage events after the rendering fixes this
corner case and better corresponds with how we expect this to work.

Signed-off-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Keith Packard <[email protected]>
(cherry picked from commit 8d7b7a0)
[anholt: re-applied to revert the revert, now that the cause of the
revert is fixed]
Signed-off-by: Keith Packard <[email protected]>
  • Loading branch information
krh authored and keith-packard committed Nov 10, 2010
1 parent f36153e commit 333b6ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions damageext/damageext.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ ProcDamageCreate (ClientPtr client)
if (!AddResource (stuff->damage, DamageExtType, (pointer) pDamageExt))
return BadAlloc;

DamageSetReportAfterOp (pDamageExt->pDamage, TRUE);
DamageRegister (pDamageExt->pDrawable, pDamageExt->pDamage);

if (pDrawable->type == DRAWABLE_WINDOW)
Expand Down

0 comments on commit 333b6ed

Please sign in to comment.