diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index fe5c55ac1e..ed08bd4431 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c @@ -85,24 +85,17 @@ parse_texture (GtkCssParser *parser, scheme = g_uri_parse_scheme (url); if (scheme && g_ascii_strcasecmp (scheme, "data") == 0) { - GInputStream *stream; - GdkPixbuf *pixbuf; GBytes *bytes; - texture = NULL; - bytes = gtk_css_data_url_parse (url, NULL, &error); if (bytes) { - stream = g_memory_input_stream_new_from_bytes (bytes); + texture = gdk_texture_new_from_bytes (bytes, &error); g_bytes_unref (bytes); - pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, &error); - g_object_unref (stream); - if (pixbuf != NULL) - { - texture = gdk_texture_new_for_pixbuf (pixbuf); - g_object_unref (pixbuf); - } + } + else + { + texture = NULL; } } else