diff --git a/Xext/dri2/dri2.c b/Xext/dri2/dri2.c index 5838218555..2bcf86c530 100644 --- a/Xext/dri2/dri2.c +++ b/Xext/dri2/dri2.c @@ -810,12 +810,8 @@ DRI2InvalidateDrawableAll(DrawablePtr pDraw) DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) { DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); - PixmapPtr spix; PixmapPtr mpix = GetDrawablePixmap(pDraw); - ScreenPtr primary, secondary; - Bool ret; - - primary = mpix->drawable.pScreen; + ScreenPtr primary = mpix->drawable.pScreen; if (pDraw->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr)pDraw; @@ -834,8 +830,7 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) if (!mpix) return NULL; - ret = (*primary->ReplaceScanoutPixmap)(pDraw, mpix, TRUE); - if (ret == FALSE) { + if (!(primary->ReplaceScanoutPixmap(pDraw, mpix, TRUE))) { dixDestroyPixmap(mpix, 0); return NULL; } @@ -850,7 +845,7 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) } } - secondary = GetScreenPrime(pDraw->pScreen, pPriv->prime_id); + ScreenPtr secondary = GetScreenPrime(pDraw->pScreen, pPriv->prime_id); /* check if the pixmap is still fine */ if (pPriv->prime_secondary_pixmap) { @@ -864,7 +859,7 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) } } - spix = PixmapShareToSecondary(mpix, secondary); + PixmapPtr spix = PixmapShareToSecondary(mpix, secondary); if (!spix) return NULL;