1
0
Fork 0

cogl: Remove unused Buffer:usage-hint

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
This commit is contained in:
Bilal Elmoussaoui 2023-12-02 11:59:18 +01:00 committed by Marge Bot
parent bc44d2855b
commit 05cd7bc6cb
6 changed files with 1 additions and 22 deletions

View file

@ -59,7 +59,6 @@ cogl_attribute_buffer_new_with_size (CoglContext *context,
"context", context, "context", context,
"size", bytes, "size", bytes,
"default-target", COGL_BUFFER_BIND_TARGET_ATTRIBUTE_BUFFER, "default-target", COGL_BUFFER_BIND_TARGET_ATTRIBUTE_BUFFER,
"usage-hint", COGL_BUFFER_USAGE_HINT_ATTRIBUTE_BUFFER,
"update-hint", COGL_BUFFER_UPDATE_HINT_STATIC, "update-hint", COGL_BUFFER_UPDATE_HINT_STATIC,
NULL); NULL);

View file

@ -81,7 +81,7 @@ GType cogl_attribute_buffer_get_type (void) G_GNUC_CONST;
* *
* The underlying storage of this buffer isn't allocated by this * The underlying storage of this buffer isn't allocated by this
* function so that you have an opportunity to use the * function so that you have an opportunity to use the
* cogl_buffer_set_update_hint() and cogl_buffer_set_usage_hint() * cogl_buffer_set_update_hint()
* functions which may influence how the storage is allocated. The * functions which may influence how the storage is allocated. The
* storage will be allocated once you upload data to the buffer. * storage will be allocated once you upload data to the buffer.
* *

View file

@ -50,13 +50,6 @@ typedef enum _CoglBufferFlags
COGL_BUFFER_FLAG_MAPPED_FALLBACK = 1UL << 2 COGL_BUFFER_FLAG_MAPPED_FALLBACK = 1UL << 2
} CoglBufferFlags; } CoglBufferFlags;
typedef enum
{
COGL_BUFFER_USAGE_HINT_TEXTURE,
COGL_BUFFER_USAGE_HINT_ATTRIBUTE_BUFFER,
COGL_BUFFER_USAGE_HINT_INDEX_BUFFER
} CoglBufferUsageHint;
typedef enum typedef enum
{ {
COGL_BUFFER_BIND_TARGET_PIXEL_PACK, COGL_BUFFER_BIND_TARGET_PIXEL_PACK,
@ -79,7 +72,6 @@ struct _CoglBuffer
GLuint gl_handle; /* OpenGL handle */ GLuint gl_handle; /* OpenGL handle */
unsigned int size; /* size of the buffer, in bytes */ unsigned int size; /* size of the buffer, in bytes */
CoglBufferUsageHint usage_hint;
CoglBufferUpdateHint update_hint; CoglBufferUpdateHint update_hint;
/* points to the mapped memory when the CoglBuffer is a VBO, PBO, /* points to the mapped memory when the CoglBuffer is a VBO, PBO,

View file

@ -57,7 +57,6 @@ enum
PROP_CONTEXT, PROP_CONTEXT,
PROP_SIZE, PROP_SIZE,
PROP_DEFAULT_TARGET, PROP_DEFAULT_TARGET,
PROP_USAGE_HINT,
PROP_UPDATE_HINT, PROP_UPDATE_HINT,
PROP_LAST PROP_LAST
@ -162,10 +161,6 @@ cogl_buffer_set_property (GObject *gobject,
} }
break; break;
case PROP_USAGE_HINT:
buffer->usage_hint = g_value_get_uint (value);
break;
case PROP_UPDATE_HINT: case PROP_UPDATE_HINT:
buffer->update_hint = g_value_get_uint (value); buffer->update_hint = g_value_get_uint (value);
break; break;
@ -199,11 +194,6 @@ cogl_buffer_class_init (CoglBufferClass *klass)
0, G_MAXINT, 0, 0, G_MAXINT, 0,
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_USAGE_HINT] =
g_param_spec_uint ("usage-hint", NULL, NULL,
0, G_MAXINT, 0,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
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_uint ("update-hint", NULL, NULL,
0, G_MAXINT, 0, 0, G_MAXINT, 0,

View file

@ -61,7 +61,6 @@ cogl_index_buffer_new (CoglContext *context, size_t bytes)
"context", context, "context", context,
"size", bytes, "size", bytes,
"default-target", COGL_BUFFER_BIND_TARGET_INDEX_BUFFER, "default-target", COGL_BUFFER_BIND_TARGET_INDEX_BUFFER,
"usage-hint", COGL_BUFFER_USAGE_HINT_INDEX_BUFFER,
"update-hint", COGL_BUFFER_UPDATE_HINT_STATIC, "update-hint", COGL_BUFFER_UPDATE_HINT_STATIC,
NULL); NULL);
return indices; return indices;

View file

@ -73,7 +73,6 @@ _cogl_pixel_buffer_new (CoglContext *context,
"context", context, "context", context,
"size", size, "size", size,
"default-target", COGL_BUFFER_BIND_TARGET_PIXEL_UNPACK, "default-target", COGL_BUFFER_BIND_TARGET_PIXEL_UNPACK,
"usage-hint", COGL_BUFFER_USAGE_HINT_TEXTURE,
"update-hint", COGL_BUFFER_UPDATE_HINT_STATIC, "update-hint", COGL_BUFFER_UPDATE_HINT_STATIC,
NULL); NULL);