+2008-01-31 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * configure.ac:
+ * backend/djvu/djvu-document.c: (djvu_document_render):
+ * backend/tiff/tiff-document.c: (tiff_document_render):
+
+ Use the new cairo function cairo_format_stride_for_width when
+ available. Fixes bug #482720.
+
2008-01-31 Carlos Garcia Campos <carlosgc@gnome.org>
* libdocument/ev-document-factory.c: (get_mime_type_from_uri),
default:
rotation = DDJVU_ROTATE_0;
}
-
+#ifdef HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH
+ rowstride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, page_width);
+#else
rowstride = page_width * 4;
+#endif
pixels = (gchar *) g_malloc (page_height * rowstride);
surface = cairo_image_surface_create_for_data ((guchar *)pixels,
CAIRO_FORMAT_RGB24,
if (width <= 0 || height <= 0)
return NULL;
+#ifdef HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH
+ rowstride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, width);
+#else
rowstride = width * 4;
if (rowstride / 4 != width)
/* overflow */
return NULL;
-
+#endif
+
bytes = height * rowstride;
if (bytes / rowstride != height)
/* overflow */
BACKEND_LIBTOOL_FLAGS="-module -avoid-version"
AC_SUBST(BACKEND_LIBTOOL_FLAGS)
+dnl ===== Check special functions
+evince_save_LIBS=$LIBS
+LIBS="$LIBS $BACKEND_LIBS"
+AC_CHECK_FUNCS(cairo_format_stride_for_width)
+LIBS=$evince_save_LIBS
+
AC_ARG_WITH(keyring,
AC_HELP_STRING([--without-keyring],[disable the use of gnome-keyring]),
[case "${withval}" in