Commit fbc11280 authored by Russell Haley's avatar Russell Haley Committed by Felix Riemann
Browse files

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
parent 64376d1d
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment