File poppler-cairo-no-custom-downsampling.patch of Package poppler.34110

Index: poppler-0.43.0/poppler/CairoOutputDev.cc
===================================================================
--- poppler-0.43.0.orig/poppler/CairoOutputDev.cc
+++ poppler-0.43.0/poppler/CairoOutputDev.cc
@@ -3043,7 +3043,13 @@ public:
       }
     }
 
-    if (printing || scaledWidth >= width || scaledHeight >= height) {
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
+    bool needsCustomDownscaling = false;
+#else
+    bool needsCustomDownscaling = true;
+#endif
+
+    if (!needsCustomDownscaling || printing || scaledWidth >= width || scaledHeight >= height) {
       // No downscaling. Create cairo image containing the source image data.
       unsigned char *buffer;
       int stride;
@@ -3157,7 +3163,7 @@ void CairoOutputDev::drawImage(GfxState
   cairo_matrix_t matrix;
   int width, height;
   int scaledWidth, scaledHeight;
-  cairo_filter_t filter = CAIRO_FILTER_BILINEAR;
+  cairo_filter_t filter = CAIRO_FILTER_BEST;
   RescaleDrawImage rescale;
 
   LOG (printf ("drawImage %dx%d\n", widthA, heightA));
openSUSE Build Service is sponsored by