summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-02-03 20:15:41 -0800
committerKeith Packard <keithp@keithp.com>2009-02-03 20:21:02 -0800
commit763df9eec79a867978efc5138d8635a46c1a0d17 (patch)
tree7085c7c2b7dee15245da6243a7da74e0456377b9
parent62fc98cb88e4e8b636f343453fc1168a87c58972 (diff)
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>
-rw-r--r--hw/xfree86/modes/xf86Rotate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 21b7aff97..dcc3ec02c 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -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;
}