mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
dri2: declare variables where needed in DRI2GetDrawable()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
0c2289ce0c
commit
4bda7ecaa0
@@ -201,15 +201,12 @@ DRI2GetScreenPrime(ScreenPtr primary, int prime_id)
|
||||
static DRI2DrawablePtr
|
||||
DRI2GetDrawable(DrawablePtr pDraw)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
PixmapPtr pPixmap;
|
||||
|
||||
switch (pDraw->type) {
|
||||
case DRAWABLE_WINDOW:
|
||||
pWin = (WindowPtr) pDraw;
|
||||
WindowPtr pWin = (WindowPtr) pDraw;
|
||||
return dixLookupPrivate(&pWin->devPrivates, &dri2WindowPrivateKeyRec);
|
||||
case DRAWABLE_PIXMAP:
|
||||
pPixmap = (PixmapPtr) pDraw;
|
||||
PixmapPtr pPixmap = (PixmapPtr) pDraw;
|
||||
return dixLookupPrivate(&pPixmap->devPrivates, &dri2PixmapPrivateKeyRec);
|
||||
default:
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user