mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
cogl-buffer: Handle subclass registration like cogl-texture
Instead of having to extend cogl_is_buffer with new buffer types manually this now adds a new COGL_BUFFER_DEFINE macro to be used instead of COGL_OBJECT_DEFINE for CoglBuffer subclasses. This macro will automatically register the new type with ctx->buffer_types which will iterated by cogl_is_buffer. This is the same coding pattern used for CoglTexture.
This commit is contained in:
@ -84,7 +84,7 @@ cogl_pixel_buffer_vtable;
|
||||
static const CoglBufferVtable
|
||||
cogl_malloc_pixel_buffer_vtable;
|
||||
|
||||
COGL_OBJECT_DEFINE (PixelBuffer, pixel_buffer)
|
||||
COGL_BUFFER_DEFINE (PixelBuffer, pixel_buffer)
|
||||
|
||||
CoglPixelBuffer *
|
||||
cogl_pixel_buffer_new (unsigned int size)
|
||||
|
Reference in New Issue
Block a user