First batch of AIGLX fixes from David Reveman.

Add getter for Mesa provider.
Export this for Xgl.
Move resource tracking out of drawable constructor to allow wrapping.
Use corrent reply size #define.
Add this function. (DoGetDrawableAttributes): Fix array length.
This commit is contained in:
Kristian Høgsberg 2006-03-13 01:54:59 +00:00
commit e5956f49b2
6 changed files with 55 additions and 21 deletions

View file

@ -225,11 +225,6 @@ __glXDrawableInit(__GLXdrawable *drawable,
drawable->pGlxPixmap = (__GLXpixmap *)
LookupIDByType(drawId, __glXPixmapRes);
/* since we are creating the drawablePrivate, drawId should be new */
if (!AddResource(drawId, __glXDrawableRes, drawable)) {
return GL_FALSE;
}
return GL_TRUE;
}
@ -251,7 +246,16 @@ __glXGetDrawable(__GLXcontext *ctx, DrawablePtr pDraw, XID drawId)
glxPriv = __glXFindDrawable(drawId);
if (glxPriv == NULL)
{
glxPriv = ctx->createDrawable(ctx, pDraw, drawId);
/* since we are creating the drawablePrivate, drawId should be new */
if (!AddResource(drawId, __glXDrawableRes, glxPriv))
{
glxPriv->destroy (glxPriv);
return NULL;
}
}
return glxPriv;
}