[gtk/wip/chergert/glproto: 490/493] shorten array names
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 490/493] shorten array names
- Date: Fri, 19 Feb 2021 02:25:25 +0000 (UTC)
commit 851a7ca7a962f226d7ce463b770e88d7deaa3e66
Author: Christian Hergert <chergert redhat com>
Date: Wed Feb 17 15:24:18 2021 -0800
shorten array names
gsk/next/gskglcommandqueue.c | 34 +++++++++++++++++-----------------
gsk/next/gskglcommandqueueprivate.h | 14 +++++++-------
2 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 0c0b9b60fa..5725191f66 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -231,9 +231,9 @@ gsk_gl_command_queue_capture_png (GskGLCommandQueue *self,
static inline guint
snapshot_attachments (const GskGLAttachmentState *state,
- GskGLCommandBindArray *array)
+ GskGLCommandBinds *array)
{
- GskGLCommandBind *bind = gsk_gl_command_bind_array_append_n (array, G_N_ELEMENTS (state->textures));
+ GskGLCommandBind *bind = gsk_gl_command_binds_append_n (array, G_N_ELEMENTS (state->textures));
guint count = 0;
for (guint i = 0; i < G_N_ELEMENTS (state->textures); i++)
@@ -253,11 +253,11 @@ snapshot_attachments (const GskGLAttachmentState *state,
}
static inline guint
-snapshot_uniforms (GskGLUniformState *state,
- GskGLUniformProgram *program,
- GskGLCommandUniformArray *array)
+snapshot_uniforms (GskGLUniformState *state,
+ GskGLUniformProgram *program,
+ GskGLCommandUniforms *array)
{
- GskGLCommandUniform *uniform = gsk_gl_command_uniform_array_append_n (array, program->n_sparse);
+ GskGLCommandUniform *uniform = gsk_gl_command_uniforms_append_n (array, program->n_sparse);
guint count = 0;
for (guint i = 0; i < program->n_sparse; i++)
@@ -379,9 +379,9 @@ gsk_gl_command_queue_dispose (GObject *object)
g_clear_pointer (&self->attachments, gsk_gl_attachment_state_unref);
g_clear_pointer (&self->uniforms, gsk_gl_uniform_state_unref);
- gsk_gl_command_batch_array_clear (&self->batches);
- gsk_gl_command_bind_array_clear (&self->batch_binds);
- gsk_gl_command_uniform_array_clear (&self->batch_uniforms);
+ gsk_gl_command_batches_clear (&self->batches);
+ gsk_gl_command_binds_clear (&self->batch_binds);
+ gsk_gl_command_uniforms_clear (&self->batch_uniforms);
gsk_gl_buffer_destroy (&self->vertices);
@@ -401,9 +401,9 @@ gsk_gl_command_queue_init (GskGLCommandQueue *self)
{
self->max_texture_size = -1;
- gsk_gl_command_batch_array_init (&self->batches, 128);
- gsk_gl_command_bind_array_init (&self->batch_binds, 1024);
- gsk_gl_command_uniform_array_init (&self->batch_uniforms, 2048);
+ gsk_gl_command_batches_init (&self->batches, 128);
+ gsk_gl_command_binds_init (&self->batch_binds, 1024);
+ gsk_gl_command_uniforms_init (&self->batch_uniforms, 2048);
self->debug_groups = g_string_chunk_new (4096);
@@ -442,7 +442,7 @@ begin_next_batch (GskGLCommandQueue *self)
g_assert (GSK_IS_GL_COMMAND_QUEUE (self));
- batch = gsk_gl_command_batch_array_append (&self->batches);
+ batch = gsk_gl_command_batches_append (&self->batches);
batch->any.next_batch_index = -1;
batch->any.prev_batch_index = self->tail_batch_index;
@@ -532,7 +532,7 @@ gsk_gl_command_queue_end_draw (GskGLCommandQueue *self)
if (self->batches.len == G_MAXINT16)
return;
- batch = gsk_gl_command_batch_array_tail (&self->batches);
+ batch = gsk_gl_command_batches_tail (&self->batches);
g_assert (self->in_draw == TRUE);
g_assert (batch->any.kind == GSK_GL_COMMAND_KIND_DRAW);
@@ -621,7 +621,7 @@ gsk_gl_command_queue_split_draw (GskGLCommandQueue *self)
program = self->program_info;
- batch = gsk_gl_command_batch_array_tail (&self->batches);
+ batch = gsk_gl_command_batches_tail (&self->batches);
g_assert (batch->any.kind == GSK_GL_COMMAND_KIND_DRAW);
@@ -874,8 +874,8 @@ gsk_gl_command_queue_insert_before (GskGLCommandQueue *self,
g_assert (sibling >= self->batches.items);
g_assert (sibling < &self->batches.items[self->batches.len]);
- index = gsk_gl_command_batch_array_index_of (&self->batches, batch);
- sibling_index = gsk_gl_command_batch_array_index_of (&self->batches, sibling);
+ index = gsk_gl_command_batches_index_of (&self->batches, batch);
+ sibling_index = gsk_gl_command_batches_index_of (&self->batches, sibling);
batch->any.next_batch_index = sibling_index;
batch->any.prev_batch_index = sibling->any.prev_batch_index;
diff --git a/gsk/next/gskglcommandqueueprivate.h b/gsk/next/gskglcommandqueueprivate.h
index f53185abce..39d6fd0315 100644
--- a/gsk/next/gskglcommandqueueprivate.h
+++ b/gsk/next/gskglcommandqueueprivate.h
@@ -167,9 +167,9 @@ typedef union _GskGLCommandBatch
G_STATIC_ASSERT (sizeof (GskGLCommandBatch) == 32);
-DEFINE_INLINE_ARRAY (GskGLCommandBatchArray, gsk_gl_command_batch_array, GskGLCommandBatch)
-DEFINE_INLINE_ARRAY (GskGLCommandBindArray, gsk_gl_command_bind_array, GskGLCommandBind)
-DEFINE_INLINE_ARRAY (GskGLCommandUniformArray, gsk_gl_command_uniform_array, GskGLCommandUniform)
+DEFINE_INLINE_ARRAY (GskGLCommandBatches, gsk_gl_command_batches, GskGLCommandBatch)
+DEFINE_INLINE_ARRAY (GskGLCommandBinds, gsk_gl_command_binds, GskGLCommandBind)
+DEFINE_INLINE_ARRAY (GskGLCommandUniforms, gsk_gl_command_uniforms, GskGLCommandUniform)
struct _GskGLCommandQueue
{
@@ -183,7 +183,7 @@ struct _GskGLCommandQueue
* together. The idea here is that we reduce the need for pointers so that
* using g_realloc()'d arrays is fine.
*/
- GskGLCommandBatchArray batches;
+ GskGLCommandBatches batches;
/* Contains array of vertices and some wrapper code to help upload them
* to the GL driver. We can also tweak this to use double buffered arrays
@@ -217,13 +217,13 @@ struct _GskGLCommandQueue
* to which slot. GskGLCommandDraw.bind_offset and bind_count reference this
* array to determine what to attach.
*/
- GskGLCommandBindArray batch_binds;
+ GskGLCommandBinds batch_binds;
/* Array of GskGLCommandUniform denoting which uniforms must be updated
* before the glDrawArrays() may be called. These are referenced from the
* GskGLCommandDraw.uniform_offset and uniform_count fields.
*/
- GskGLCommandUniformArray batch_uniforms;
+ GskGLCommandUniforms batch_uniforms;
/* String storage for debug groups */
GStringChunk *debug_groups;
@@ -312,7 +312,7 @@ void gsk_gl_command_queue_split_draw (GskGLCommandQueue
static inline GskGLCommandBatch *
gsk_gl_command_queue_get_batch (GskGLCommandQueue *self)
{
- return gsk_gl_command_batch_array_tail (&self->batches);
+ return gsk_gl_command_batches_tail (&self->batches);
}
static inline GskGLDrawVertex *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]