summaryrefslogtreecommitdiff
path: root/cogl/cogl-context.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-11-14 15:09:13 +0000
committerNeil Roberts <neil@linux.intel.com>2011-11-14 18:40:28 +0000
commit39ca3e51dfaa652ae4a0d936fff32a5edaca6c5f (patch)
tree16306a6ba4c351ce8cd8b2fffd15ed6c2395532b /cogl/cogl-context.c
parent18b0ad652c77723f88fa0154a28d418bd0bce035 (diff)
downloadcogl-39ca3e51dfaa652ae4a0d936fff32a5edaca6c5f.tar.gz
Don't take a reference to the last used onscreen framebuffer
Cogl keeps a pointer to the last used onscreen framebuffer from the context to implement the deprecated cogl_set_draw_buffer function which can take COGL_WINDOW_BUFFER as the target to use the last onscreen buffer. Previously this would also take a reference to that pointer. However that was causing a circular reference between the framebuffer and the context which makes it impossible to clean up resources properly when onscreen buffers are used. This patch instead changes it to just store the pointer and then clear the pointer during _cogl_onscreen_free as a kind of cheap weak reference. Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'cogl/cogl-context.c')
-rw-r--r--cogl/cogl-context.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index da41a820..b8296ece 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -408,12 +408,6 @@ _cogl_context_free (CoglContext *context)
winsys->context_deinit (context);
- if (context->window_buffer)
- {
- cogl_object_unref (context->window_buffer);
- context->window_buffer = NULL;
- }
-
_cogl_free_framebuffer_stack (context->framebuffer_stack);
if (context->current_path)