summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/eom-image-private.h1
-rw-r--r--src/eom-image.c71
3 files changed, 7 insertions, 67 deletions
diff --git a/configure.ac b/configure.ac
index ef9d281..45eb906 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,7 +115,7 @@ AC_SUBST(GTK_API_VERSION)
GLIB_REQUIRED=2.36.0
GIO_REQUIRED=2.36.0
MATE_DESKTOP_REQUIRED=1.9.1
-GDKPIXBUF_REQUIRED=2.4.0
+GDKPIXBUF_REQUIRED=2.30.0
SHARED_MIME_INFO_REQUIRED=0.20
EXEMPI_REQUIRED=1.99.5
diff --git a/src/eom-image-private.h b/src/eom-image-private.h
index b0ba0f0..3a031b6 100644
--- a/src/eom-image-private.h
+++ b/src/eom-image-private.h
@@ -51,7 +51,6 @@ struct _EomImagePrivate {
goffset bytes;
gchar *file_type;
- gboolean threadsafe_format;
/* Holds EXIF raw data */
guint exif_chunk_len;
diff --git a/src/eom-image.c b/src/eom-image.c
index 3cd8e34..45e03c8 100644
--- a/src/eom-image.c
+++ b/src/eom-image.c
@@ -483,40 +483,6 @@ eom_image_emit_size_prepared (EomImage *img)
g_object_ref (img), g_object_unref);
}
-static gboolean
-check_loader_threadsafety (GdkPixbufLoader *loader, gboolean *result)
-{
- GdkPixbufFormat *format;
- gboolean ret_val = FALSE;
-
- format = gdk_pixbuf_loader_get_format (loader);
- if (format) {
- ret_val = TRUE;
- if (result)
- /* FIXME: We should not be accessing this struct internals
- * directly. Keep track of bug #469209 to fix that. */
- *result = format->flags & GDK_PIXBUF_FORMAT_THREADSAFE;
- }
-
- return ret_val;
-}
-
-static void
-eom_image_pre_size_prepared (GdkPixbufLoader *loader,
- gint width,
- gint height,
- gpointer data)
-{
- EomImage *img;
-
- eom_debug (DEBUG_IMAGE_LOAD);
-
- g_return_if_fail (EOM_IS_IMAGE (data));
-
- img = EOM_IMAGE (data);
- check_loader_threadsafety (loader, &img->priv->threadsafe_format);
-}
-
static void
eom_image_size_prepared (GdkPixbufLoader *loader,
gint width,
@@ -539,9 +505,7 @@ eom_image_size_prepared (GdkPixbufLoader *loader,
g_mutex_unlock (&img->priv->status_mutex);
#ifdef HAVE_EXIF
- if (img->priv->threadsafe_format && (!img->priv->autorotate || img->priv->exif))
-#else
- if (img->priv->threadsafe_format)
+ if (!img->priv->autorotate || img->priv->exif)
#endif
eom_image_emit_size_prepared (img);
}
@@ -909,8 +873,6 @@ eom_image_real_load (EomImage *img,
priv->file_type = NULL;
}
- priv->threadsafe_format = FALSE;
-
eom_image_get_file_info (img, &priv->bytes, &mime_type, error);
if (error && *error) {
@@ -953,8 +915,6 @@ eom_image_real_load (EomImage *img,
buffer = g_new0 (guchar, EOM_IMAGE_READ_BUFFER_SIZE);
if (read_image_data || read_only_dimension) {
- gboolean checked_threadsafety = FALSE;
-
#ifdef HAVE_RSVG
if (priv->svg != NULL) {
g_object_unref (priv->svg);
@@ -977,21 +937,8 @@ eom_image_real_load (EomImage *img,
*error = NULL;
loader = gdk_pixbuf_loader_new ();
- } else {
- /* The mimetype-based loader should know the
- * format here already. */
- checked_threadsafety = check_loader_threadsafety (loader, &priv->threadsafe_format);
}
- /* This is used to detect non-threadsafe loaders and disable
- * any possible asyncronous task that could bring deadlocks
- * to image loading process. */
- if (!checked_threadsafety)
- g_signal_connect (loader,
- "size-prepared",
- G_CALLBACK (eom_image_pre_size_prepared),
- img);
-
g_signal_connect_object (G_OBJECT (loader),
"size-prepared",
G_CALLBACK (eom_image_size_prepared),
@@ -1049,16 +996,15 @@ eom_image_real_load (EomImage *img,
if (data2read == EOM_IMAGE_DATA_EXIF) {
g_set_error (error,
EOM_IMAGE_ERROR,
- EOM_IMAGE_ERROR_GENERIC,
- _("EXIF not supported for this file format."));
+ EOM_IMAGE_ERROR_GENERIC,
+ _("EXIF not supported for this file format."));
break;
}
- if (priv->threadsafe_format)
- eom_image_emit_size_prepared (img);
+ eom_image_emit_size_prepared (img);
- priv->metadata_status = EOM_IMAGE_METADATA_NOT_AVAILABLE;
- }
+ priv->metadata_status = EOM_IMAGE_METADATA_NOT_AVAILABLE;
+ }
first_run = FALSE;
}
@@ -1152,11 +1098,6 @@ eom_image_real_load (EomImage *img,
}
priv->file_is_changed = FALSE;
-
- /* If it's non-threadsafe loader, then trigger window
- * showing in the end of the process. */
- if (!priv->threadsafe_format)
- eom_image_emit_size_prepared (img);
} else {
/* Some loaders don't report errors correctly.
* Error will be set below. */