mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 04:02:36 +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);
|
||||
const CoglWinsysVtable *winsys = _cogl_framebuffer_get_winsys (framebuffer);
|
||||
CoglResizeNotifyEntry *resize_entry;
|
||||
CoglSwapBuffersNotifyEntry *swap_entry;
|
||||
|
||||
while ((resize_entry = COGL_TAILQ_FIRST (&onscreen->resize_callbacks)))
|
||||
{
|
||||
@ -122,6 +123,12 @@ _cogl_onscreen_free (CoglOnscreen *onscreen)
|
||||
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))
|
||||
framebuffer->context->window_buffer = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user