xf86-video-intel: src/sna/sna_composite.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Aug 7 09:21:15 PDT 2012
src/sna/sna_composite.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 1a0590d133ea6991e0939d1f170f9c10df6856a0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Aug 7 17:16:35 2012 +0100
sna: Check the composite extents against the clip
When computing the composite extents (as opposed to the composite
region) also check if the resultant box overlaps the destination clip
region (we know it already fits into the extents). This helps in cases
with small roi against clipped drawables, such as drawing text onto
expose events.
References: https://bugs.freedesktop.org/show_bug.cgi?id=51422
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 0ca66c7..48b6836 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -364,7 +364,14 @@ sna_compute_composite_extents(BoxPtr extents,
trim_source_extents(extents, mask,
dst_x - mask_x, dst_y - mask_y);
- return extents->x1 < extents->x2 && extents->y1 < extents->y2;
+ if (extents->x1 >= extents->x2 || extents->y1 >= extents->y2)
+ return false;
+
+ if (region_is_singular(dst->pCompositeClip))
+ return true;
+
+ return pixman_region_contains_rectangle(dst->pCompositeClip,
+ extents) != PIXMAN_REGION_OUT;
}
#if HAS_DEBUG_FULL
More information about the xorg-commit
mailing list