+static void
+ensure_pixbuf_at_size (GtkIconHelper *self,
+ GtkStyleContext *context)
+{
+ gint width, height;
+
+ if (!check_invalidate_pixbuf (self, context))
+ return;
+
+ if (self->priv->rendered_pixbuf)
+ return;
+
+ if (self->priv->pixel_size != -1 ||
+ self->priv->icon_size != GTK_ICON_SIZE_INVALID)
+ {
+ ensure_icon_size (self, context, &width, &height);
+
+ if (width < gdk_pixbuf_get_width (self->priv->orig_pixbuf) ||
+ height < gdk_pixbuf_get_height (self->priv->orig_pixbuf))
+ self->priv->rendered_pixbuf =
+ gdk_pixbuf_scale_simple (self->priv->orig_pixbuf,
+ width, height,
+ GDK_INTERP_BILINEAR);
+ }
+
+ if (!self->priv->rendered_pixbuf)
+ self->priv->rendered_pixbuf = g_object_ref (self->priv->orig_pixbuf);
+}
+