summaryrefslogtreecommitdiff
path: root/gsk/gskroundedrectprivate.h
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-12-12 14:45:11 +0100
committerTimm Bäder <mail@baedert.org>2020-12-16 08:26:46 +0100
commitf816a8fb820bf74a5378dd1e01322949940744f1 (patch)
tree2e179caa0c87f55d8aed78ac65284129b1b2901f /gsk/gskroundedrectprivate.h
parent3c2484142dabb1dc141a36e790e79ac6ace88436 (diff)
downloadgtk+-f816a8fb820bf74a5378dd1e01322949940744f1.tar.gz
gl renderer: Unify viewport setting in add_offscreen_ops()
We use the same rect here a few times.
Diffstat (limited to 'gsk/gskroundedrectprivate.h')
-rw-r--r--gsk/gskroundedrectprivate.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gsk/gskroundedrectprivate.h b/gsk/gskroundedrectprivate.h
index 5c2912b492..bddd4ea18c 100644
--- a/gsk/gskroundedrectprivate.h
+++ b/gsk/gskroundedrectprivate.h
@@ -7,6 +7,16 @@
G_BEGIN_DECLS
+#define GSK_ROUNDED_RECT_INIT_FROM_RECT(_r) \
+ (GskRoundedRect) { .bounds = _r, \
+ .corner = { \
+ GRAPHENE_SIZE_INIT(0, 0),\
+ GRAPHENE_SIZE_INIT(0, 0),\
+ GRAPHENE_SIZE_INIT(0, 0),\
+ GRAPHENE_SIZE_INIT(0, 0),\
+ }}
+
+
gboolean gsk_rounded_rect_is_circular (const GskRoundedRect *self);
void gsk_rounded_rect_path (const GskRoundedRect *self,