mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
[cogl-color] Adds a cogl_color_equal() function
CoglColors shouldn't be compared using memcmp since they may contain uninitialized padding bytes. The prototype is also suitable for passing to g_hash_table_new as the key_equal_func. _cogl_pango_display_list_add_texture now uses this instead of memcmp.
This commit is contained in:
@ -138,8 +138,7 @@ _cogl_pango_display_list_add_texture (CoglPangoDisplayList *dl,
|
||||
&& (node = dl->last_node->data)->type == COGL_PANGO_DISPLAY_LIST_TEXTURE
|
||||
&& node->d.texture.texture == texture
|
||||
&& (dl->color_override
|
||||
? (node->color_override && !memcmp (&dl->color, &node->color,
|
||||
sizeof (CoglColor)))
|
||||
? (node->color_override && cogl_color_equal (&dl->color, &node->color))
|
||||
: !node->color_override))
|
||||
{
|
||||
/* Get rid of the vertex buffer so that it will be recreated */
|
||||
|
Reference in New Issue
Block a user