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.
This commit is contained in:
parent
2d95cb6f04
commit
7a5f17087b
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue