diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-06-20 18:42:00 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-06-20 18:46:03 +0200 |
commit | 87966c5d2889873cea6cbc16b7e4399490dfaec1 (patch) | |
tree | 33f6620f66a1c5f7aa3cc6b672930100c1d5109e /exa | |
parent | 40f27a2df4906d9ceb1c78f6163a62c497321535 (diff) |
exaGetImage: Don't migrate or try to accelerate for 1x1.
This is mainly to avoid wasting effort for XSync(), but just reading a single
pixel directly is probably faster than DownloadFromScreen anyway. Though in
light of the latter, even larger thresholds might be useful.
Also move the swappedOut check before the migration checks because migration
can't actually occur when swapped out.
Diffstat (limited to 'exa')
-rw-r--r-- | exa/exa_accel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c index bf63f2c4f..8d03dd5e8 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -1329,6 +1329,9 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, int xoff, yoff; Bool ok; + if (pExaScr->swappedOut || (w == 1 && h == 1)) + goto fallback; + if (pExaScr->info->DownloadFromScreen == NULL) goto migrate_and_fallback; @@ -1342,9 +1345,6 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, if (pDrawable->bitsPerPixel < 8) goto migrate_and_fallback; - if (pExaScr->swappedOut) - goto fallback; - pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); if (pPix == NULL) goto fallback; |