diff options
author | Keith Packard <keithp@guitar.keithp.com> | 2007-01-27 00:11:21 -0800 |
---|---|---|
committer | Keith Packard <keithp@guitar.keithp.com> | 2007-01-27 00:11:21 -0800 |
commit | 7a5f17087bda2833e84fa7e7ff0cb168943b89b6 (patch) | |
tree | a1f57f1d374412f3bc052bc91eeb3f9ff783a44c /src/i830_xf86Rotate.c | |
parent | 2d95cb6f041653f7e530b1f32cf007929c23ef3b (diff) |
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.
Diffstat (limited to 'src/i830_xf86Rotate.c')
-rw-r--r-- | src/i830_xf86Rotate.c | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |