summaryrefslogtreecommitdiff
path: root/gtk/gtkrender.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-09-13 17:04:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-09-14 00:08:36 -0400
commit5bbe811090d11840bbd65f46b6f5100b3079ac97 (patch)
tree317ac1036a5efce27afe696b5ddc35a023edb7b8 /gtk/gtkrender.c
parent952f85c12de13e978294af58f26694eddb3a1ee0 (diff)
downloadgtk+-wip/css-value-unboxing.tar.gz
wip: Unbox css valueswip/css-value-unboxing
Keep css values unboxed in the values structs, for faster access to these values, where it makes sense.
Diffstat (limited to 'gtk/gtkrender.c')
-rw-r--r--gtk/gtkrender.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkrender.c b/gtk/gtkrender.c
index 414b940517..4b7592b528 100644
--- a/gtk/gtkrender.c
+++ b/gtk/gtkrender.c
@@ -387,14 +387,14 @@ gtk_render_line (GtkStyleContext *context,
double x1,
double y1)
{
- const GdkRGBA *color;
+ GtkCssStyle *style;
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
cairo_save (cr);
- color = gtk_css_color_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR));
+ style = gtk_style_context_lookup_style (context);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
cairo_set_line_width (cr, 1);
@@ -402,7 +402,7 @@ gtk_render_line (GtkStyleContext *context,
cairo_move_to (cr, x0 + 0.5, y0 + 0.5);
cairo_line_to (cr, x1 + 0.5, y1 + 0.5);
- gdk_cairo_set_source_rgba (cr, color);
+ gdk_cairo_set_source_rgba (cr, &style->core->_color);
cairo_stroke (cr);
cairo_restore (cr);