forked from AuroraMiddleware/gtk
rendernodeparser: Avoid gdk_texture_new_for_pixbuf
We can just use gdk_texture_new_from_bytes here now. Update affected test output.
This commit is contained in:
parent
5b82cf1145
commit
c77b5c46a3
@ -85,24 +85,17 @@ parse_texture (GtkCssParser *parser,
|
|||||||
scheme = g_uri_parse_scheme (url);
|
scheme = g_uri_parse_scheme (url);
|
||||||
if (scheme && g_ascii_strcasecmp (scheme, "data") == 0)
|
if (scheme && g_ascii_strcasecmp (scheme, "data") == 0)
|
||||||
{
|
{
|
||||||
GInputStream *stream;
|
|
||||||
GdkPixbuf *pixbuf;
|
|
||||||
GBytes *bytes;
|
GBytes *bytes;
|
||||||
|
|
||||||
texture = NULL;
|
|
||||||
|
|
||||||
bytes = gtk_css_data_url_parse (url, NULL, &error);
|
bytes = gtk_css_data_url_parse (url, NULL, &error);
|
||||||
if (bytes)
|
if (bytes)
|
||||||
{
|
{
|
||||||
stream = g_memory_input_stream_new_from_bytes (bytes);
|
texture = gdk_texture_new_from_bytes (bytes, &error);
|
||||||
g_bytes_unref (bytes);
|
g_bytes_unref (bytes);
|
||||||
pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, &error);
|
}
|
||||||
g_object_unref (stream);
|
else
|
||||||
if (pixbuf != NULL)
|
{
|
||||||
{
|
texture = NULL;
|
||||||
texture = gdk_texture_new_for_pixbuf (pixbuf);
|
|
||||||
g_object_unref (pixbuf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user