summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-10-11 14:36:11 +1000
committerDave Airlie <airlied@redhat.com>2012-10-11 14:36:11 +1000
commitbd9e2c064d93afbe4ab84febb2a43ae6a95ab17b (patch)
tree761d186c0567107d0cdb7235885a8e1ff9018cc8 /src
parente8cb0b721e6ea251f85c799ca0563bfa59a2d37c (diff)
radeon/dri2: fix damage reporting on pageflip
when you use MPX or slave usb devices, the damage posting was incorrect, and resulted in misrendered boxes on the screen. Fix it by reporting damage correctly. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/radeon_dri2.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 1e04b85a..f8439d2d 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -907,8 +907,15 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt
struct radeon_bo *front_bo, *back_bo;
ScreenPtr screen;
RADEONInfoPtr info;
+ RegionRec region;
int tmp;
+ region.extents.x1 = region.extents.y1 = 0;
+ region.extents.x2 = front_priv->pixmap->drawable.width;
+ region.extents.y2 = front_priv->pixmap->drawable.width;
+ region.data = NULL;
+ DamageRegionAppend(&front_priv->pixmap->drawable, &region);
+
/* Swap BO names so DRI works */
tmp = front->name;
front->name = back->name;
@@ -932,15 +939,7 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt
radeon_glamor_exchange_buffers(front_priv->pixmap, back_priv->pixmap);
- {
- RegionRec region;
- region.extents.x1 = region.extents.y1 = 0;
- region.extents.x2 = front_priv->pixmap->drawable.width;
- region.extents.y2 = front_priv->pixmap->drawable.width;
- region.data = NULL;
- DamageRegionAppend(&front_priv->pixmap->drawable, &region);
- DamageRegionProcessPending(&front_priv->pixmap->drawable);
- }
+ DamageRegionProcessPending(&front_priv->pixmap->drawable);
}
void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,