diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2008-11-29 14:30:55 +0100 |
---|---|---|
committer | Maarten Maathuis <madman2003@gmail.com> | 2008-11-29 14:30:55 +0100 |
commit | ffb484f7ef84099019b196ef97bfb2355eb6d52a (patch) | |
tree | 420da6447a7b1d311b6a77306821bc4d06fe08dc | |
parent | 01eaebdc98f30fdf543af6337cdf012d3ff16f09 (diff) |
randr: Avoid needlessly creating a shadow framebuffer.
- pScreen->width and height were zero, so it didn't "fit" the screen.
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 13 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Rotate.c | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index e9652e1cb..6a3731c7c 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -114,2 +114,4 @@ xf86CrtcCreate (ScrnInfoPtr scrn, crtc->transform_in_use = FALSE; + crtc->transformPresent = FALSE; + crtc->desiredTransformPresent = FALSE; memset (&crtc->bounds, '\0', sizeof (crtc->bounds)); @@ -243,2 +245,4 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati 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); @@ -256,5 +260,5 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y); - + crtc->enabled = xf86CrtcInUse (crtc); - + if (!crtc->enabled) @@ -292,2 +296,7 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati + /* 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 */ diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index 07189a5ba..d7f7b3b78 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -466,3 +466,3 @@ xf86CrtcRotate (xf86CrtcPtr crtc) } - + if (!xf86_config->rotation_damage) |