From 7a5f17087bda2833e84fa7e7ff0cb168943b89b6 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 27 Jan 2007 00:11:21 -0800 Subject: [PATCH] Mark crtc region as damaged when rotation is set. When shadow frame buffer is allocated for rotation, it needs to be initialized by copying from the frame buffer. Do this by simply marking the entire screen as damaged which will force an update. --- src/i830_xf86Rotate.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/i830_xf86Rotate.c b/src/i830_xf86Rotate.c index abfaec65..7d056e5a 100644 --- a/src/i830_xf86Rotate.c +++ b/src/i830_xf86Rotate.c @@ -328,6 +328,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) PixmapPtr shadow = crtc->rotatedPixmap; int old_width = shadow ? shadow->drawable.width : 0; int old_height = shadow ? shadow->drawable.height : 0; + BoxRec damage_box; + RegionRec damage_region; /* Allocate memory for rotation */ if (old_width != width || old_height != height) @@ -363,6 +365,14 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) { goto bail3; } + damage_box.x1 = 0; + damage_box.y1 = 0; + damage_box.x2 = mode_width (mode, rotation); + damage_box.y2 = mode_height (mode, rotation); + REGION_INIT (pScreen, &damage_region, &damage_box, 1); + DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable, + &damage_region); + REGION_UNINIT (pScreen, &damage_region); } if (0) {