diff options
author | Eric Anholt <eric@anholt.net> | 2009-01-30 19:06:17 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-01-30 19:35:55 -0800 |
commit | 317f2b4a9fe4b606975711bc332166a82db5087d (patch) | |
tree | eec63b4f44dee976577a6b051f2c9d138df28e65 /randr/rrinfo.c | |
parent | c1f2be1f3fd0c80cb4c85b98140b98aa9311242b (diff) |
randr: Avoid re-querying the configuration on everything but GetScreenResources.
The new path should only re-query on the other requests when we haven't
gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX).
Bug #19037.
Diffstat (limited to 'randr/rrinfo.c')
-rw-r--r-- | randr/rrinfo.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/randr/rrinfo.c b/randr/rrinfo.c index 38314defd..12b9a4aab 100644 --- a/randr/rrinfo.c +++ b/randr/rrinfo.c @@ -178,12 +178,20 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations) * Poll the driver for changed information */ Bool -RRGetInfo (ScreenPtr pScreen) +RRGetInfo (ScreenPtr pScreen, Bool force_query) { rrScrPriv (pScreen); Rotation rotations; int i; + /* Return immediately if we don't need to re-query and we already have the + * information. + */ + if (!force_query) { + if (pScrPriv->numCrtcs != 0 || pScrPriv->numOutputs != 0) + return TRUE; + } + for (i = 0; i < pScrPriv->numOutputs; i++) pScrPriv->outputs[i]->changed = FALSE; for (i = 0; i < pScrPriv->numCrtcs; i++) |