From 45e83f3d38e30d59c76d5622c33805c08e6a45af Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 27 Oct 2016 20:27:34 -0400 Subject: [PATCH] Convert GtkIcon to indirect rendering --- gtk/gtkicon.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gtk/gtkicon.c b/gtk/gtkicon.c index 65068b53d4..b43a62d2eb 100644 --- a/gtk/gtkicon.c +++ b/gtk/gtkicon.c @@ -128,16 +128,14 @@ gtk_icon_size_allocate (GtkWidget *widget, gtk_widget_set_clip (widget, &clip); } -static gboolean -gtk_icon_draw (GtkWidget *widget, - cairo_t *cr) +static GskRenderNode * +gtk_icon_get_render_node (GtkWidget *widget, + GskRenderer *renderer) { GtkIcon *self = GTK_ICON (widget); GtkIconPrivate *priv = gtk_icon_get_instance_private (self); - gtk_css_gadget_draw (priv->gadget, cr); - - return FALSE; + return gtk_css_gadget_get_render_node (priv->gadget, renderer, FALSE); } static void @@ -152,7 +150,7 @@ gtk_icon_class_init (GtkIconClass *klass) wclass->size_allocate = gtk_icon_size_allocate; wclass->measure = gtk_icon_measure; - wclass->draw = gtk_icon_draw; + wclass->get_render_node = gtk_icon_get_render_node; icon_props[PROP_CSS_NAME] = g_param_spec_string ("css-name", "CSS name",