cogl: Generate a GType for Buffer{BindTarget|UpdateHint}
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3357>
This commit is contained in:
parent
3280fee8bc
commit
f20cb09f34
@ -43,6 +43,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
#include "cogl/cogl-enum-types.h"
|
||||||
#include "cogl/cogl-util.h"
|
#include "cogl/cogl-util.h"
|
||||||
#include "cogl/cogl-context-private.h"
|
#include "cogl/cogl-context-private.h"
|
||||||
#include "cogl/cogl-pixel-buffer-private.h"
|
#include "cogl/cogl-pixel-buffer-private.h"
|
||||||
@ -135,7 +136,7 @@ cogl_buffer_set_property (GObject *gobject,
|
|||||||
{
|
{
|
||||||
gboolean use_malloc = FALSE;
|
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 ||
|
if (buffer->last_target == COGL_BUFFER_BIND_TARGET_PIXEL_PACK ||
|
||||||
buffer->last_target == COGL_BUFFER_BIND_TARGET_PIXEL_UNPACK)
|
buffer->last_target == COGL_BUFFER_BIND_TARGET_PIXEL_UNPACK)
|
||||||
{
|
{
|
||||||
@ -165,7 +166,7 @@ cogl_buffer_set_property (GObject *gobject,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_UPDATE_HINT:
|
case PROP_UPDATE_HINT:
|
||||||
buffer->update_hint = g_value_get_uint (value);
|
buffer->update_hint = g_value_get_enum (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -193,13 +194,15 @@ cogl_buffer_class_init (CoglBufferClass *klass)
|
|||||||
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
|
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
|
||||||
G_PARAM_STATIC_STRINGS);
|
G_PARAM_STATIC_STRINGS);
|
||||||
obj_props[PROP_DEFAULT_TARGET] =
|
obj_props[PROP_DEFAULT_TARGET] =
|
||||||
g_param_spec_uint ("default-target", NULL, NULL,
|
g_param_spec_enum ("default-target", NULL, NULL,
|
||||||
0, G_MAXINT, 0,
|
COGL_TYPE_BUFFER_BIND_TARGET,
|
||||||
|
COGL_BUFFER_BIND_TARGET_PIXEL_PACK,
|
||||||
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
|
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
|
||||||
G_PARAM_STATIC_STRINGS);
|
G_PARAM_STATIC_STRINGS);
|
||||||
obj_props[PROP_UPDATE_HINT] =
|
obj_props[PROP_UPDATE_HINT] =
|
||||||
g_param_spec_uint ("update-hint", NULL, NULL,
|
g_param_spec_enum ("update-hint", NULL, NULL,
|
||||||
0, G_MAXINT, 0,
|
COGL_TYPE_BUFFER_UPDATE_HINT,
|
||||||
|
COGL_BUFFER_UPDATE_HINT_STATIC,
|
||||||
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT |
|
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT |
|
||||||
G_PARAM_STATIC_STRINGS);
|
G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ cogl_nonintrospected_headers = [
|
|||||||
'cogl-atlas-texture.h',
|
'cogl-atlas-texture.h',
|
||||||
'cogl-attribute-buffer.h',
|
'cogl-attribute-buffer.h',
|
||||||
'cogl-attribute.h',
|
'cogl-attribute.h',
|
||||||
'cogl-buffer.h',
|
|
||||||
'cogl-depth-state.h',
|
'cogl-depth-state.h',
|
||||||
'cogl-display.h',
|
'cogl-display.h',
|
||||||
'cogl-dma-buf-handle.h',
|
'cogl-dma-buf-handle.h',
|
||||||
@ -356,6 +355,7 @@ if have_egl_xlib
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
cogl_enum_headers = [
|
cogl_enum_headers = [
|
||||||
|
'cogl-buffer.h',
|
||||||
'cogl-pixel-format.h',
|
'cogl-pixel-format.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user