Skip to content

Commit 7b90425

Browse files
committed
Stop overwriting prepared image data
As mentioned in the bugs referenced, clearing the pixbuf in the prepared signal is not a valid thing to do. See: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/75ac8deaf04f362efa5fc0ace51031350e70e8be Closes: #1921
1 parent 5779fbb commit 7b90425

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

src/image-load.cc

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -528,32 +528,8 @@ static void image_loader_area_updated_cb(gpointer,
528528
g_mutex_unlock(il->data_mutex);
529529
}
530530

531-
static void image_loader_area_prepared_cb(gpointer, gpointer data)
531+
static void image_loader_area_prepared_cb(gpointer, gpointer)
532532
{
533-
auto il = static_cast<ImageLoader *>(data);
534-
GdkPixbuf *pb;
535-
guchar *pix;
536-
size_t h;
537-
size_t rs;
538-
539-
/* a workaround for
540-
https://bugzilla.gnome.org/show_bug.cgi?id=547669
541-
https://bugzilla.gnome.org/show_bug.cgi?id=589334
542-
*/
543-
g_autofree gchar *format = il->backend->get_format_name();
544-
if (strcmp(format, "svg") == 0 ||
545-
strcmp(format, "xpm") == 0)
546-
{
547-
return;
548-
}
549-
550-
pb = il->backend->get_pixbuf();
551-
552-
h = gdk_pixbuf_get_height(pb);
553-
rs = gdk_pixbuf_get_rowstride(pb);
554-
pix = gdk_pixbuf_get_pixels(pb);
555-
556-
memset(pix, 0, rs * h); /*this should be faster than pixbuf_fill */
557533
}
558534

559535
static void image_loader_size_cb(gpointer,

0 commit comments

Comments
 (0)