diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-12-06 16:49:12 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-12-10 19:54:45 -0800 |
commit | f0d44c18d71e7450b99189c1221a2f89c7817ab6 (patch) | |
tree | 4e10ab17342cc7f295e30020b6410c3615d67201 /src | |
parent | 42c4e423eec789606eec9703be23a9fd4483a14a (diff) |
Mach64PixelARGB should use exaGetPixmapFirstPixel
Fixes crash attempting to read a pixel from a NULL pPixmap->devPrivate.ptr
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/atimach64render.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/atimach64render.c b/src/atimach64render.c index 4862cd4..ffde2cb 100644 --- a/src/atimach64render.c +++ b/src/atimach64render.c @@ -209,22 +209,7 @@ Mach64PixelARGB(PixmapPtr pPixmap, CARD32 format, CARD32 *argb) CARD8 comp; int bits, shift; - /* Ensure that texture drawing has completed. */ - exaWaitSync(pPixmap->drawable.pScreen); - - /* exaGetPixmapFirstPixel() */ - - switch (pPixmap->drawable.bitsPerPixel) { - case 32: - pixel = *(CARD32 *)(pPixmap->devPrivate.ptr); - break; - case 16: - pixel = *(CARD16 *)(pPixmap->devPrivate.ptr); - break; - default: - pixel = *(CARD8 *)(pPixmap->devPrivate.ptr); - break; - } + pixel = exaGetPixmapFirstPixel(pPixmap); /* exaGetRGBAFromPixel()/viaPixelARGB8888() */ |