From 794d3239c7bd695b5d90e91d621c243051d752cd Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 29 Oct 2019 15:02:33 -0400 Subject: [PATCH] cogl: Remove deprecated cogl_color_set_from_* https://gitlab.gnome.org/GNOME/mutter/merge_requests/933 --- clutter/clutter/clutter-actor.c | 10 ++--- cogl/cogl/cogl-color.c | 22 ---------- cogl/cogl/cogl-color.h | 42 -------------------- cogl/cogl/cogl.symbols | 2 - cogl/tests/conform/test-just-vertex-shader.c | 4 +- 5 files changed, 7 insertions(+), 73 deletions(-) diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index ae680c79e..a0e1b87c1 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -3429,11 +3429,11 @@ _clutter_actor_draw_paint_volume_full (ClutterActor *self, n_vertices, (CoglVertexP3 *)line_ends); - cogl_color_set_from_4ub (&cogl_color, - color->red, - color->green, - color->blue, - color->alpha); + cogl_color_init_from_4ub (&cogl_color, + color->red, + color->green, + color->blue, + color->alpha); cogl_pipeline_set_color (outline, &cogl_color); pipeline_node = clutter_pipeline_node_new (outline); diff --git a/cogl/cogl/cogl-color.c b/cogl/cogl/cogl-color.c index b4e148267..75cf829bd 100644 --- a/cogl/cogl/cogl-color.c +++ b/cogl/cogl/cogl-color.c @@ -76,17 +76,6 @@ cogl_color_init_from_4ub (CoglColor *color, color->alpha = alpha; } -/* XXX: deprecated, use cogl_color_init_from_4ub */ -void -cogl_color_set_from_4ub (CoglColor *dest, - uint8_t red, - uint8_t green, - uint8_t blue, - uint8_t alpha) -{ - cogl_color_init_from_4ub (dest, red, green, blue, alpha); -} - void cogl_color_init_from_4f (CoglColor *color, float red, @@ -102,17 +91,6 @@ cogl_color_init_from_4f (CoglColor *color, color->alpha = (alpha * 255); } -/* XXX: deprecated, use cogl_color_init_from_4f */ -void -cogl_color_set_from_4f (CoglColor *color, - float red, - float green, - float blue, - float alpha) -{ - cogl_color_init_from_4f (color, red, green, blue, alpha); -} - void cogl_color_init_from_4fv (CoglColor *color, const float *color_array) diff --git a/cogl/cogl/cogl-color.h b/cogl/cogl/cogl-color.h index c22738506..b07f8698f 100644 --- a/cogl/cogl/cogl-color.h +++ b/cogl/cogl/cogl-color.h @@ -116,27 +116,6 @@ cogl_color_init_from_4ub (CoglColor *color, uint8_t blue, uint8_t alpha); -/** - * cogl_color_set_from_4ub: - * @color: A pointer to a #CoglColor to initialize - * @red: value of the red channel, between 0 and 255 - * @green: value of the green channel, between 0 and 255 - * @blue: value of the blue channel, between 0 and 255 - * @alpha: value of the alpha channel, between 0 and 255 - * - * Sets the values of the passed channels into a #CoglColor. - * - * Since: 1.0 - * Deprecated: 1.4: Use cogl_color_init_from_4ub instead. - */ -COGL_DEPRECATED_FOR (cogl_color_init_from_4ub) -void -cogl_color_set_from_4ub (CoglColor *color, - uint8_t red, - uint8_t green, - uint8_t blue, - uint8_t alpha); - /** * cogl_color_init_from_4f: * @color: A pointer to a #CoglColor to initialize @@ -156,27 +135,6 @@ cogl_color_init_from_4f (CoglColor *color, float blue, float alpha); -/** - * cogl_color_set_from_4f: - * @color: A pointer to a #CoglColor to initialize - * @red: value of the red channel, between 0 and %1.0 - * @green: value of the green channel, between 0 and %1.0 - * @blue: value of the blue channel, between 0 and %1.0 - * @alpha: value of the alpha channel, between 0 and %1.0 - * - * Sets the values of the passed channels into a #CoglColor - * - * Since: 1.0 - * Deprecated: 1.4: Use cogl_color_init_from_4f instead. - */ -COGL_DEPRECATED_FOR (cogl_color_init_from_4f) -void -cogl_color_set_from_4f (CoglColor *color, - float red, - float green, - float blue, - float alpha); - /** * cogl_color_init_from_4fv: * @color: A pointer to a #CoglColor to initialize diff --git a/cogl/cogl/cogl.symbols b/cogl/cogl/cogl.symbols index 9477407d5..211835dac 100644 --- a/cogl/cogl/cogl.symbols +++ b/cogl/cogl/cogl.symbols @@ -138,8 +138,6 @@ cogl_color_set_alpha_float cogl_color_set_blue cogl_color_set_blue_byte cogl_color_set_blue_float -cogl_color_set_from_4f -cogl_color_set_from_4ub cogl_color_set_green cogl_color_set_green_byte cogl_color_set_green_float diff --git a/cogl/tests/conform/test-just-vertex-shader.c b/cogl/tests/conform/test-just-vertex-shader.c index da1ab1c4c..c11c7e169 100644 --- a/cogl/tests/conform/test-just-vertex-shader.c +++ b/cogl/tests/conform/test-just-vertex-shader.c @@ -40,7 +40,7 @@ paint_legacy (TestState *state) cogl_clear (&color, COGL_BUFFER_BIT_COLOR); /* Set the primary vertex color as red */ - cogl_color_set_from_4ub (&color, 0xff, 0x00, 0x00, 0xff); + cogl_color_init_from_4ub (&color, 0xff, 0x00, 0x00, 0xff); cogl_material_set_color (material, &color); /* Override the vertex color in the texture environment with a @@ -110,7 +110,7 @@ paint (TestState *state) cogl_clear (&color, COGL_BUFFER_BIT_COLOR); /* Set the primary vertex color as red */ - cogl_color_set_from_4ub (&color, 0xff, 0x00, 0x00, 0xff); + cogl_color_init_from_4ub (&color, 0xff, 0x00, 0x00, 0xff); cogl_pipeline_set_color (pipeline, &color); /* Override the vertex color in the texture environment with a