diff options
author | Kristian Høgsberg <[email protected]> | 2013-11-11 16:35:35 -0800 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2013-11-12 16:08:17 -0800 |
commit | e0489531455623aa21aa565b2c890362d8437f23 (patch) | |
tree | 4a98548b5ac78b16a3266512cc12c516d90acd9d /src/glx | |
parent | 68bb26bead333764f140225926a9123f38b567a3 (diff) |
dri: Remove redundant createNewContext function from __DRIimageDriverExtension
createContextAttribs is a superset of what createNewContext provides.
Also remove the function typedef, since createNewContext is deprecated
and no longer used in multiple interfaces.
Signed-off-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Cc: "10.0" <[email protected]>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/dri3_glx.c | 56 |
1 files changed, 11 insertions, 45 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 0c8e0646298..b047cc880c8 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -160,51 +160,6 @@ dri3_unbind_context(struct glx_context *context, struct glx_context *new) } static struct glx_context * -dri3_create_context(struct glx_screen *base, - struct glx_config *config_base, - struct glx_context *shareList, int renderType) -{ - struct dri3_context *pcp, *pcp_shared; - struct dri3_screen *psc = (struct dri3_screen *) base; - __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) config_base; - __DRIcontext *shared = NULL; - - if (shareList) { - /* If the shareList context is not a DRI3 context, we cannot possibly - * create a DRI3 context that shares it. - */ - if (shareList->vtable->destroy != dri3_destroy_context) { - return NULL; - } - - pcp_shared = (struct dri3_context *) shareList; - shared = pcp_shared->driContext; - } - - pcp = calloc(1, sizeof *pcp); - if (pcp == NULL) - return NULL; - - if (!glx_context_init(&pcp->base, &psc->base, &config->base)) { - free(pcp); - return NULL; - } - - pcp->driContext = - (*psc->image_driver->createNewContext) (psc->driScreen, - config->driConfig, shared, pcp); - - if (pcp->driContext == NULL) { - free(pcp); - return NULL; - } - - pcp->base.vtable = &dri3_context_vtable; - - return &pcp->base; -} - -static struct glx_context * dri3_create_context_attribs(struct glx_screen *base, struct glx_config *config_base, struct glx_context *shareList, @@ -299,6 +254,17 @@ error_exit: return NULL; } +static struct glx_context * +dri3_create_context(struct glx_screen *base, + struct glx_config *config_base, + struct glx_context *shareList, int renderType) +{ + unsigned int error; + + return dri3_create_context_attribs(base, config_base, shareList, + 0, NULL, &error); +} + static void dri3_destroy_drawable(__GLXDRIdrawable *base) { |