[gtk/wip/chergert/glproto: 322/526] use initial field to force sending corners




commit 4a36dc1995dd57aa807f6d9516e37d9548fcd3a7
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 27 12:44:59 2021 -0800

    use initial field to force sending corners
    
    if we are starting from initial state, we always want to send a rounded
    rect just be be certain we are working with what we expect.

 gsk/next/gskgluniformstate.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gsk/next/gskgluniformstate.c b/gsk/next/gskgluniformstate.c
index 655ab8c7e1..d0f558e10f 100644
--- a/gsk/next/gskgluniformstate.c
+++ b/gsk/next/gskgluniformstate.c
@@ -514,13 +514,14 @@ gsk_gl_uniform_state_set_rounded_rect (GskGLUniformState    *state,
 
   if ((u = get_uniform (state, program, GSK_GL_UNIFORM_FORMAT_ROUNDED_RECT, 1, location, &info)))
     {
-      if (!gsk_rounded_rect_equal (rounded_rect, u))
+      if (info->initial || !gsk_rounded_rect_equal (rounded_rect, u))
         {
           g_assert (!info->send_corners || info->changed);
 
           if (!info->send_corners)
             {
-              if (!graphene_size_equal (&u->corner[0], &rounded_rect->corner[0]) ||
+              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]))


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