From 05cd7bc6cb0b00bbe3da69afbe8bd84b8b3270ad Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Sat, 2 Dec 2023 11:59:18 +0100 Subject: [PATCH] cogl: Remove unused Buffer:usage-hint Part-of: --- cogl/cogl/cogl-attribute-buffer.c | 1 - cogl/cogl/cogl-attribute-buffer.h | 2 +- cogl/cogl/cogl-buffer-private.h | 8 -------- cogl/cogl/cogl-buffer.c | 10 ---------- cogl/cogl/cogl-index-buffer.c | 1 - cogl/cogl/cogl-pixel-buffer.c | 1 - 6 files changed, 1 insertion(+), 22 deletions(-) diff --git a/cogl/cogl/cogl-attribute-buffer.c b/cogl/cogl/cogl-attribute-buffer.c index 8abfd2b0e..55e296dd3 100644 --- a/cogl/cogl/cogl-attribute-buffer.c +++ b/cogl/cogl/cogl-attribute-buffer.c @@ -59,7 +59,6 @@ cogl_attribute_buffer_new_with_size (CoglContext *context, "context", context, "size", bytes, "default-target", COGL_BUFFER_BIND_TARGET_ATTRIBUTE_BUFFER, - "usage-hint", COGL_BUFFER_USAGE_HINT_ATTRIBUTE_BUFFER, "update-hint", COGL_BUFFER_UPDATE_HINT_STATIC, NULL); diff --git a/cogl/cogl/cogl-attribute-buffer.h b/cogl/cogl/cogl-attribute-buffer.h index a035ced0c..5f3c52773 100644 --- a/cogl/cogl/cogl-attribute-buffer.h +++ b/cogl/cogl/cogl-attribute-buffer.h @@ -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 * 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 * storage will be allocated once you upload data to the buffer. * diff --git a/cogl/cogl/cogl-buffer-private.h b/cogl/cogl/cogl-buffer-private.h index 9249d556f..446d9aaea 100644 --- a/cogl/cogl/cogl-buffer-private.h +++ b/cogl/cogl/cogl-buffer-private.h @@ -50,13 +50,6 @@ typedef enum _CoglBufferFlags COGL_BUFFER_FLAG_MAPPED_FALLBACK = 1UL << 2 } CoglBufferFlags; -typedef enum -{ - COGL_BUFFER_USAGE_HINT_TEXTURE, - COGL_BUFFER_USAGE_HINT_ATTRIBUTE_BUFFER, - COGL_BUFFER_USAGE_HINT_INDEX_BUFFER -} CoglBufferUsageHint; - typedef enum { COGL_BUFFER_BIND_TARGET_PIXEL_PACK, @@ -79,7 +72,6 @@ struct _CoglBuffer GLuint gl_handle; /* OpenGL handle */ unsigned int size; /* size of the buffer, in bytes */ - CoglBufferUsageHint usage_hint; CoglBufferUpdateHint update_hint; /* points to the mapped memory when the CoglBuffer is a VBO, PBO, diff --git a/cogl/cogl/cogl-buffer.c b/cogl/cogl/cogl-buffer.c index 23268f32c..590586bfc 100644 --- a/cogl/cogl/cogl-buffer.c +++ b/cogl/cogl/cogl-buffer.c @@ -57,7 +57,6 @@ enum PROP_CONTEXT, PROP_SIZE, PROP_DEFAULT_TARGET, - PROP_USAGE_HINT, PROP_UPDATE_HINT, PROP_LAST @@ -162,10 +161,6 @@ cogl_buffer_set_property (GObject *gobject, } break; - case PROP_USAGE_HINT: - buffer->usage_hint = g_value_get_uint (value); - break; - case PROP_UPDATE_HINT: buffer->update_hint = g_value_get_uint (value); break; @@ -199,11 +194,6 @@ cogl_buffer_class_init (CoglBufferClass *klass) 0, G_MAXINT, 0, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | 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] = g_param_spec_uint ("update-hint", NULL, NULL, 0, G_MAXINT, 0, diff --git a/cogl/cogl/cogl-index-buffer.c b/cogl/cogl/cogl-index-buffer.c index 6b3618baf..4de5205d3 100644 --- a/cogl/cogl/cogl-index-buffer.c +++ b/cogl/cogl/cogl-index-buffer.c @@ -61,7 +61,6 @@ cogl_index_buffer_new (CoglContext *context, size_t bytes) "context", context, "size", bytes, "default-target", COGL_BUFFER_BIND_TARGET_INDEX_BUFFER, - "usage-hint", COGL_BUFFER_USAGE_HINT_INDEX_BUFFER, "update-hint", COGL_BUFFER_UPDATE_HINT_STATIC, NULL); return indices; diff --git a/cogl/cogl/cogl-pixel-buffer.c b/cogl/cogl/cogl-pixel-buffer.c index 7ececbd1b..fc238580a 100644 --- a/cogl/cogl/cogl-pixel-buffer.c +++ b/cogl/cogl/cogl-pixel-buffer.c @@ -73,7 +73,6 @@ _cogl_pixel_buffer_new (CoglContext *context, "context", context, "size", size, "default-target", COGL_BUFFER_BIND_TARGET_PIXEL_UNPACK, - "usage-hint", COGL_BUFFER_USAGE_HINT_TEXTURE, "update-hint", COGL_BUFFER_UPDATE_HINT_STATIC, NULL);