[gtk/wip/chergert/glproto: 485/493] make it clear the size requirements for array_count
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 485/493] make it clear the size requirements for array_count
- Date: Fri, 19 Feb 2021 02:25:24 +0000 (UTC)
commit e0971508b3ae6aa69da890177dc66debcbd8fbb7
Author: Christian Hergert <chergert redhat com>
Date: Wed Feb 17 09:57:01 2021 -0800
make it clear the size requirements for array_count
gsk/next/gskglrenderjob.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 29d427b57f..57956ebd6c 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -49,6 +49,9 @@
#define MAX_GRADIENT_STOPS 6
#define SHADOW_EXTRA_SIZE 4
+/* Make sure gradient stops fits in packed array_count */
+G_STATIC_ASSERT (MAX_GRADIENT_STOPS*5 < (1<<5));
+
#define rounded_rect_top_left(r) \
(GRAPHENE_RECT_INIT(r->bounds.origin.x, \
r->bounds.origin.y, \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]