summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Haley <[email protected]>2016-02-13 18:59:17 -0600
committerraveit65 <[email protected]>2018-07-11 08:40:38 +0200
commit7f38bf69cec41fc54e79819022451897e4f1e09b (patch)
treeb7092d0d13823cd52735dbbbe0c1954e0d54a5bd
parentf607cda39a44d1cc1114f50ce98c1b6fdd88931f (diff)
downloadeom-7f38bf69cec41fc54e79819022451897e4f1e09b.tar.bz2
eom-7f38bf69cec41fc54e79819022451897e4f1e09b.tar.xz
EomScrollView: Use better downscaling filter
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 origin commit: https://gitlab.gnome.org/GNOME/eog/commit/fbc1128 fixes https://github.com/mate-desktop/eom/issues/96
-rw-r--r--src/eom-scroll-view.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c
index 7be50e2..e42cadc 100644
--- a/src/eom-scroll-view.c
+++ b/src/eom-scroll-view.c
@@ -1411,7 +1411,7 @@ eom_scroll_view_set_antialiasing_in (EomScrollView *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;
@@ -1430,7 +1430,7 @@ eom_scroll_view_set_antialiasing_out (EomScrollView *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;
@@ -1763,8 +1763,8 @@ eom_scroll_view_init (EomScrollView *view)
priv->min_zoom = MIN_ZOOM_FACTOR;
priv->zoom_mode = ZOOM_MODE_FIT;
priv->upscale = FALSE;
- 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;