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:
@@ -272,14 +272,10 @@ xf86RotateDestroy(xf86CrtcPtr crtc)
|
||||
screenDrawable = &pScreen->root->drawable;
|
||||
/* Free damage structure */
|
||||
if (xf86_config->rotation_damage_registered) {
|
||||
if (screenDrawable)
|
||||
DamageUnregister(screenDrawable,
|
||||
xf86_config->rotation_damage);
|
||||
xf86_config->rotation_damage_registered = FALSE;
|
||||
DisableLimitedSchedulingLatency();
|
||||
}
|
||||
if (screenDrawable)
|
||||
DamageDestroy(xf86_config->rotation_damage);
|
||||
DamageDestroy(xf86_config->rotation_damage);
|
||||
xf86_config->rotation_damage = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user