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)
This commit is contained in:
parent
07b26e690c
commit
ef47d9c3ba
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue