poppler/CairoOutputDev.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 4afe2fb10ab969bfd9895c0ba9d4990c5881b451 Author: Carlos Garcia Campos <carlo...@gnome.org> Date: Sun Mar 4 10:28:57 2018 +0100 cairo: use GOOD instead of BEST as the default cairo filter for scaling The quality is good enough and the performance is much better. https://bugs.freedesktop.org/show_bug.cgi?id=103136 diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index bc83b807..631ab27b 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -1970,7 +1970,7 @@ CairoOutputDev::getFilterForSurface(cairo_surface_t *image, GBool interpolate) { if (interpolate) - return CAIRO_FILTER_BEST; + return CAIRO_FILTER_GOOD; int orig_width = cairo_image_surface_get_width (image); int orig_height = cairo_image_surface_get_height (image); @@ -1990,7 +1990,7 @@ CairoOutputDev::getFilterForSurface(cairo_surface_t *image, if (scaled_width / orig_width >= 4 || scaled_height / orig_height >= 4) return CAIRO_FILTER_NEAREST; - return CAIRO_FILTER_BEST; + return CAIRO_FILTER_GOOD; } void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, @@ -2458,7 +2458,7 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream * cairo doesn't yet do minifaction filtering causing scaled down * images with CAIRO_FILTER_NEAREST to look really bad */ cairo_pattern_set_filter (pattern, - interpolate ? CAIRO_FILTER_BEST : CAIRO_FILTER_FAST); + interpolate ? CAIRO_FILTER_GOOD : CAIRO_FILTER_FAST); if (state->getFillColorSpace()->getMode() == csPattern) { cairo_matrix_init_translate (&matrix, 0, scaledHeight); @@ -3258,7 +3258,7 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, cairo_matrix_t matrix; int width, height; int scaledWidth, scaledHeight; - cairo_filter_t filter = CAIRO_FILTER_BEST; + cairo_filter_t filter = CAIRO_FILTER_GOOD; RescaleDrawImage rescale; LOG (printf ("drawImage %dx%d\n", widthA, heightA)); _______________________________________________ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler