summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-12 02:09:22 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-12 02:21:29 +0000
commit87e6dcb3b06c274ecba5de56d4e86fec73e46dbb (patch)
tree41c40f893097cc57c045debdd62d976d7cac4817
parent1bd6665093574372248a0743e5630e68aac653ed (diff)
sna: Don't call RegionIntersect for the trivial PutImage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index bc51112c..b3bea6af 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2525,9 +2525,15 @@ sna_put_image(DrawablePtr drawable, GCPtr gc, int depth,
region.extents.y2 = region.extents.y1 + h;
region.data = NULL;
- RegionIntersect(&region, &region, gc->pCompositeClip);
- if (!RegionNotEmpty(&region))
- return;
+ if (!region_is_singular(gc->pCompositeClip) ||
+ gc->pCompositeClip->extents.x1 > region.extents.x1 ||
+ gc->pCompositeClip->extents.y1 > region.extents.y1 ||
+ gc->pCompositeClip->extents.x2 < region.extents.x2 ||
+ gc->pCompositeClip->extents.y2 < region.extents.y2) {
+ RegionIntersect(&region, &region, gc->pCompositeClip);
+ if (!RegionNotEmpty(&region))
+ return;
+ }
RegionTranslate(&region, dx, dy);