damage: Simplify DamageUnregister

You can only register one drawable on a given damage, so there's no
reason to require the caller to specify the drawable, the damage is
enough.  The implementation would do something fairly horrible if you
_did_ pass mismatched drawable and damage, so let's avoid the problem
entirely.

v2: Simplify xf86RotateDestroy even more [anholt]

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson
2013-08-26 14:03:51 -04:00
parent 28708a045d
commit d08966227e
6 changed files with 9 additions and 13 deletions

View File

@@ -205,7 +205,7 @@ compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update)
anyMarked = compMarkWindows(pWin, &pLayerWin);
if (cw->damageRegistered) {
DamageUnregister(&pWin->drawable, cw->damage);
DamageUnregister(cw->damage);
cw->damageRegistered = FALSE;
}
cw->update = CompositeRedirectManual;
@@ -638,7 +638,7 @@ compSetParentPixmap(WindowPtr pWin)
CompWindowPtr cw = GetCompWindow(pWin);
if (cw->damageRegistered) {
DamageUnregister(&pWin->drawable, cw->damage);
DamageUnregister(cw->damage);
cw->damageRegistered = FALSE;
DamageEmpty(cw->damage);
}