summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell Haley <yumpusamongus@gmail.com>2016-02-14 00:59:17 (GMT)
committerFelix Riemann <friemann@gnome.org>2016-02-14 14:26:50 (GMT)
commitfbc11280c6929852100de40e2dc70f5ec2adcea7 (patch)
treede69e6c0c7f7bc95aee29bf3e90e3a5479b17a0a
parent64376d1d2042a92ca5b3312d6950086c2f6a75bd (diff)
downloadeog-fbc11280.zip
eog-fbc11280.tar.xz
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
-rw-r--r--src/eog-scroll-view.c8
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;