[gtk/wip/chergert/glproto: 394/493] use memcmp for corners
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 394/493] use memcmp for corners
- Date: Fri, 19 Feb 2021 02:25:18 +0000 (UTC)
commit e97dbbd5964d2e4dcd9f0db1a122ec2dc69725e5
Author: Christian Hergert <chergert redhat com>
Date: Thu Feb 4 14:09:47 2021 -0800
use memcmp for corners
these are tightly packed, we can just memcmp them.
gsk/next/gskgluniformstate.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/gsk/next/gskgluniformstate.c b/gsk/next/gskgluniformstate.c
index 8d2a1a28d6..9512ad13ab 100644
--- a/gsk/next/gskgluniformstate.c
+++ b/gsk/next/gskgluniformstate.c
@@ -577,10 +577,7 @@ gsk_gl_uniform_state_set_rounded_rect (GskGLUniformState *state,
if (!info->send_corners)
{
if (info->initial ||
- !graphene_size_equal (&u->corner[0], &rounded_rect->corner[0]) ||
- !graphene_size_equal (&u->corner[1], &rounded_rect->corner[1]) ||
- !graphene_size_equal (&u->corner[2], &rounded_rect->corner[2]) ||
- !graphene_size_equal (&u->corner[3], &rounded_rect->corner[3]))
+ memcmp (u->corner, rounded_rect->corner, sizeof u->corner) != 0)
info->send_corners = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]