[gtk/image-loading: 58/70] pixbufutils: Simplify function




commit 98c56b6cde97d21af47a45f87af0ec6bfb7be508
Author: Benjamin Otte <otte redhat com>
Date:   Tue Sep 14 18:17:44 2021 +0200

    pixbufutils: Simplify function

 gtk/gdkpixbufutils.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/gtk/gdkpixbufutils.c b/gtk/gdkpixbufutils.c
index ecd68ceb0e..7bbe5d5fd8 100644
--- a/gtk/gdkpixbufutils.c
+++ b/gtk/gdkpixbufutils.c
@@ -507,14 +507,7 @@ gtk_make_symbolic_pixbuf_from_file (GFile       *file,
 GdkTexture *
 gtk_load_symbolic_texture_from_resource (const char *path)
 {
-  GdkPixbuf *pixbuf;
-  GdkTexture *texture;
-
-  pixbuf = _gdk_pixbuf_new_from_resource (path, "png", NULL);
-  texture = gdk_texture_new_for_pixbuf (pixbuf);
-  g_object_unref (pixbuf);
-
-  return texture;
+  return gdk_texture_new_from_resource (path);
 }
 
 GdkTexture *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]