diff options
author | Keith Packard <keithp@neko.keithp.com> | 2006-11-16 13:50:48 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2006-11-16 17:39:26 -0800 |
commit | ef47d9c3ba63e9a6243fe5c81ccc60c8246352b4 (patch) | |
tree | 7a41b5d679cc1bc83ea1d2e2ccd197137aa474d5 /randr | |
parent | 07b26e690cd9a4fc626132feed0702515cbe5a88 (diff) |
Reduce calls to RRGetInfo.
RRGetInfo can be expensive. Don't invoke it when quering Xinerama
information or setting a new CRTC configuration.
(cherry picked from commit b5aa9eb8e6eda36856a075f4b008c33f6c706bad)
Diffstat (limited to 'randr')
-rw-r--r-- | randr/rrcrtc.c | 7 | ||||
-rw-r--r-- | randr/rrxinerama.c | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index c945468bf..b81c390f1 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 a8e4b390b..771ed0976 100644 --- a/randr/rrxinerama.c +++ b/randr/rrxinerama.c @@ -260,7 +260,11 @@ ProcRRXineramaQueryScreens(ClientPtr client) 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; |