diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index 59cb46f..2eb1de4 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -205,6 +205,11 @@ FUNC_NAME(RADEONPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst, if (!RADEONGetPixmapOffsetPitch(pDst, &dst_pitch_offset)) RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch dest failed\n")); + if (exaGetPixmapOffset(pSrc) == exaGetPixmapOffset(pDst)) + info->accel_state->same_surface = TRUE; + else + info->accel_state->same_surface = FALSE; + FUNC_NAME(RADEONDoPrepareCopy)(pScrn, src_pitch_offset, dst_pitch_offset, datatype, rop, planemask); @@ -222,6 +227,9 @@ FUNC_NAME(RADEONCopy)(PixmapPtr pDst, TRACE; + if (info->accel_state->same_surface && (srcX == dstX) && (srcY == dstY)) + return; + if (info->accel_state->xdir < 0) { srcX += w - 1; dstX += w - 1;