buffer: explicitly relate buffers to a context

All CoglBuffer constructors now take an explicit CoglContext
constructor. This is part of the on going effort to adapt to Cogl API so
it no longer depends on a global, default context.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg
2012-02-06 17:08:58 +00:00
parent 269878217f
commit 3ea6acc072
26 changed files with 214 additions and 148 deletions

View File

@ -34,6 +34,7 @@
#include <glib.h>
#include <cogl/cogl-types.h>
#include <cogl/cogl-context.h>
G_BEGIN_DECLS
@ -54,6 +55,7 @@ typedef struct _CoglPixelBuffer CoglPixelBuffer;
/**
* cogl_pixel_buffer_new_with_size:
* @context: A #CoglContext
* @width: width of the pixel array in pixels
* @height: height of the pixel array in pixels
* @format: the format of the pixels the array will store
@ -75,7 +77,8 @@ typedef struct _CoglPixelBuffer CoglPixelBuffer;
* Stability: Unstable
*/
CoglPixelBuffer *
cogl_pixel_buffer_new_with_size (unsigned int width,
cogl_pixel_buffer_new_with_size (CoglContext *context,
unsigned int width,
unsigned int height,
CoglPixelFormat format,
unsigned int *stride);