cogl: Generate a GType for Buffer{BindTarget|UpdateHint}

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3357>
This commit is contained in:
Bilal Elmoussaoui 2024-01-02 14:33:24 +01:00 committed by Marge Bot
parent 3280fee8bc
commit f20cb09f34
2 changed files with 10 additions and 7 deletions

View File

@ -43,6 +43,7 @@
#include <string.h>
#include <glib.h>
#include "cogl/cogl-enum-types.h"
#include "cogl/cogl-util.h"
#include "cogl/cogl-context-private.h"
#include "cogl/cogl-pixel-buffer-private.h"
@ -135,7 +136,7 @@ cogl_buffer_set_property (GObject *gobject,
{
gboolean use_malloc = FALSE;
buffer->last_target = g_value_get_uint (value);
buffer->last_target = g_value_get_enum (value);
if (buffer->last_target == COGL_BUFFER_BIND_TARGET_PIXEL_PACK ||
buffer->last_target == COGL_BUFFER_BIND_TARGET_PIXEL_UNPACK)
{
@ -165,7 +166,7 @@ cogl_buffer_set_property (GObject *gobject,
break;
case PROP_UPDATE_HINT:
buffer->update_hint = g_value_get_uint (value);
buffer->update_hint = g_value_get_enum (value);
break;
default:
@ -193,13 +194,15 @@ cogl_buffer_class_init (CoglBufferClass *klass)
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_DEFAULT_TARGET] =
g_param_spec_uint ("default-target", NULL, NULL,
0, G_MAXINT, 0,
g_param_spec_enum ("default-target", NULL, NULL,
COGL_TYPE_BUFFER_BIND_TARGET,
COGL_BUFFER_BIND_TARGET_PIXEL_PACK,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_UPDATE_HINT] =
g_param_spec_uint ("update-hint", NULL, NULL,
0, G_MAXINT, 0,
g_param_spec_enum ("update-hint", NULL, NULL,
COGL_TYPE_BUFFER_UPDATE_HINT,
COGL_BUFFER_UPDATE_HINT_STATIC,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);

View File

@ -32,7 +32,6 @@ cogl_nonintrospected_headers = [
'cogl-atlas-texture.h',
'cogl-attribute-buffer.h',
'cogl-attribute.h',
'cogl-buffer.h',
'cogl-depth-state.h',
'cogl-display.h',
'cogl-dma-buf-handle.h',
@ -356,6 +355,7 @@ if have_egl_xlib
endif
cogl_enum_headers = [
'cogl-buffer.h',
'cogl-pixel-format.h',
]