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:
parent
e950d2feec
commit
73a94a7a79
@ -3530,7 +3530,7 @@ cogl_material_set_color4ub (CoglMaterial *material,
|
||||
guint8 alpha)
|
||||
{
|
||||
CoglColor color;
|
||||
cogl_color_set_from_4ub (&color, red, green, blue, alpha);
|
||||
cogl_color_init_from_4ub (&color, red, green, blue, alpha);
|
||||
cogl_material_set_color (material, &color);
|
||||
}
|
||||
|
||||
@ -3542,7 +3542,7 @@ cogl_material_set_color4f (CoglMaterial *material,
|
||||
float alpha)
|
||||
{
|
||||
CoglColor color;
|
||||
cogl_color_set_from_4f (&color, red, green, blue, alpha);
|
||||
cogl_color_init_from_4f (&color, red, green, blue, alpha);
|
||||
cogl_material_set_color (material, &color);
|
||||
}
|
||||
|
||||
|
@ -1048,7 +1048,7 @@ cogl_set_source_texture (CoglHandle texture_handle)
|
||||
g_return_if_fail (texture_handle != NULL);
|
||||
|
||||
cogl_material_set_layer (ctx->simple_material, 0, texture_handle);
|
||||
cogl_color_set_from_4ub (&white, 0xff, 0xff, 0xff, 0xff);
|
||||
cogl_color_init_from_4ub (&white, 0xff, 0xff, 0xff, 0xff);
|
||||
cogl_material_set_color (ctx->simple_material, &white);
|
||||
cogl_set_source (ctx->simple_material);
|
||||
}
|
||||
@ -1061,7 +1061,7 @@ cogl_set_source_color4ub (guint8 red,
|
||||
{
|
||||
CoglColor c = { 0, };
|
||||
|
||||
cogl_color_set_from_4ub (&c, red, green, blue, alpha);
|
||||
cogl_color_init_from_4ub (&c, red, green, blue, alpha);
|
||||
cogl_set_source_color (&c);
|
||||
}
|
||||
|
||||
@ -1073,7 +1073,7 @@ cogl_set_source_color4f (float red,
|
||||
{
|
||||
CoglColor c = { 0, };
|
||||
|
||||
cogl_color_set_from_4f (&c, red, green, blue, alpha);
|
||||
cogl_color_init_from_4f (&c, red, green, blue, alpha);
|
||||
cogl_set_source_color (&c);
|
||||
}
|
||||
|
||||
|
@ -337,7 +337,7 @@ _cogl_pango_display_list_render (CoglPangoDisplayList *dl,
|
||||
if (node->color_override)
|
||||
/* Use the override color but preserve the alpha from the
|
||||
draw color */
|
||||
cogl_color_set_from_4ub (&draw_color,
|
||||
cogl_color_init_from_4ub (&draw_color,
|
||||
cogl_color_get_red_byte (&node->color),
|
||||
cogl_color_get_green_byte (&node->color),
|
||||
cogl_color_get_blue_byte (&node->color),
|
||||
|
@ -569,7 +569,7 @@ cogl_pango_renderer_set_color_for_part (PangoRenderer *renderer,
|
||||
{
|
||||
CoglColor color;
|
||||
|
||||
cogl_color_set_from_4ub (&color,
|
||||
cogl_color_init_from_4ub (&color,
|
||||
pango_color->red >> 8,
|
||||
pango_color->green >> 8,
|
||||
pango_color->blue >> 8,
|
||||
|
Loading…
x
Reference in New Issue
Block a user