sna: Don't call RegionIntersect for the trivial PutImage

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-01-12 02:09:22 +00:00
parent 1bd6665093
commit 87e6dcb3b0
1 changed files with 9 additions and 3 deletions

View File

@ -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);