[eog] EogScrollView: Use better downscaling filter to fix Bug 665897



commit fbc11280c6929852100de40e2dc70f5ec2adcea7
Author: Russell Haley <yumpusamongus gmail com>
Date:   Sat Feb 13 18:59:17 2016 -0600

    EogScrollView: Use better downscaling filter to fix Bug 665897
    
    Replace all instances of CAIRO_FILTER_BILINEAR with CAIRO_FILTER_GOOD.
    This produces much less aliasing on downscaled images. CAIRO_FILTER_GOOD
    uses the same method as CAIRO_FILTER_BILINEAR for scale factors greater
    than 0.75, according to https://bugs.webkit.org/show_bug.cgi?id=147826.
    
    Comparison screenshots made with eog 3.18.1: http://imgur.com/a/NaoOs
    
    CAIRO_FILTER_BEST is better still, but the the visual difference is
    almost imperceptible and the performance impact is severe.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=665897

 src/eog-scroll-view.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index 3e78261..ded5572 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -1660,7 +1660,7 @@ eog_scroll_view_set_antialiasing_in (EogScrollView *view, gboolean state)
 
        priv = view->priv;
 
-       new_interp_type = state ? CAIRO_FILTER_BILINEAR : CAIRO_FILTER_NEAREST;
+       new_interp_type = state ? CAIRO_FILTER_GOOD : CAIRO_FILTER_NEAREST;
 
        if (priv->interp_type_in != new_interp_type) {
                priv->interp_type_in = new_interp_type;
@@ -1679,7 +1679,7 @@ eog_scroll_view_set_antialiasing_out (EogScrollView *view, gboolean state)
 
        priv = view->priv;
 
-       new_interp_type = state ? CAIRO_FILTER_BILINEAR : CAIRO_FILTER_NEAREST;
+       new_interp_type = state ? CAIRO_FILTER_GOOD : CAIRO_FILTER_NEAREST;
 
        if (priv->interp_type_out != new_interp_type) {
                priv->interp_type_out = new_interp_type;
@@ -2097,8 +2097,8 @@ eog_scroll_view_init (EogScrollView *view)
        priv->zoom_mode = EOG_ZOOM_MODE_SHRINK_TO_FIT;
        priv->upscale = FALSE;
        //priv->uta = NULL;
-       priv->interp_type_in = CAIRO_FILTER_BILINEAR;
-       priv->interp_type_out = CAIRO_FILTER_BILINEAR;
+       priv->interp_type_in = CAIRO_FILTER_GOOD;
+       priv->interp_type_out = CAIRO_FILTER_GOOD;
        priv->scroll_wheel_zoom = FALSE;
        priv->zoom_multiplier = IMAGE_VIEW_ZOOM_MULTIPLIER;
        priv->image = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]