diff options
author | Emil Velikov <[email protected]> | 2016-06-07 17:33:48 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-06-13 15:31:29 +0100 |
commit | db8790c0dadffb6c88a0939bd34eca2b8e75d2e0 (patch) | |
tree | a367fe7c69ba9956091fd51eecf48de633d45fc0 /src/mesa/main/context.c | |
parent | a4fa8bf819fd7189ab1d41e82b79dc007f7a7300 (diff) |
st/mesa: inline _mesa_create_context() into its only caller
Inline the function into it's only caller. This way it's more obvious
how the classic and gallium drivers (st/mesa) use _mesa_initialize_context.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 1da7ac90792..85cd7790ce8 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1267,44 +1267,6 @@ fail: /** - * Allocate and initialize a struct gl_context structure. - * Note that the driver needs to pass in its dd_function_table here since - * we need to at least call driverFunctions->NewTextureObject to initialize - * the rendering context. - * - * \param api the GL API type to create the context for - * \param visual a struct gl_config pointer (we copy the struct contents) or - * NULL to create a configless context - * \param share_list another context to share display lists with or NULL - * \param driverFunctions points to the dd_function_table into which the - * driver has plugged in all its special functions. - * - * \return pointer to a new __struct gl_contextRec or NULL if error. - */ -struct gl_context * -_mesa_create_context(gl_api api, - const struct gl_config *visual, - struct gl_context *share_list, - const struct dd_function_table *driverFunctions) -{ - struct gl_context *ctx; - - ctx = calloc(1, sizeof(struct gl_context)); - if (!ctx) - return NULL; - - if (_mesa_initialize_context(ctx, api, visual, share_list, - driverFunctions)) { - return ctx; - } - else { - free(ctx); - return NULL; - } -} - - -/** * Free the data associated with the given context. * * But doesn't free the struct gl_context struct itself. |