[PATCH 1/2] mga: Fix pixmap pointer in EXA mgaDownloadFromScreen()

Tormod Volden lists.tormod at gmail.com
Mon Mar 2 12:01:14 PST 2015


From: Tormod Volden <debian.tormod at gmail.com>

Thanks to Connor Behan for the fix.

This replaces commit e9109a0b which was plain wrong.

Signed-off-by: Tormod Volden <debian.tormod at gmail.com>
---

Hoping for remedy for old sins. Only compile-tested.

Tormod

 src/mga_exa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mga_exa.c b/src/mga_exa.c
index 69ffa16..24a7328 100644
--- a/src/mga_exa.c
+++ b/src/mga_exa.c
@@ -729,7 +729,7 @@ mgaDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
 {
     PMGA(pSrc);
 
-    char *src = (char *) exaGetPixmapFirstPixel(pSrc);
+    char *src = pMga->ExaDriver->memoryBase + exaGetPixmapOffset(pSrc);
     int src_pitch = exaGetPixmapPitch(pSrc);
 
     int cpp = (pSrc->drawable.bitsPerPixel + 7) / 8;
-- 
1.7.10.4



More information about the xorg-devel mailing list