summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2021-03-31 16:13:56 -0400
committerMarge Bot <eric+marge@anholt.net>2021-05-05 03:23:58 +0000
commitd7888294ac56b831c2da3e0582748a78adb0de28 (patch)
treee6672bd8a456fa90317ce99054dbb0ef4a5d19e4
parent75831d5fceead7fb1b244aa1ea6b89e5be325689 (diff)
mesa: Remove unused _mesa_{create,destroy}_visual
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>
-rw-r--r--src/mesa/main/context.c61
-rw-r--r--src/mesa/main/context.h18
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 );
-
/*@}*/