summaryrefslogtreecommitdiff
path: root/gtk/gtkcssshadowsvalueprivate.h
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-09-30 13:11:51 +0200
committerTimm Bäder <mail@baedert.org>2017-10-01 09:19:09 +0200
commit773973db78eba52e32d273a67387fd360fcdbb20 (patch)
tree5da33a96b2f897aabdfefc9154c0c3e9c6b4ae6d /gtk/gtkcssshadowsvalueprivate.h
parent53409623e548529d9e702e6858b7cd8bbe26b48b (diff)
downloadgtk+-773973db78eba52e32d273a67387fd360fcdbb20.tar.gz
cssshadowsvalue: Don't heap-allocate shadows
This showed up in profiles in certain scenarios, so export a _get_n_shadows getter instead and let callers provide a sufficiently large allocated array of GskShadows, which we can use with g_alloc/g_newa.
Diffstat (limited to 'gtk/gtkcssshadowsvalueprivate.h')
-rw-r--r--gtk/gtkcssshadowsvalueprivate.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkcssshadowsvalueprivate.h b/gtk/gtkcssshadowsvalueprivate.h
index 039c8f0cb7..be2f6b497f 100644
--- a/gtk/gtkcssshadowsvalueprivate.h
+++ b/gtk/gtkcssshadowsvalueprivate.h
@@ -36,8 +36,10 @@ GtkCssValue * _gtk_css_shadows_value_parse (GtkCssParser
gboolean _gtk_css_shadows_value_is_none (const GtkCssValue *shadows);
-GskShadow * gtk_css_shadows_value_get_shadows (const GtkCssValue *shadows,
- gsize *n_shadows);
+gsize gtk_css_shadows_value_get_n_shadows (const GtkCssValue *shadows);
+
+void gtk_css_shadows_value_get_shadows (const GtkCssValue *shadows,
+ GskShadow *out_shadows);
void _gtk_css_shadows_value_paint_layout (const GtkCssValue *shadows,
cairo_t *cr,