xf86-video-intel: src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jan 7 01:41:23 PST 2013
src/sna/sna_accel.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
New commits:
commit b8c9598294eaa16e0d1578ad98896f6ec5ba37cf
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 7 13:57:21 2013 +1000
sna: fixup damage posting to be done correctly around slave pixmap
Copied from commit c789d06cf8a0debc67058d7be1483f5b542e2baa
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Jan 7 13:57:21 2013 +1000
This fixes the damage posting to happen in the correct ordering,
not sure if this fixes anything, but it should make things more consistent.
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 227db7b..c826815 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -13948,6 +13948,8 @@ static void sna_accel_post_damage(struct sna *sna)
region.extents.x2, region.extents.y2));
RegionIntersect(®ion, ®ion, damage);
+ RegionTranslate(®ion, -dirty->x, -dirty->y);
+ DamageRegionAppend(&dirty->slave_dst->drawable, ®ion);
box = REGION_RECTS(®ion);
n = REGION_NUM_RECTS(®ion);
@@ -13963,30 +13965,31 @@ fallback:
do {
DBG(("%s: copy box (%d, %d)->(%d, %d)x(%d, %d)\n",
__FUNCTION__,
+ box->x1 + dirty->x, box->y1 + dirty->y,
box->x1, box->y1,
- box->x1 - dirty->x, box->y1 - dirty->y,
box->x2 - box->x1, box->y2 - box->y1));
assert(box->x2 > box->x1);
assert(box->y2 > box->y1);
+ assert(box->x1 + dirty->x >= 0);
+ assert(box->y1 + dirty->y >= 0);
+ assert(box->x2 + dirty->x <= src->drawable.width);
+ assert(box->y2 + dirty->y <= src->drawable.height);
+
assert(box->x1 >= 0);
assert(box->y1 >= 0);
assert(box->x2 <= src->drawable.width);
assert(box->y2 <= src->drawable.height);
- assert(box->x1 - dirty->x >= 0);
- assert(box->y1 - dirty->y >= 0);
- assert(box->x2 - dirty->x <= src->drawable.width);
- assert(box->y2 - dirty->y <= src->drawable.height);
-
memcpy_blt(src->devPrivate.ptr,
dst->devPrivate.ptr,
src->drawable.bitsPerPixel,
src->devKind, dst->devKind,
- box->x1, box->y1,
- box->x1 - dirty->x,
- box->y1 - dirty->y,
+ box->x1 + dirty->x,
+ box->y1 + dirty->y,
+ box->x1,
+ box->y1,
box->x2 - box->x1,
box->y2 - box->y1);
box++;
@@ -13999,17 +14002,15 @@ fallback:
goto fallback;
if (!sna->render.copy_boxes(sna, GXcopy,
- src, sna_pixmap_get_bo(src), 0, 0,
- dst, sna_pixmap_get_bo(dst), -dirty->x, -dirty->y,
+ src, sna_pixmap_get_bo(src), dirty->x, dirty->y,
+ dst, sna_pixmap_get_bo(dst),0, 0,
box, n, COPY_LAST))
goto fallback;
flush = true;
}
- RegionTranslate(®ion, -dirty->x, -dirty->y);
- DamageRegionAppend(&dirty->slave_dst->drawable, ®ion);
-
+ DamageRegionProcessPending(&dirty->slave_dst->drawable);
skip:
RegionUninit(®ion);
DamageEmpty(dirty->damage);
More information about the xorg-commit
mailing list