mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
dri2: declare variables where needed in DRI2UpdatePrime()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
d8db7c3908
commit
654b491d58
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user