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:
Bilal Elmoussaoui
2023-09-18 16:58:36 +02:00
committed by Marge Bot
parent 586c43d5a9
commit 863163cc6e
115 changed files with 2278 additions and 2449 deletions

View File

@ -119,7 +119,7 @@ meta_wayland_single_pixel_buffer_attach (MetaWaylandBuffer *buffer,
wl_resource_get_user_data (buffer->resource);
uint8_t data[4];
CoglPixelFormat pixel_format;
CoglTexture2D *tex_2d;
CoglTexture *tex_2d;
if (buffer->single_pixel.texture)
return TRUE;
@ -143,7 +143,7 @@ meta_wayland_single_pixel_buffer_attach (MetaWaylandBuffer *buffer,
return FALSE;
buffer->single_pixel.texture =
meta_multi_texture_new_simple (COGL_TEXTURE (tex_2d));
meta_multi_texture_new_simple (tex_2d);
g_clear_object (texture);
*texture = g_object_ref (buffer->single_pixel.texture);