[gtk/wip/chergert/glproto: 417/493] use memcmp for rgba compare




commit 3dde6603c23d1f12e5fbbc06a36509ffe1b1567c
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 8 14:58:38 2021 -0800

    use memcmp for rgba compare

 gsk/next/gskgluniformstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/next/gskgluniformstate.c b/gsk/next/gskgluniformstate.c
index 2d8e8020de..91f110e954 100644
--- a/gsk/next/gskgluniformstate.c
+++ b/gsk/next/gskgluniformstate.c
@@ -696,7 +696,7 @@ gsk_gl_uniform_state_set_color (GskGLUniformState *state,
       if (color == NULL)
         color = &transparent;
 
-      if (info->initial || !gdk_rgba_equal (u, color))
+      if (info->initial || memcmp (color, u, sizeof *color) != 0)
         {
           REPLACE_UNIFORM (info, u, GSK_GL_UNIFORM_FORMAT_COLOR, 1);
           memcpy (u, color, sizeof *color);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]