From d7888294ac56b831c2da3e0582748a78adb0de28 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 31 Mar 2021 16:13:56 -0400 Subject: mesa: Remove unused _mesa_{create,destroy}_visual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/context.c | 61 ++++++------------------------------------------- src/mesa/main/context.h | 18 --------------- 2 files changed, 7 insertions(+), 72 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b6539f5a4f0..aedb50eafe9 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -190,13 +190,16 @@ _mesa_notifySwapBuffers(struct gl_context *ctx) /**********************************************************************/ -/** \name GL Visual allocation/destruction */ +/** \name GL Visual initialization */ /**********************************************************************/ /*@{*/ + /** - * Allocates a struct gl_config structure and initializes it via - * _mesa_initialize_visual(). + * Makes some sanity checks and fills in the fields of the struct + * gl_config object with the given parameters. If the caller needs to + * set additional fields, he should just probably init the whole + * gl_config object himself. * * \param dbFlag double buffering * \param stereoFlag stereo buffer @@ -211,49 +214,12 @@ _mesa_notifySwapBuffers(struct gl_context *ctx) * \param greenBits same as above. * \param blueBits same as above. * \param alphaBits same as above. - * \param numSamples not really used. + * \param numSamples number of samples per pixel. * * \return pointer to new struct gl_config or NULL if requested parameters * can't be met. * - * \note Need to add params for level and numAuxBuffers (at least) - */ -struct gl_config * -_mesa_create_visual( GLboolean dbFlag, - GLboolean stereoFlag, - GLint redBits, - GLint greenBits, - GLint blueBits, - GLint alphaBits, - GLint depthBits, - GLint stencilBits, - GLint accumRedBits, - GLint accumGreenBits, - GLint accumBlueBits, - GLint accumAlphaBits, - GLuint numSamples ) -{ - struct gl_config *vis = CALLOC_STRUCT(gl_config); - if (vis) { - _mesa_initialize_visual(vis, dbFlag, stereoFlag, - redBits, greenBits, blueBits, alphaBits, - depthBits, stencilBits, - accumRedBits, accumGreenBits, accumBlueBits, - accumAlphaBits, numSamples); - } - return vis; -} - - -/** - * Makes some sanity checks and fills in the fields of the struct - * gl_config object with the given parameters. If the caller needs to - * set additional fields, he should just probably init the whole - * gl_config object himself. - * * \return GL_TRUE on success, or GL_FALSE on failure. - * - * \sa _mesa_create_visual() above for the parameter description. */ void _mesa_initialize_visual( struct gl_config *vis, @@ -294,19 +260,6 @@ _mesa_initialize_visual( struct gl_config *vis, } -/** - * Destroy a visual and free its memory. - * - * \param vis visual. - * - * Frees the visual structure. - */ -void -_mesa_destroy_visual( struct gl_config *vis ) -{ - free(vis); -} - /*@}*/ diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index f8e59b421c9..9113ecd6ad9 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -67,21 +67,6 @@ struct _glapi_table; /** \name Visual-related functions */ /*@{*/ -extern struct gl_config * -_mesa_create_visual( GLboolean dbFlag, - GLboolean stereoFlag, - GLint redBits, - GLint greenBits, - GLint blueBits, - GLint alphaBits, - GLint depthBits, - GLint stencilBits, - GLint accumRedBits, - GLint accumGreenBits, - GLint accumBlueBits, - GLint accumAlphaBits, - GLuint numSamples ); - extern void _mesa_initialize_visual( struct gl_config *v, GLboolean dbFlag, @@ -98,9 +83,6 @@ _mesa_initialize_visual( struct gl_config *v, GLint accumAlphaBits, GLuint numSamples ); -extern void -_mesa_destroy_visual( struct gl_config *vis ); - /*@}*/ -- cgit v1.2.3