mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
Replace cogl_color_set_from_* with cogl_color_init_from_*
The former is not yet "officially" deprecated by the latter, but it's confusing to have them both in the code base.
This commit is contained in:
@ -204,7 +204,7 @@ on_paint (ClutterActor *actor, TestState *state)
|
||||
CoglMatrix stage_projection;
|
||||
CoglMatrix stage_modelview;
|
||||
|
||||
cogl_color_set_from_4ub (&clr, 0x00, 0x00, 0x00, 0xff);
|
||||
cogl_color_init_from_4ub (&clr, 0x00, 0x00, 0x00, 0xff);
|
||||
|
||||
do_test_backface_culling (state);
|
||||
|
||||
|
@ -111,7 +111,7 @@ test_blend (TestState *state,
|
||||
blend_string, error->message);
|
||||
}
|
||||
|
||||
cogl_color_set_from_4ub (&blend_const_color, Br, Bg, Bb, Ba);
|
||||
cogl_color_init_from_4ub (&blend_const_color, Br, Bg, Bb, Ba);
|
||||
cogl_material_set_blend_constant (material, &blend_const_color);
|
||||
|
||||
cogl_set_source (material);
|
||||
@ -232,7 +232,7 @@ test_tex_combine (TestState *state,
|
||||
combine_string, error->message);
|
||||
}
|
||||
|
||||
cogl_color_set_from_4ub (&combine_const_color, Cr, Cg, Cb, Ca);
|
||||
cogl_color_init_from_4ub (&combine_const_color, Cr, Cg, Cb, Ca);
|
||||
cogl_material_set_layer_combine_constant (material, 1, &combine_const_color);
|
||||
|
||||
cogl_set_source (material);
|
||||
|
@ -200,7 +200,7 @@ test_invalid_texture_layers_with_constant_colors (TestState *state,
|
||||
|
||||
/* ignore the fallback texture on the layer and use a constant color
|
||||
instead */
|
||||
cogl_color_set_from_4ub (&constant_color, 0, 0, 255, 255);
|
||||
cogl_color_init_from_4ub (&constant_color, 0, 0, 255, 255);
|
||||
cogl_material_set_layer_combine (material, 0,
|
||||
"RGBA=REPLACE(CONSTANT)",
|
||||
NULL);
|
||||
|
@ -82,7 +82,7 @@ on_paint (ClutterActor *actor, void *state)
|
||||
float height;
|
||||
|
||||
/* for clearing the offscreen framebuffer to black... */
|
||||
cogl_color_set_from_4ub (&black, 0x00, 0x00, 0x00, 0xff);
|
||||
cogl_color_init_from_4ub (&black, 0x00, 0x00, 0x00, 0xff);
|
||||
|
||||
cogl_get_viewport (saved_viewport);
|
||||
cogl_get_projection_matrix (&saved_projection);
|
||||
|
@ -56,7 +56,7 @@ on_paint (ClutterActor *actor,
|
||||
layout = clutter_actor_create_pango_layout (actor, text);
|
||||
pango_layout_get_size (layout, &layout_width, &layout_height);
|
||||
|
||||
cogl_color_set_from_4ub (&color, 0, 0, 0, 255);
|
||||
cogl_color_init_from_4ub (&color, 0, 0, 0, 255);
|
||||
cogl_pango_render_layout (layout,
|
||||
(width - (layout_width / 1024)) / 2,
|
||||
(height - (layout_height / 1024)) / 2,
|
||||
|
@ -114,11 +114,11 @@ test_coglbox_fade_texture (gfloat x1,
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
cogl_color_set_from_4ub (&(vertices[i].color),
|
||||
255,
|
||||
255,
|
||||
255,
|
||||
((i ^ (i >> 1)) & 1) ? 0 : 128);
|
||||
cogl_color_init_from_4ub (&(vertices[i].color),
|
||||
255,
|
||||
255,
|
||||
255,
|
||||
((i ^ (i >> 1)) & 1) ? 0 : 128);
|
||||
cogl_color_premultiply (&(vertices[i].color));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user