From: Michel Dänzer Date: Mon, 22 Aug 2011 13:44:42 +0000 (+0200) Subject: st/xorg: Only damage non-front source in DRI2 CopyRegion hook. X-Git-Tag: 062012170305~4896^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=751f0ce7736de455f3f6d8dcfbaf25bbbd3fcf55;p=profile%2Fivi%2Fmesa.git st/xorg: Only damage non-front source in DRI2 CopyRegion hook. Based on a vmwgfx xa/saa fix. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher --- diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c index 6f2c52e..3350ac7 100644 --- a/src/gallium/state_trackers/xorg/xorg_dri2.c +++ b/src/gallium/state_trackers/xorg/xorg_dri2.c @@ -372,13 +372,15 @@ dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion, save_accel = ms->exa->accel; ms->exa->accel = TRUE; - /* In case it won't be though, make sure the GPU copy contents of the - * source pixmap will be used for the software fallback - presumably the - * client modified them before calling in here. - */ - exaMoveInPixmap(src_priv->pPixmap); - DamageRegionAppend(src_draw, pRegion); - DamageRegionProcessPending(src_draw); + if (pSrcBuffer->attachment != DRI2BufferFrontLeft) { + /* In case it won't be though, make sure the GPU copy contents of the + * source pixmap will be used for the software fallback - presumably the + * client modified them before calling in here. + */ + exaMoveInPixmap(src_priv->pPixmap); + DamageRegionAppend(src_draw, pRegion); + DamageRegionProcessPending(src_draw); + } if (cust && cust->winsys_context_throttle) cust->winsys_context_throttle(cust, ms->ctx, THROTTLE_SWAP);