[gtk/wip/chergert/glproto: 316/526] check corner state before replacing uniform pointer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 316/526] check corner state before replacing uniform pointer
- Date: Tue, 16 Feb 2021 01:14:33 +0000 (UTC)
commit 827eb4dee7cebe4fb05b15c9ae8e0e80b07c3ad6
Author: Christian Hergert <chergert redhat com>
Date: Tue Jan 26 17:46:48 2021 -0800
check corner state before replacing uniform pointer
otherwise we are checking uninitialized buffer space
gsk/next/gskgluniformstate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gsk/next/gskgluniformstate.c b/gsk/next/gskgluniformstate.c
index 38f75cb296..65679c6615 100644
--- a/gsk/next/gskgluniformstate.c
+++ b/gsk/next/gskgluniformstate.c
@@ -513,9 +513,7 @@ gsk_gl_uniform_state_set_rounded_rect (GskGLUniformState *state,
{
if (!gsk_rounded_rect_equal (rounded_rect, u))
{
- REPLACE_UNIFORM (info, u, GSK_GL_UNIFORM_FORMAT_ROUNDED_RECT, 1);
-
- g_assert (info->changed || !info->send_corners);
+ g_assert (!info->send_corners || info->changed);
if (!info->send_corners)
{
@@ -526,6 +524,8 @@ gsk_gl_uniform_state_set_rounded_rect (GskGLUniformState *state,
info->send_corners = TRUE;
}
+ REPLACE_UNIFORM (info, u, GSK_GL_UNIFORM_FORMAT_ROUNDED_RECT, 1);
+
memcpy (u, rounded_rect, sizeof *rounded_rect);
program_changed (state, info, program);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]