diff options
author | Dave Airlie <airlied@redhat.com> | 2012-10-11 14:36:11 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-10-11 14:36:11 +1000 |
commit | bd9e2c064d93afbe4ab84febb2a43ae6a95ab17b (patch) | |
tree | 761d186c0567107d0cdb7235885a8e1ff9018cc8 /src | |
parent | e8cb0b721e6ea251f85c799ca0563bfa59a2d37c (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.c | 17 |
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, ®ion); + /* 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, ®ion); - DamageRegionProcessPending(&front_priv->pixmap->drawable); - } + DamageRegionProcessPending(&front_priv->pixmap->drawable); } void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec, |