cogl: Port Buffer* away from CoglObject

Make CoglBuffer an abstract class and inherit the various Cogl*Buffer types from it.
As none of the subclasses is overriding the vtable functions, they were not turned into
vfuncs but plain function pointers in CoglBuffer.
We still use _cogl_buffer_initialize until we port the various params into actual construct-only
properties, similar to the previous commit for CoglTexture.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193>
This commit is contained in:
Bilal Elmoussaoui
2023-09-19 08:26:20 +02:00
committed by Marge Bot
parent 1d47e809e4
commit 739c59fefc
27 changed files with 228 additions and 386 deletions

View File

@ -67,7 +67,7 @@ test_map_buffer_range (void)
/* Replace the texture coordinates of the third vertex with the
* coordinates for a green texel */
data = cogl_buffer_map_range (buffer,
data = cogl_buffer_map_range (COGL_BUFFER (buffer),
sizeof (vertex_data[0]) * 2,
sizeof (vertex_data[0]),
COGL_BUFFER_ACCESS_WRITE,
@ -80,7 +80,7 @@ test_map_buffer_range (void)
data->s = 1.0f;
data->t = 0.0f;
cogl_buffer_unmap (buffer);
cogl_buffer_unmap (COGL_BUFFER (buffer));
pos_attribute =
cogl_attribute_new (buffer,
@ -117,7 +117,7 @@ test_map_buffer_range (void)
test_utils_check_pixel (test_fb, 1, fb_height - 2, 0xff0000ff);
test_utils_check_pixel (test_fb, fb_width - 2, fb_height - 2, 0xff0000ff);
cogl_object_unref (buffer);
g_object_unref (buffer);
g_object_unref (pos_attribute);
g_object_unref (tex_coord_attribute);