randr: Avoid needlessly creating a shadow framebuffer.
- pScreen->width and height were zero, so it didn't "fit" the screen.
This commit is contained in:
parent
01eaebdc98
commit
ffb484f7ef
|
@ -112,6 +112,8 @@ xf86CrtcCreate (ScrnInfoPtr scrn,
|
|||
crtc->filter_width = 0;
|
||||
crtc->filter_height = 0;
|
||||
crtc->transform_in_use = FALSE;
|
||||
crtc->transformPresent = FALSE;
|
||||
crtc->desiredTransformPresent = FALSE;
|
||||
memset (&crtc->bounds, '\0', sizeof (crtc->bounds));
|
||||
|
||||
if (xf86_config->crtc)
|
||||
|
@ -241,6 +243,8 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
|
|||
RRTransformPtr transform, int x, int y)
|
||||
{
|
||||
ScrnInfoPtr scrn = crtc->scrn;
|
||||
/* During ScreenInit() scrn->pScreen is still NULL */
|
||||
ScreenPtr pScreen = screenInfo.screens[scrn->scrnIndex];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int i;
|
||||
Bool ret = FALSE;
|
||||
|
@ -254,9 +258,9 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
|
|||
|
||||
if (crtc->funcs->set_mode_major)
|
||||
return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y);
|
||||
|
||||
|
||||
crtc->enabled = xf86CrtcInUse (crtc);
|
||||
|
||||
|
||||
if (!crtc->enabled)
|
||||
{
|
||||
/* XXX disable crtc? */
|
||||
|
@ -290,6 +294,11 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
|
|||
} else
|
||||
crtc->transformPresent = FALSE;
|
||||
|
||||
/* xf86CrtcFitsScreen() relies on these values being correct. */
|
||||
/* This should ensure the values are always set at modeset time. */
|
||||
pScreen->width = scrn->virtualX;
|
||||
pScreen->height = scrn->virtualY;
|
||||
|
||||
/* Shift offsets that move us out of virtual size */
|
||||
if (x + mode->HDisplay > xf86_config->maxWidth ||
|
||||
y + mode->VDisplay > xf86_config->maxHeight)
|
||||
|
|
|
@ -464,7 +464,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
|
|||
/* mark shadowed area as damaged so it will be repainted */
|
||||
xf86CrtcDamageShadow (crtc);
|
||||
}
|
||||
|
||||
|
||||
if (!xf86_config->rotation_damage)
|
||||
{
|
||||
/* Create damage structure */
|
||||
|
|
Loading…
Reference in New Issue
Block a user