EXA: Fix exaGetPixmapFirstPixel() crash if the driver has a CreatePixmap hook.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16243
This commit is contained in:
Michel Dänzer 2008-06-06 11:01:03 +02:00
parent d25ffcfbfc
commit 6b96281100

View File

@ -362,6 +362,7 @@ ExaCheckComposite (CARD8 op,
CARD32
exaGetPixmapFirstPixel (PixmapPtr pPixmap)
{
ExaScreenPriv(pPixmap->drawable.pScreen);
CARD32 pixel;
void *fb;
Bool need_finish = FALSE;
@ -376,7 +377,8 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap)
fb = pExaPixmap->sys_ptr;
/* Try to avoid framebuffer readbacks */
if ((!offscreen && !sys_valid && !damaged) ||
if (pExaScr->info->CreatePixmap ||
(!offscreen && !sys_valid && !damaged) ||
(offscreen && (!sys_valid || damaged)))
{
box.x1 = 0;