mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
Use GtkLoader for image loading
This avoids blocking on image loading while we have better things to do.
This commit is contained in:
parent
4a89cfe2c9
commit
da115ad075
@ -19,6 +19,7 @@
|
|||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include "gdkpixbufutilsprivate.h"
|
#include "gdkpixbufutilsprivate.h"
|
||||||
#include "gtkscalerprivate.h"
|
#include "gtkscalerprivate.h"
|
||||||
|
#include "gtkloaderprivate.h"
|
||||||
|
|
||||||
#include "gdk/gdktextureprivate.h"
|
#include "gdk/gdktextureprivate.h"
|
||||||
|
|
||||||
@ -588,7 +589,7 @@ gdk_paintable_new_from_bytes_scaled (GBytes *bytes,
|
|||||||
if (gdk_texture_can_load (bytes))
|
if (gdk_texture_can_load (bytes))
|
||||||
{
|
{
|
||||||
/* We know these formats can't be scaled */
|
/* We know these formats can't be scaled */
|
||||||
inner = GDK_PAINTABLE (gdk_texture_new_from_bytes (bytes, NULL));
|
inner = GDK_PAINTABLE (gtk_loader_new (bytes));
|
||||||
if (inner == NULL)
|
if (inner == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user