[gtk/glshader-paintable: 2/8] Finish remaining renames from GLSHADER to GL_SHADER (etc)
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/glshader-paintable: 2/8] Finish remaining renames from GLSHADER to GL_SHADER (etc)
- Date: Fri, 25 Sep 2020 21:22:39 +0000 (UTC)
commit a234ab1e5512d03887602d301f225c9ca5fe845f
Author: Alexander Larsson <alexl redhat com>
Date: Fri Sep 25 14:31:44 2020 +0200
Finish remaining renames from GLSHADER to GL_SHADER (etc)
This fixes all remaining cases in public headers.
gsk/gl/gskglrenderer.c | 16 ++++----
gsk/gskenums.h | 32 ++++++++--------
gsk/gskglshader.c | 98 +++++++++++++++++++++++------------------------
gsk/gskglshader.h | 2 +-
gsk/gskrendernode.h | 2 +-
gsk/gskrendernodeimpl.c | 2 +-
gsk/gskrendernodeparser.c | 48 +++++++++++------------
gtk/inspector/recorder.c | 16 ++++----
testsuite/gsk/shader.c | 16 ++++----
9 files changed, 116 insertions(+), 116 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index cb7fe8aaeb..78c653ef3c 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -3064,25 +3064,25 @@ apply_gl_shader_args_op (const Program *program,
switch (u->type)
{
default:
- case GSK_GLUNIFORM_TYPE_NONE:
+ case GSK_GL_UNIFORM_TYPE_NONE:
break;
- case GSK_GLUNIFORM_TYPE_FLOAT:
+ case GSK_GL_UNIFORM_TYPE_FLOAT:
glUniform1fv (program->glshader.args_locations[i], 1, (const float *)data);
break;
- case GSK_GLUNIFORM_TYPE_INT:
+ case GSK_GL_UNIFORM_TYPE_INT:
glUniform1iv (program->glshader.args_locations[i], 1, (const gint32 *)data);
break;
- case GSK_GLUNIFORM_TYPE_UINT:
- case GSK_GLUNIFORM_TYPE_BOOL:
+ case GSK_GL_UNIFORM_TYPE_UINT:
+ case GSK_GL_UNIFORM_TYPE_BOOL:
glUniform1uiv (program->glshader.args_locations[i], 1, (const guint32 *) data);
break;
- case GSK_GLUNIFORM_TYPE_VEC2:
+ case GSK_GL_UNIFORM_TYPE_VEC2:
glUniform2fv (program->glshader.args_locations[i], 1, (const float *)data);
break;
- case GSK_GLUNIFORM_TYPE_VEC3:
+ case GSK_GL_UNIFORM_TYPE_VEC3:
glUniform3fv (program->glshader.args_locations[i], 1, (const float *)data);
break;
- case GSK_GLUNIFORM_TYPE_VEC4:
+ case GSK_GL_UNIFORM_TYPE_VEC4:
glUniform4fv (program->glshader.args_locations[i], 1, (const float *)data);
break;
}
diff --git a/gsk/gskenums.h b/gsk/gskenums.h
index 3db02599db..0cd0c284fc 100644
--- a/gsk/gskenums.h
+++ b/gsk/gskenums.h
@@ -222,14 +222,14 @@ typedef enum
/**
* GskGLUniformType:
- * @GSK_GLUNIFORM_TYPE_NONE: No type, used for uninitialized or unspecified values.
- * @GSK_GLUNIFORM_TYPE_FLOAT: A float uniform
- * @GSK_GLUNIFORM_TYPE_INT: A GLSL int / gint32 uniform
- * @GSK_GLUNIFORM_TYPE_UINT: A GLSL uint / guint32 uniform
- * @GSK_GLUNIFORM_TYPE_BOOL: A GLSL bool / gboolean uniform
- * @GSK_GLUNIFORM_TYPE_VEC2: A GLSL vec2 / graphene_vec2_t uniform
- * @GSK_GLUNIFORM_TYPE_VEC3: A GLSL vec3 / graphene_vec3_t uniform
- * @GSK_GLUNIFORM_TYPE_VEC4: A GLSL vec4 / graphene_vec4_t uniform
+ * @GSK_GL_UNIFORM_TYPE_NONE: No type, used for uninitialized or unspecified values.
+ * @GSK_GL_UNIFORM_TYPE_FLOAT: A float uniform
+ * @GSK_GL_UNIFORM_TYPE_INT: A GLSL int / gint32 uniform
+ * @GSK_GL_UNIFORM_TYPE_UINT: A GLSL uint / guint32 uniform
+ * @GSK_GL_UNIFORM_TYPE_BOOL: A GLSL bool / gboolean uniform
+ * @GSK_GL_UNIFORM_TYPE_VEC2: A GLSL vec2 / graphene_vec2_t uniform
+ * @GSK_GL_UNIFORM_TYPE_VEC3: A GLSL vec3 / graphene_vec3_t uniform
+ * @GSK_GL_UNIFORM_TYPE_VEC4: A GLSL vec4 / graphene_vec4_t uniform
*
* This defines the types of the uniforms that #GskGLShaders
* declare. It defines both what the type is called in the GLSL shader
@@ -237,14 +237,14 @@ typedef enum
*/
typedef enum
{
- GSK_GLUNIFORM_TYPE_NONE,
- GSK_GLUNIFORM_TYPE_FLOAT,
- GSK_GLUNIFORM_TYPE_INT,
- GSK_GLUNIFORM_TYPE_UINT,
- GSK_GLUNIFORM_TYPE_BOOL,
- GSK_GLUNIFORM_TYPE_VEC2,
- GSK_GLUNIFORM_TYPE_VEC3,
- GSK_GLUNIFORM_TYPE_VEC4,
+ GSK_GL_UNIFORM_TYPE_NONE,
+ GSK_GL_UNIFORM_TYPE_FLOAT,
+ GSK_GL_UNIFORM_TYPE_INT,
+ GSK_GL_UNIFORM_TYPE_UINT,
+ GSK_GL_UNIFORM_TYPE_BOOL,
+ GSK_GL_UNIFORM_TYPE_VEC2,
+ GSK_GL_UNIFORM_TYPE_VEC3,
+ GSK_GL_UNIFORM_TYPE_VEC4,
} GskGLUniformType;
diff --git a/gsk/gskglshader.c b/gsk/gskglshader.c
index c1a336c214..e58ec4dcba 100644
--- a/gsk/gskglshader.c
+++ b/gsk/gskglshader.c
@@ -118,21 +118,21 @@ static GskGLUniformType
uniform_type_from_glsl (const char *str)
{
if (strcmp (str, "int") == 0)
- return GSK_GLUNIFORM_TYPE_INT;
+ return GSK_GL_UNIFORM_TYPE_INT;
if (strcmp (str, "uint") == 0)
- return GSK_GLUNIFORM_TYPE_UINT;
+ return GSK_GL_UNIFORM_TYPE_UINT;
if (strcmp (str, "bool") == 0)
- return GSK_GLUNIFORM_TYPE_BOOL;
+ return GSK_GL_UNIFORM_TYPE_BOOL;
if (strcmp (str, "float") == 0)
- return GSK_GLUNIFORM_TYPE_FLOAT;
+ return GSK_GL_UNIFORM_TYPE_FLOAT;
if (strcmp (str, "vec2") == 0)
- return GSK_GLUNIFORM_TYPE_VEC2;
+ return GSK_GL_UNIFORM_TYPE_VEC2;
if (strcmp (str, "vec3") == 0)
- return GSK_GLUNIFORM_TYPE_VEC3;
+ return GSK_GL_UNIFORM_TYPE_VEC3;
if (strcmp (str, "vec4") == 0)
- return GSK_GLUNIFORM_TYPE_VEC4;
+ return GSK_GL_UNIFORM_TYPE_VEC4;
- return GSK_GLUNIFORM_TYPE_NONE;
+ return GSK_GL_UNIFORM_TYPE_NONE;
}
static const char *
@@ -140,28 +140,28 @@ uniform_type_name (GskGLUniformType type)
{
switch (type)
{
- case GSK_GLUNIFORM_TYPE_FLOAT:
+ case GSK_GL_UNIFORM_TYPE_FLOAT:
return "float";
- case GSK_GLUNIFORM_TYPE_INT:
+ case GSK_GL_UNIFORM_TYPE_INT:
return "int";
- case GSK_GLUNIFORM_TYPE_UINT:
+ case GSK_GL_UNIFORM_TYPE_UINT:
return "uint";
- case GSK_GLUNIFORM_TYPE_BOOL:
+ case GSK_GL_UNIFORM_TYPE_BOOL:
return "bool";
- case GSK_GLUNIFORM_TYPE_VEC2:
+ case GSK_GL_UNIFORM_TYPE_VEC2:
return "vec2";
- case GSK_GLUNIFORM_TYPE_VEC3:
+ case GSK_GL_UNIFORM_TYPE_VEC3:
return "vec3";
- case GSK_GLUNIFORM_TYPE_VEC4:
+ case GSK_GL_UNIFORM_TYPE_VEC4:
return "vec4";
- case GSK_GLUNIFORM_TYPE_NONE:
+ case GSK_GL_UNIFORM_TYPE_NONE:
default:
g_assert_not_reached ();
return NULL;
@@ -173,26 +173,26 @@ uniform_type_size (GskGLUniformType type)
{
switch (type)
{
- case GSK_GLUNIFORM_TYPE_FLOAT:
+ case GSK_GL_UNIFORM_TYPE_FLOAT:
return sizeof (float);
- case GSK_GLUNIFORM_TYPE_INT:
+ case GSK_GL_UNIFORM_TYPE_INT:
return sizeof (gint32);
- case GSK_GLUNIFORM_TYPE_UINT:
- case GSK_GLUNIFORM_TYPE_BOOL:
+ case GSK_GL_UNIFORM_TYPE_UINT:
+ case GSK_GL_UNIFORM_TYPE_BOOL:
return sizeof (guint32);
- case GSK_GLUNIFORM_TYPE_VEC2:
+ case GSK_GL_UNIFORM_TYPE_VEC2:
return sizeof (float) * 2;
- case GSK_GLUNIFORM_TYPE_VEC3:
+ case GSK_GL_UNIFORM_TYPE_VEC3:
return sizeof (float) * 3;
- case GSK_GLUNIFORM_TYPE_VEC4:
+ case GSK_GL_UNIFORM_TYPE_VEC4:
return sizeof (float) * 4;
- case GSK_GLUNIFORM_TYPE_NONE:
+ case GSK_GL_UNIFORM_TYPE_NONE:
default:
g_assert_not_reached ();
return 0;
@@ -356,7 +356,7 @@ gsk_gl_shader_constructed (GObject *object)
else
{
GskGLUniformType utype = uniform_type_from_glsl (type);
- g_assert (utype != GSK_GLUNIFORM_TYPE_NONE); // Shouldn't have matched the regexp
+ g_assert (utype != GSK_GL_UNIFORM_TYPE_NONE); // Shouldn't have matched the regexp
gsk_gl_shader_add_uniform (shader, name, utype);
}
@@ -461,7 +461,7 @@ gsk_gl_shader_new_from_bytes (GBytes *sourcecode)
{
g_return_val_if_fail (sourcecode != NULL, NULL);
- return g_object_new (GSK_TYPE_GLSHADER,
+ return g_object_new (GSK_TYPE_GL_SHADER,
"bytes", sourcecode,
NULL);
}
@@ -479,7 +479,7 @@ gsk_gl_shader_new_from_resource (const char *resource_path)
{
g_return_val_if_fail (resource_path != NULL, NULL);
- return g_object_new (GSK_TYPE_GLSHADER,
+ return g_object_new (GSK_TYPE_GL_SHADER,
"resource", resource_path,
NULL);
}
@@ -695,7 +695,7 @@ gsk_gl_shader_get_uniform_data_float (GskGLShader *shader,
g_assert (size == shader->uniforms_size);
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_FLOAT);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_FLOAT);
args_src = data + u->offset;
return *(float *)args_src;
@@ -725,7 +725,7 @@ gsk_gl_shader_get_uniform_data_int (GskGLShader *shader,
g_assert (size == shader->uniforms_size);
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_INT);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_INT);
args_src = data + u->offset;
return *(gint32 *)args_src;
@@ -755,7 +755,7 @@ gsk_gl_shader_get_uniform_data_uint (GskGLShader *shader,
g_assert (size == shader->uniforms_size);
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_UINT);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_UINT);
args_src = data + u->offset;
return *(guint32 *)args_src;
@@ -785,7 +785,7 @@ gsk_gl_shader_get_uniform_data_bool (GskGLShader *shader,
g_assert (size == shader->uniforms_size);
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_BOOL);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_BOOL);
args_src = data + u->offset;
return *(guint32 *)args_src;
@@ -815,7 +815,7 @@ gsk_gl_shader_get_uniform_data_vec2 (GskGLShader *shader,
g_assert (size == shader->uniforms_size);
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_VEC2);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_VEC2);
args_src = data + u->offset;
graphene_vec2_init_from_float (out_value, (float *)args_src);
@@ -845,7 +845,7 @@ gsk_gl_shader_get_uniform_data_vec3 (GskGLShader *shader,
g_assert (size == shader->uniforms_size);
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_VEC3);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_VEC3);
args_src = data + u->offset;
graphene_vec3_init_from_float (out_value, (float *)args_src);
@@ -875,7 +875,7 @@ gsk_gl_shader_get_uniform_data_vec4 (GskGLShader *shader,
g_assert (size == shader->uniforms_size);
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_VEC4);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_VEC4);
args_src = data + u->offset;
graphene_vec4_init_from_float (out_value, (float *)args_src);
@@ -923,38 +923,38 @@ gsk_gl_shader_format_uniform_data_va (GskGLShader *shader,
switch (u->type)
{
- case GSK_GLUNIFORM_TYPE_FLOAT:
+ case GSK_GL_UNIFORM_TYPE_FLOAT:
*(float *)args_dest = *(float *)value;
break;
- case GSK_GLUNIFORM_TYPE_INT:
+ case GSK_GL_UNIFORM_TYPE_INT:
*(gint32 *)args_dest = *(gint32 *)value;
break;
- case GSK_GLUNIFORM_TYPE_UINT:
+ case GSK_GL_UNIFORM_TYPE_UINT:
*(guint32 *)args_dest = *(guint32 *)value;
break;
- case GSK_GLUNIFORM_TYPE_BOOL:
+ case GSK_GL_UNIFORM_TYPE_BOOL:
*(guint32 *)args_dest = *(gboolean *)value;
break;
- case GSK_GLUNIFORM_TYPE_VEC2:
+ case GSK_GL_UNIFORM_TYPE_VEC2:
graphene_vec2_to_float ((const graphene_vec2_t *)value,
(float *)args_dest);
break;
- case GSK_GLUNIFORM_TYPE_VEC3:
+ case GSK_GL_UNIFORM_TYPE_VEC3:
graphene_vec3_to_float ((const graphene_vec3_t *)value,
(float *)args_dest);
break;
- case GSK_GLUNIFORM_TYPE_VEC4:
+ case GSK_GL_UNIFORM_TYPE_VEC4:
graphene_vec4_to_float ((const graphene_vec4_t *)value,
(float *)args_dest);
break;
- case GSK_GLUNIFORM_TYPE_NONE:
+ case GSK_GL_UNIFORM_TYPE_NONE:
default:
g_assert_not_reached ();
}
@@ -1059,7 +1059,7 @@ gsk_uniform_data_builder_set_float (GskUniformDataBuilder *builder,
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_FLOAT);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_FLOAT);
args_dest = builder->data + u->offset;
*(float *)args_dest = value;
@@ -1085,7 +1085,7 @@ gsk_uniform_data_builder_set_int (GskUniformDataBuilder *builder,
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_INT);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_INT);
args_dest = builder->data + u->offset;
*(gint32 *)args_dest = value;
@@ -1111,7 +1111,7 @@ gsk_uniform_data_builder_set_uint (GskUniformDataBuilder *builder,
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_UINT);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_UINT);
args_dest = builder->data + u->offset;
*(guint32 *)args_dest = value;
@@ -1137,7 +1137,7 @@ gsk_uniform_data_builder_set_bool (GskUniformDataBuilder *builder,
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_BOOL);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_BOOL);
args_dest = builder->data + u->offset;
*(guint32 *)args_dest = !!value;
@@ -1163,7 +1163,7 @@ gsk_uniform_data_builder_set_vec2 (GskUniformDataBuilder *builder,
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_VEC2);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_VEC2);
args_dest = builder->data + u->offset;
graphene_vec2_to_float (value, (float *)args_dest);
@@ -1189,7 +1189,7 @@ gsk_uniform_data_builder_set_vec3 (GskUniformDataBuilder *builder,
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_VEC3);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_VEC3);
args_dest = builder->data + u->offset;
graphene_vec3_to_float (value, (float *)args_dest);
@@ -1215,7 +1215,7 @@ gsk_uniform_data_builder_set_vec4 (GskUniformDataBuilder *builder,
g_assert (idx < shader->uniforms->len);
u = &g_array_index (shader->uniforms, GskGLUniform, idx);
- g_assert (u->type == GSK_GLUNIFORM_TYPE_VEC4);
+ g_assert (u->type == GSK_GL_UNIFORM_TYPE_VEC4);
args_dest = builder->data + u->offset;
graphene_vec4_to_float (value, (float *)args_dest);
diff --git a/gsk/gskglshader.h b/gsk/gskglshader.h
index b27544780c..bf99b28acb 100644
--- a/gsk/gskglshader.h
+++ b/gsk/gskglshader.h
@@ -30,7 +30,7 @@
G_BEGIN_DECLS
-#define GSK_TYPE_GLSHADER (gsk_gl_shader_get_type ())
+#define GSK_TYPE_GL_SHADER (gsk_gl_shader_get_type ())
GDK_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (GskGLShader, gsk_gl_shader, GSK, GL_SHADER, GObject)
diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h
index 9585449f82..3c392cd980 100644
--- a/gsk/gskrendernode.h
+++ b/gsk/gskrendernode.h
@@ -123,7 +123,7 @@ GskRenderNode * gsk_render_node_deserialize (GBytes
#define GSK_TYPE_CROSS_FADE_NODE (gsk_cross_fade_node_get_type())
#define GSK_TYPE_TEXT_NODE (gsk_text_node_get_type())
#define GSK_TYPE_BLUR_NODE (gsk_blur_node_get_type())
-#define GSK_TYPE_GLSHADER_NODE (gsk_gl_shader_node_get_type())
+#define GSK_TYPE_GL_SHADER_NODE (gsk_gl_shader_node_get_type())
typedef struct _GskDebugNode GskDebugNode;
typedef struct _GskColorNode GskColorNode;
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index 8f47e0234d..566236d0f3 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -4486,7 +4486,7 @@ static void
gsk_gl_shader_node_finalize (GskRenderNode *node)
{
GskGLShaderNode *self = (GskGLShaderNode *) node;
- GskRenderNodeClass *parent_class = g_type_class_peek (g_type_parent (GSK_TYPE_GLSHADER_NODE));
+ GskRenderNodeClass *parent_class = g_type_class_peek (g_type_parent (GSK_TYPE_GL_SHADER_NODE));
for (guint i = 0; i < self->n_children; i++)
gsk_render_node_unref (self->children[i]);
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 28ecebbdea..1e46c4135f 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -1134,42 +1134,42 @@ parse_uniform_value (GtkCssParser *parser,
{
switch (uniform_type)
{
- case GSK_GLUNIFORM_TYPE_FLOAT:
+ case GSK_GL_UNIFORM_TYPE_FLOAT:
if (!gtk_css_parser_consume_number (parser, &value->v[0]))
return FALSE;
break;
- case GSK_GLUNIFORM_TYPE_INT:
+ case GSK_GL_UNIFORM_TYPE_INT:
if (!gtk_css_parser_consume_integer (parser, &value->i))
return FALSE;
break;
- case GSK_GLUNIFORM_TYPE_UINT:
+ case GSK_GL_UNIFORM_TYPE_UINT:
if (!gtk_css_parser_consume_integer (parser, &value->i) ||
value->i < 0)
return FALSE;
break;
- case GSK_GLUNIFORM_TYPE_BOOL:
+ case GSK_GL_UNIFORM_TYPE_BOOL:
if (!gtk_css_parser_consume_integer (parser, &value->i) ||
(value->i != 0 && value->i != 1))
return FALSE;
break;
- case GSK_GLUNIFORM_TYPE_VEC2:
+ case GSK_GL_UNIFORM_TYPE_VEC2:
if (!gtk_css_parser_consume_number (parser, &value->v[0]) ||
!gtk_css_parser_consume_number (parser, &value->v[1]))
return FALSE;
break;
- case GSK_GLUNIFORM_TYPE_VEC3:
+ case GSK_GL_UNIFORM_TYPE_VEC3:
if (!gtk_css_parser_consume_number (parser, &value->v[0]) ||
!gtk_css_parser_consume_number (parser, &value->v[1]) ||
!gtk_css_parser_consume_number (parser, &value->v[2]))
return FALSE;
break;
- case GSK_GLUNIFORM_TYPE_VEC4:
+ case GSK_GL_UNIFORM_TYPE_VEC4:
if (!gtk_css_parser_consume_number (parser, &value->v[0]) ||
!gtk_css_parser_consume_number (parser, &value->v[1]) ||
!gtk_css_parser_consume_number (parser, &value->v[2]) ||
@@ -1177,7 +1177,7 @@ parse_uniform_value (GtkCssParser *parser,
return FALSE;
break;
- case GSK_GLUNIFORM_TYPE_NONE:
+ case GSK_GL_UNIFORM_TYPE_NONE:
default:
g_assert_not_reached ();
break;
@@ -1251,23 +1251,23 @@ parse_glshader_node (GtkCssParser *parser)
switch (uniform_type)
{
- case GSK_GLUNIFORM_TYPE_FLOAT:
+ case GSK_GL_UNIFORM_TYPE_FLOAT:
gsk_uniform_data_builder_set_float (builder, i, value->v[0]);
break;
- case GSK_GLUNIFORM_TYPE_INT:
+ case GSK_GL_UNIFORM_TYPE_INT:
gsk_uniform_data_builder_set_int (builder, i, value->i);
break;
- case GSK_GLUNIFORM_TYPE_UINT:
+ case GSK_GL_UNIFORM_TYPE_UINT:
gsk_uniform_data_builder_set_uint (builder, i, value->i);
break;
- case GSK_GLUNIFORM_TYPE_BOOL:
+ case GSK_GL_UNIFORM_TYPE_BOOL:
gsk_uniform_data_builder_set_bool (builder, i, value->i);
break;
- case GSK_GLUNIFORM_TYPE_VEC2:
+ case GSK_GL_UNIFORM_TYPE_VEC2:
{
graphene_vec2_t v;
graphene_vec2_init (&v, value->v[0], value->v[1]);
@@ -1275,7 +1275,7 @@ parse_glshader_node (GtkCssParser *parser)
}
break;
- case GSK_GLUNIFORM_TYPE_VEC3:
+ case GSK_GL_UNIFORM_TYPE_VEC3:
{
graphene_vec3_t v;
graphene_vec3_init (&v, value->v[0], value->v[1], value->v[2]);
@@ -1283,7 +1283,7 @@ parse_glshader_node (GtkCssParser *parser)
}
break;
- case GSK_GLUNIFORM_TYPE_VEC4:
+ case GSK_GL_UNIFORM_TYPE_VEC4:
{
graphene_vec4_t v;
graphene_vec4_init (&v, value->v[0], value->v[1], value->v[2], value->v[3]);
@@ -1291,7 +1291,7 @@ parse_glshader_node (GtkCssParser *parser)
}
break;
- case GSK_GLUNIFORM_TYPE_NONE:
+ case GSK_GL_UNIFORM_TYPE_NONE:
default:
g_assert_not_reached ();
}
@@ -2752,40 +2752,40 @@ render_node_print (Printer *p,
switch (gsk_gl_shader_get_uniform_type (shader, i))
{
- case GSK_GLUNIFORM_TYPE_NONE:
+ case GSK_GL_UNIFORM_TYPE_NONE:
default:
g_assert_not_reached ();
break;
- case GSK_GLUNIFORM_TYPE_FLOAT:
+ case GSK_GL_UNIFORM_TYPE_FLOAT:
{
float value = gsk_gl_shader_get_uniform_data_float (shader, uniform_data, i);
string_append_double (data, value);
}
break;
- case GSK_GLUNIFORM_TYPE_INT:
+ case GSK_GL_UNIFORM_TYPE_INT:
{
gint32 value = gsk_gl_shader_get_uniform_data_int (shader, uniform_data, i);
g_string_append_printf (data, "%d", value);
}
break;
- case GSK_GLUNIFORM_TYPE_UINT:
+ case GSK_GL_UNIFORM_TYPE_UINT:
{
guint32 value = gsk_gl_shader_get_uniform_data_uint (shader, uniform_data, i);
g_string_append_printf (data, "%u", value);
}
break;
- case GSK_GLUNIFORM_TYPE_BOOL:
+ case GSK_GL_UNIFORM_TYPE_BOOL:
{
gboolean value = gsk_gl_shader_get_uniform_data_bool (shader, uniform_data, i);
g_string_append_printf (data, "%d", value);
}
break;
- case GSK_GLUNIFORM_TYPE_VEC2:
+ case GSK_GL_UNIFORM_TYPE_VEC2:
{
graphene_vec2_t value;
gsk_gl_shader_get_uniform_data_vec2 (shader, uniform_data, i,
@@ -2796,7 +2796,7 @@ render_node_print (Printer *p,
}
break;
- case GSK_GLUNIFORM_TYPE_VEC3:
+ case GSK_GL_UNIFORM_TYPE_VEC3:
{
graphene_vec3_t value;
gsk_gl_shader_get_uniform_data_vec3 (shader, uniform_data, i,
@@ -2809,7 +2809,7 @@ render_node_print (Printer *p,
}
break;
- case GSK_GLUNIFORM_TYPE_VEC4:
+ case GSK_GL_UNIFORM_TYPE_VEC4:
{
graphene_vec4_t value;
gsk_gl_shader_get_uniform_data_vec4 (shader, uniform_data, i,
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index c14d4412a4..aae4df77ca 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -826,32 +826,32 @@ populate_render_node_properties (GtkListStore *store,
switch (gsk_gl_shader_get_uniform_type (shader, i))
{
- case GSK_GLUNIFORM_TYPE_NONE:
+ case GSK_GL_UNIFORM_TYPE_NONE:
default:
g_assert_not_reached ();
break;
- case GSK_GLUNIFORM_TYPE_FLOAT:
+ case GSK_GL_UNIFORM_TYPE_FLOAT:
add_float_row (store, title,
gsk_gl_shader_get_uniform_data_float (shader, uniform_data, i));
break;
- case GSK_GLUNIFORM_TYPE_INT:
+ case GSK_GL_UNIFORM_TYPE_INT:
add_int_row (store, title,
gsk_gl_shader_get_uniform_data_int (shader, uniform_data, i));
break;
- case GSK_GLUNIFORM_TYPE_UINT:
+ case GSK_GL_UNIFORM_TYPE_UINT:
add_uint_row (store, title,
gsk_gl_shader_get_uniform_data_uint (shader, uniform_data, i));
break;
- case GSK_GLUNIFORM_TYPE_BOOL:
+ case GSK_GL_UNIFORM_TYPE_BOOL:
add_boolean_row (store, title,
gsk_gl_shader_get_uniform_data_bool (shader, uniform_data, i));
break;
- case GSK_GLUNIFORM_TYPE_VEC2:
+ case GSK_GL_UNIFORM_TYPE_VEC2:
{
graphene_vec2_t v;
gsk_gl_shader_get_uniform_data_vec2 (shader, uniform_data, i, &v);
@@ -863,7 +863,7 @@ populate_render_node_properties (GtkListStore *store,
}
break;
- case GSK_GLUNIFORM_TYPE_VEC3:
+ case GSK_GL_UNIFORM_TYPE_VEC3:
{
graphene_vec3_t v;
gsk_gl_shader_get_uniform_data_vec3 (shader, uniform_data, i, &v);
@@ -876,7 +876,7 @@ populate_render_node_properties (GtkListStore *store,
}
break;
- case GSK_GLUNIFORM_TYPE_VEC4:
+ case GSK_GL_UNIFORM_TYPE_VEC4:
{
graphene_vec4_t v;
gsk_gl_shader_get_uniform_data_vec4 (shader, uniform_data, i, &v);
diff --git a/testsuite/gsk/shader.c b/testsuite/gsk/shader.c
index c21f43db87..f0e919c331 100644
--- a/testsuite/gsk/shader.c
+++ b/testsuite/gsk/shader.c
@@ -84,21 +84,21 @@ test_create_simple (void)
g_assert_cmpint (gsk_gl_shader_get_n_required_textures (shader), ==, 2);
g_assert_cmpint (gsk_gl_shader_get_n_uniforms (shader), ==, 8);
g_assert_cmpstr (gsk_gl_shader_get_uniform_name (shader, 0), ==, "progress");
- g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 0), ==, GSK_GLUNIFORM_TYPE_FLOAT);
+ g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 0), ==, GSK_GL_UNIFORM_TYPE_FLOAT);
g_assert_cmpstr (gsk_gl_shader_get_uniform_name (shader, 1), ==, "dots");
- g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 1), ==, GSK_GLUNIFORM_TYPE_FLOAT);
+ g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 1), ==, GSK_GL_UNIFORM_TYPE_FLOAT);
g_assert_cmpstr (gsk_gl_shader_get_uniform_name (shader, 2), ==, "center");
- g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 2), ==, GSK_GLUNIFORM_TYPE_VEC2);
+ g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 2), ==, GSK_GL_UNIFORM_TYPE_VEC2);
g_assert_cmpstr (gsk_gl_shader_get_uniform_name (shader, 3), ==, "test1");
- g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 3), ==, GSK_GLUNIFORM_TYPE_INT);
+ g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 3), ==, GSK_GL_UNIFORM_TYPE_INT);
g_assert_cmpstr (gsk_gl_shader_get_uniform_name (shader, 4), ==, "test2");
- g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 4), ==, GSK_GLUNIFORM_TYPE_UINT);
+ g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 4), ==, GSK_GL_UNIFORM_TYPE_UINT);
g_assert_cmpstr (gsk_gl_shader_get_uniform_name (shader, 5), ==, "test3");
- g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 5), ==, GSK_GLUNIFORM_TYPE_BOOL);
+ g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 5), ==, GSK_GL_UNIFORM_TYPE_BOOL);
g_assert_cmpstr (gsk_gl_shader_get_uniform_name (shader, 6), ==, "test4");
- g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 6), ==, GSK_GLUNIFORM_TYPE_VEC3);
+ g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 6), ==, GSK_GL_UNIFORM_TYPE_VEC3);
g_assert_cmpstr (gsk_gl_shader_get_uniform_name (shader, 7), ==, "test5");
- g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 7), ==, GSK_GLUNIFORM_TYPE_VEC4);
+ g_assert_cmpint (gsk_gl_shader_get_uniform_type (shader, 7), ==, GSK_GL_UNIFORM_TYPE_VEC4);
g_object_unref (shader);
g_bytes_unref (bytes);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]