mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
cogl-texture: List texture subclass types rather than hardcoding them
Instead of having a hardcoded series of if-statements in cogl_is_texture to determine which types should appear as texture subclasses, they are now stored in a GSList attached to the Cogl context. The list is amended to using a new cogl_texture_register_type function. There is a convenience macro called COGL_TEXTURE_DEFINE which uses COGL_HANDLE_DEFINE_WITH_CODE to register the texture type when the _get_type() function is first called.
This commit is contained in:
@ -44,7 +44,7 @@
|
||||
|
||||
static void _cogl_texture_2d_free (CoglTexture2D *tex_2d);
|
||||
|
||||
COGL_HANDLE_DEFINE (Texture2D, texture_2d);
|
||||
COGL_TEXTURE_DEFINE (Texture2D, texture_2d);
|
||||
|
||||
static const CoglTextureVtable cogl_texture_2d_vtable;
|
||||
|
||||
|
Reference in New Issue
Block a user