glx: Move __glFreeAttributeState next to its one caller
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002>
This commit is contained in:
parent
f33d61cecb
commit
aec9bf7319
|
@ -129,20 +129,3 @@ __indirect_glPopClientAttrib(void)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
__glFreeAttributeState(struct glx_context * gc)
|
||||
{
|
||||
__GLXattribute *sp, **spp;
|
||||
|
||||
for (spp = &gc->attributes.stack[0];
|
||||
spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]; spp++) {
|
||||
sp = *spp;
|
||||
if (sp) {
|
||||
free((char *) sp);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -443,8 +443,6 @@ glx_context_init(struct glx_context *gc,
|
|||
(gc)->error = code; \
|
||||
}
|
||||
|
||||
extern void __glFreeAttributeState(struct glx_context *);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,6 +46,23 @@ extern struct _glapi_table *__glXNewIndirectAPI(void);
|
|||
*/
|
||||
static struct _glapi_table *IndirectAPI = NULL;
|
||||
|
||||
static void
|
||||
__glFreeAttributeState(struct glx_context * gc)
|
||||
{
|
||||
__GLXattribute *sp, **spp;
|
||||
|
||||
for (spp = &gc->attributes.stack[0];
|
||||
spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]; spp++) {
|
||||
sp = *spp;
|
||||
if (sp) {
|
||||
free((char *) sp);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
indirect_destroy_context(struct glx_context *gc)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue