xserver: Branch 'randr-1.2-for-server-1.2'
Keith Packard
keithp at kemper.freedesktop.org
Thu Nov 16 23:51:35 EET 2006
randr/rrcrtc.c | 7 -------
randr/rrxinerama.c | 6 +++++-
2 files changed, 5 insertions(+), 8 deletions(-)
New commits:
diff-tree b5aa9eb8e6eda36856a075f4b008c33f6c706bad (from 8b2a7e94a1dc2776ab2cfaaebb309be02502602a)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Thu Nov 16 13:50:48 2006 -0800
Reduce calls to RRGetInfo.
RRGetInfo can be expensive. Don't invoke it when quering Xinerama
information or setting a new CRTC configuration.
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index c945468..b81c390 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -632,13 +632,6 @@ ProcRRSetCrtcConfig (ClientPtr client)
pScreen = crtc->pScreen;
pScrPriv = rrGetScrPriv(pScreen);
- if (!RRGetInfo (pScreen))
- {
- if (outputs)
- xfree (outputs);
- return BadAlloc;
- }
-
time = ClientTimeToServerTime(stuff->timestamp);
configTime = ClientTimeToServerTime(stuff->configTimestamp);
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index a8e4b39..771ed09 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -260,7 +260,11 @@ ProcRRXineramaQueryScreens(ClientPtr cli
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
if (RRXineramaScreenActive (pScreen))
- RRGetInfo (pScreen);
+ {
+ rrScrPriv(pScreen);
+ if (pScrPriv->numCrtcs == 0 || pScrPriv->numOutputs == 0)
+ RRGetInfo (pScreen);
+ }
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
More information about the xorg-commit
mailing list