From ad32b4d69a5a56d416502fb2e3bb5f2c1e6a605c Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 8 Jun 2016 16:12:48 +0100 Subject: Fix the zoom and scroll performance. Closes #105. Adapted from https://git.gnome.org/browse/eog/commit/?id=3d1859e321b9dea27e49bab9626044f3f5835420 --- src/eom-scroll-view.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c index 6d1b290..5ec6c57 100644 --- a/src/eom-scroll-view.c +++ b/src/eom-scroll-view.c @@ -1355,9 +1355,10 @@ display_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data) cairo_scale (cr, priv->zoom, priv->zoom); cairo_set_source_surface (cr, priv->surface, xofs/priv->zoom, yofs/priv->zoom); cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_PAD); - if ((is_zoomed_in (view) && priv->interp_type_in == CAIRO_FILTER_NEAREST) || - (is_zoomed_out (view) && priv->interp_type_out == CAIRO_FILTER_NEAREST)) - cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST); + if (is_zoomed_in (view)) + cairo_pattern_set_filter (cairo_get_source (cr), priv->interp_type_in); + else if (is_zoomed_out (view)) + cairo_pattern_set_filter (cairo_get_source (cr), priv->interp_type_out); cairo_paint (cr); } -- cgit v1.2.1