cogl: Port Texture* away from CoglObject
- Make Texture a parent GObject class and move the vtable funcs as vfuncs instead of an interface as we would like to have dispose free the TextureLoader. - Make the various texture sub-types inherit from it. - Make all the sub-types constructors return a CoglTexture instead of their respective specific type. As most of the times, the used functions accept a CoglTexture, like all the GTK widgets constructors returning GtkWidget. - Fix up the basics of gi-docgen for all these types. - Remove CoglPrimitiveTexture as it is useless: It is just a texture underhood. - Remove CoglMetaTexture: for the exact same reason as above. - Switch various memory management functions to use g_ variant instead of the cogl_ one Note we would still want to get rid of the _cogl_texture_init which is something for the next commit Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193>
This commit is contained in:

committed by
Marge Bot

parent
586c43d5a9
commit
863163cc6e
@ -313,7 +313,7 @@ draw_cursor_sprite_via_offscreen (MetaScreenCastStreamSrc *src,
|
||||
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
||||
CoglContext *cogl_context =
|
||||
clutter_backend_get_cogl_context (clutter_backend);
|
||||
CoglTexture2D *bitmap_texture;
|
||||
CoglTexture *bitmap_texture;
|
||||
CoglOffscreen *offscreen;
|
||||
CoglFramebuffer *fb;
|
||||
CoglPipeline *pipeline;
|
||||
@ -322,17 +322,16 @@ draw_cursor_sprite_via_offscreen (MetaScreenCastStreamSrc *src,
|
||||
|
||||
bitmap_texture = cogl_texture_2d_new_with_size (cogl_context,
|
||||
bitmap_width, bitmap_height);
|
||||
cogl_primitive_texture_set_auto_mipmap (COGL_PRIMITIVE_TEXTURE (bitmap_texture),
|
||||
FALSE);
|
||||
if (!cogl_texture_allocate (COGL_TEXTURE (bitmap_texture), error))
|
||||
cogl_primitive_texture_set_auto_mipmap (bitmap_texture, FALSE);
|
||||
if (!cogl_texture_allocate (bitmap_texture, error))
|
||||
{
|
||||
cogl_object_unref (bitmap_texture);
|
||||
g_object_unref (bitmap_texture);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
offscreen = cogl_offscreen_new_with_texture (COGL_TEXTURE (bitmap_texture));
|
||||
offscreen = cogl_offscreen_new_with_texture (bitmap_texture);
|
||||
fb = COGL_FRAMEBUFFER (offscreen);
|
||||
cogl_object_unref (bitmap_texture);
|
||||
g_object_unref (bitmap_texture);
|
||||
if (!cogl_framebuffer_allocate (fb, error))
|
||||
{
|
||||
g_object_unref (fb);
|
||||
|
Reference in New Issue
Block a user