summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-04-03 10:53:15 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-04-03 10:53:15 -0400
commit919fbf0fee39a5e0636569bfbca9e45af790332d (patch)
tree4ec08686a17f2516c8100116bf4027470d3c00a2
parent32e568600f8793356d069f49d3239d24c060e083 (diff)
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.
-rw-r--r--clients/cairo-util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/cairo-util.c b/clients/cairo-util.c
index b91fd1f..df5c7df 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);