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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user