From 919fbf0fee39a5e0636569bfbca9e45af790332d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 3 Apr 2012 10:53:15 -0400 Subject: [PATCH] cairo-util: Use nearest filtering for rendering frame We don't need bilinear filtering here, the corners aren't scaled and the scaled edges are just stretched along one axis. --- clients/cairo-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clients/cairo-util.c b/clients/cairo-util.c index b91fd1f2..df5c7dff 100644 --- a/clients/cairo-util.c +++ b/clients/cairo-util.c @@ -140,6 +140,7 @@ tile_mask(cairo_t *cr, cairo_surface_t *surface, cairo_set_operator(cr, CAIRO_OPERATOR_OVER); pattern = cairo_pattern_create_for_surface (surface); + cairo_pattern_set_filter(pattern, CAIRO_FILTER_NEAREST); for (i = 0; i < 4; i++) { fx = i & 1; @@ -222,6 +223,7 @@ tile_source(cairo_t *cr, cairo_surface_t *surface, cairo_set_operator(cr, CAIRO_OPERATOR_OVER); pattern = cairo_pattern_create_for_surface (surface); + cairo_pattern_set_filter(pattern, CAIRO_FILTER_NEAREST); cairo_set_source(cr, pattern); cairo_pattern_destroy(pattern);