dri2: Add DRI2CreateDrawable2.
Same as DRI2CreateDrawable, except it can return the DRI2 specific XID of the DRI2 drawable reference to the base drawable. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
656e5fea6c
commit
8a87acc9e5
|
@ -333,8 +333,9 @@ DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id,
|
|||
}
|
||||
|
||||
int
|
||||
DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
|
||||
DRI2InvalidateProcPtr invalidate, void *priv)
|
||||
DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id,
|
||||
DRI2InvalidateProcPtr invalidate, void *priv,
|
||||
XID *dri2_id_out)
|
||||
{
|
||||
DRI2DrawablePtr pPriv;
|
||||
DRI2ClientPtr dri2_client = dri2ClientPrivate(client);
|
||||
|
@ -354,9 +355,19 @@ DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
|
|||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
if (dri2_id_out)
|
||||
*dri2_id_out = dri2_id;
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
int
|
||||
DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
|
||||
DRI2InvalidateProcPtr invalidate, void *priv)
|
||||
{
|
||||
return DRI2CreateDrawable2(client, pDraw, id, invalidate, priv, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
DRI2DrawableGone(pointer p, XID id)
|
||||
{
|
||||
|
|
|
@ -274,6 +274,13 @@ extern _X_EXPORT int DRI2CreateDrawable(ClientPtr client,
|
|||
DRI2InvalidateProcPtr invalidate,
|
||||
void *priv);
|
||||
|
||||
extern _X_EXPORT int DRI2CreateDrawable2(ClientPtr client,
|
||||
DrawablePtr pDraw,
|
||||
XID id,
|
||||
DRI2InvalidateProcPtr invalidate,
|
||||
void *priv,
|
||||
XID *dri2_id_out);
|
||||
|
||||
extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw,
|
||||
int *width,
|
||||
int *height,
|
||||
|
|
Loading…
Reference in New Issue