framebuffer: Adds a context getter for CoglFramebuffer

This adds a function to query what CoglContext a given framebuffer
belongs too. This can be useful if you pass framebuffer pointers around
and at some point you want to create another framebuffer as part of the
same context as a given framebuffer without assuming there is a single
default context.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg
2011-08-02 15:24:02 +01:00
parent f3a4d21187
commit 64b2bbab84
3 changed files with 25 additions and 0 deletions

View File

@ -1549,6 +1549,14 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
framebuffer->dither_enabled = dither_enabled;
}
CoglContext *
cogl_framebuffer_get_context (CoglFramebuffer *framebuffer)
{
g_return_val_if_fail (framebuffer != NULL, NULL);
return framebuffer->context;
}
gboolean
_cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer,
int x,