Damage re-used shadow scanout buffer using new transforms.

When the shadow scanout buffer can be re-used, the underlying framebuffer
area must be damaged so that the scanout will be repainted. This patch
delays the addition of that damaged area until after the transform in the
crtc has been updated, otherwise the old transform would have been used and
the wrong area repainted.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2009-02-03 20:15:41 -08:00
parent 62fc98cb88
commit 763df9eec7

View File

@ -406,6 +406,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
int new_width = 0;
int new_height = 0;
RRTransformPtr transform = NULL;
Bool damage = FALSE;
if (crtc->transformPresent)
transform = &crtc->transform;
@ -466,7 +467,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
else
{
/* mark shadowed area as damaged so it will be repainted */
xf86CrtcDamageShadow (crtc);
damage = TRUE;
}
if (!xf86_config->rotation_damage)
@ -540,6 +541,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
crtc->bounds.y2 = crtc->mode.VDisplay;
pixman_f_transform_bounds (&f_crtc_to_fb, &crtc->bounds);
if (damage)
xf86CrtcDamageShadow (crtc);
/* All done */
return TRUE;
}