mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
dri2: declare variables where needed in DRI2CreateDrawable2()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
6b083ca9bc
commit
17aec8555e
@@ -347,17 +347,12 @@ DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id,
|
|||||||
DRI2InvalidateProcPtr invalidate, void *priv,
|
DRI2InvalidateProcPtr invalidate, void *priv,
|
||||||
XID *dri2_id_out)
|
XID *dri2_id_out)
|
||||||
{
|
{
|
||||||
DRI2DrawablePtr pPriv;
|
|
||||||
DRI2ClientPtr dri2_client;
|
|
||||||
XID dri2_id;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
if (!dixPrivateKeyRegistered(&dri2ScreenPrivateKeyRec))
|
if (!dixPrivateKeyRegistered(&dri2ScreenPrivateKeyRec))
|
||||||
return BadValue;
|
return BadValue;
|
||||||
|
|
||||||
dri2_client = dri2ClientPrivate(client);
|
DRI2ClientPtr dri2_client = dri2ClientPrivate(client);
|
||||||
|
|
||||||
pPriv = DRI2GetDrawable(pDraw);
|
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
||||||
if (pPriv == NULL)
|
if (pPriv == NULL)
|
||||||
pPriv = DRI2AllocateDrawable(pDraw);
|
pPriv = DRI2AllocateDrawable(pDraw);
|
||||||
if (pPriv == NULL)
|
if (pPriv == NULL)
|
||||||
@@ -365,8 +360,8 @@ DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id,
|
|||||||
|
|
||||||
pPriv->prime_id = dri2_client->prime_id;
|
pPriv->prime_id = dri2_client->prime_id;
|
||||||
|
|
||||||
dri2_id = FakeClientID(client->index);
|
XID dri2_id = FakeClientID(client->index);
|
||||||
rc = DRI2AddDrawableRef(pPriv, id, dri2_id, invalidate, priv);
|
int rc = DRI2AddDrawableRef(pPriv, id, dri2_id, invalidate, priv);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user