xf86/modes: Fix shadow rotation crashing when screen pixmap changes

Driver may change screen pixmaps after page flipping that would then
make damage lose track of the root pixmap.

Using root window for shadow damages fixes the problem because
SetWindowPixmap is implemented in shadow code.

Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Pauli Nieminen 2011-09-22 18:38:53 +03:00 committed by Keith Packard
parent f5d50b46dd
commit 463dd87062

View File

@ -198,7 +198,7 @@ xf86RotatePrepare (ScreenPtr pScreen)
if (!xf86_config->rotation_damage_registered)
{
/* Hook damage to screen pixmap */
DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
DamageRegister (&pScreen->root->drawable,
xf86_config->rotation_damage);
xf86_config->rotation_damage_registered = TRUE;
EnableLimitedSchedulingLatency();
@ -305,7 +305,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
/* Free damage structure */
if (xf86_config->rotation_damage_registered)
{
DamageUnregister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
DamageUnregister (&pScreen->root->drawable,
xf86_config->rotation_damage);
xf86_config->rotation_damage_registered = FALSE;
DisableLimitedSchedulingLatency();