#include "gdktexture.h"
#include "gdkmemorytextureprivate.h"
+#include "gdkprofilerprivate.h"
+
#include <jpeglib.h>
#include <jerror.h>
#include <setjmp.h>
GBytes *bytes;
GdkTexture *texture;
GdkMemoryFormat format;
+ G_GNUC_UNUSED guint64 before = GDK_PROFILER_CURRENT_TIME;
info.err = jpeg_std_error (&jerr.pub);
jerr.pub.error_exit = fatal_error_handler;
g_bytes_unref (bytes);
+ gdk_profiler_end_mark (before, "jpeg load", NULL);
+
return texture;
}
#include "gdkintl.h"
#include "gdkmemorytextureprivate.h"
+#include "gdkprofilerprivate.h"
#include "gdktexture.h"
#include "gdktextureprivate.h"
#include "gsk/ngl/fp16private.h"
}
/* }}} */
-/* {{{ Public API */
+/* {{{ Public API */
GdkTexture *
gdk_load_png (GBytes *bytes,
GBytes *out_bytes;
GdkTexture *texture;
int bpp;
+ G_GNUC_UNUSED gint64 before = GDK_PROFILER_CURRENT_TIME;
io.data = (guchar *)g_bytes_get_data (bytes, &io.size);
io.position = 0;
g_free (row_pointers);
png_destroy_read_struct (&png, &info, NULL);
+ if (GDK_PROFILER_IS_RUNNING)
+ {
+ gint64 end = GDK_PROFILER_CURRENT_TIME;
+ if (end - before > 500000)
+ gdk_profiler_add_mark (before, end - before, "png load", NULL);
+ }
+
return texture;
}
#include "gdkintl.h"
#include "gdkmemorytextureprivate.h"
+#include "gdkprofilerprivate.h"
#include "gdktexture.h"
#include "gdktextureprivate.h"
int bpp;
GBytes *bytes;
GdkTexture *texture;
+ G_GNUC_UNUSED gint64 before = GDK_PROFILER_CURRENT_TIME;
tif = tiff_open_read (input_bytes);
TIFFClose (tif);
+ if (GDK_PROFILER_IS_RUNNING)
+ {
+ gint64 end = GDK_PROFILER_CURRENT_TIME;
+ if (end - before > 500000)
+ gdk_profiler_add_mark (before, end - before, "tiff load", NULL);
+ }
+
return texture;
}