xf86-video-intel: src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jan 25 08:48:57 PST 2012
src/sna/sna_accel.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
New commits:
commit d785bb7df054a1f15d59db69b089deb743bbdb40
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jan 25 16:45:43 2012 +0000
sna: GetImage is allowed to read a window's border
We need to adjust the clip to include the border pixels when migrating
damage from the backing pixmap. This also requires relaxing the
constraint that a read must be within the drawable.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index deb39bf..b28134c 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1143,7 +1143,9 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
RegionExtents(region)->x2, RegionExtents(region)->y2,
flags));
- assert_drawable_contains_box(drawable, ®ion->extents);
+ if (flags & MOVE_WRITE) {
+ assert_drawable_contains_box(drawable, ®ion->extents);
+ }
priv = sna_pixmap(pixmap);
if (priv == NULL) {
@@ -11157,15 +11159,19 @@ sna_get_image(DrawablePtr drawable,
region.extents.y2 = region.extents.y1 + h;
region.data = NULL;
- if (region.extents.x1 < drawable->x)
- region.extents.x1 = drawable->x;
- if (region.extents.x2 > drawable->x + drawable->width)
- region.extents.x2 = drawable->x + drawable->width;
+ if (drawable->type == DRAWABLE_PIXMAP) {
+ if (region.extents.x1 < drawable->x)
+ region.extents.x1 = drawable->x;
+ if (region.extents.x2 > drawable->x + drawable->width)
+ region.extents.x2 = drawable->x + drawable->width;
- if (region.extents.y1 < drawable->y)
- region.extents.y1 = drawable->y;
- if (region.extents.y2 > drawable->y + drawable->height)
- region.extents.y2 = drawable->y + drawable->height;
+ if (region.extents.y1 < drawable->y)
+ region.extents.y1 = drawable->y;
+ if (region.extents.y2 > drawable->y + drawable->height)
+ region.extents.y2 = drawable->y + drawable->height;
+ } else
+ RegionIntersect(®ion, ®ion,
+ &((WindowPtr)drawable)->borderClip);
if (!sna_drawable_move_region_to_cpu(drawable, ®ion, MOVE_READ))
return;
More information about the xorg-commit
mailing list