mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-27 00:00:06 +01:00
Reduce calls to RRGetInfo.
RRGetInfo can be expensive. Don't invoke it when quering Xinerama information or setting a new CRTC configuration.
This commit is contained in:
parent
8b2a7e94a1
commit
b5aa9eb8e6
2 changed files with 5 additions and 8 deletions
|
|
@ -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…
Add table
Reference in a new issue