mirror of
https://github.com/brl/mutter.git
synced 2025-01-26 19:39:20 +00:00
onscreen: Free swap notify callback state
When freeing a CoglOnscreen we weren't freeing the state associated with swap notification callbacks. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 70bc12fe20fa1be4eac58356861a730f18d6b59e)
This commit is contained in:
parent
56382435fa
commit
8f4dd4587e
@ -115,6 +115,7 @@ _cogl_onscreen_free (CoglOnscreen *onscreen)
|
|||||||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||||
const CoglWinsysVtable *winsys = _cogl_framebuffer_get_winsys (framebuffer);
|
const CoglWinsysVtable *winsys = _cogl_framebuffer_get_winsys (framebuffer);
|
||||||
CoglResizeNotifyEntry *resize_entry;
|
CoglResizeNotifyEntry *resize_entry;
|
||||||
|
CoglSwapBuffersNotifyEntry *swap_entry;
|
||||||
|
|
||||||
while ((resize_entry = COGL_TAILQ_FIRST (&onscreen->resize_callbacks)))
|
while ((resize_entry = COGL_TAILQ_FIRST (&onscreen->resize_callbacks)))
|
||||||
{
|
{
|
||||||
@ -122,6 +123,12 @@ _cogl_onscreen_free (CoglOnscreen *onscreen)
|
|||||||
g_slice_free (CoglResizeNotifyEntry, resize_entry);
|
g_slice_free (CoglResizeNotifyEntry, resize_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while ((swap_entry = COGL_TAILQ_FIRST (&onscreen->swap_callbacks)))
|
||||||
|
{
|
||||||
|
COGL_TAILQ_REMOVE (&onscreen->swap_callbacks, swap_entry, list_node);
|
||||||
|
g_slice_free (CoglSwapBuffersNotifyEntry, swap_entry);
|
||||||
|
}
|
||||||
|
|
||||||
if (framebuffer->context->window_buffer == COGL_FRAMEBUFFER (onscreen))
|
if (framebuffer->context->window_buffer == COGL_FRAMEBUFFER (onscreen))
|
||||||
framebuffer->context->window_buffer = NULL;
|
framebuffer->context->window_buffer = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user