aboutsummaryrefslogtreecommitdiff
path: root/fastiv-view.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-09-22 14:21:27 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-10-16 10:04:50 +0200
commit70a4729f363c25684098953cad99ed9af4e23bf7 (patch)
tree450ae5dfd9e5d8f5bd759112499ee0a5ec50599e /fastiv-view.c
parentcc29f80bb2246eb0057030627586d0b2c4d26371 (diff)
downloadfiv-70a4729f363c25684098953cad99ed9af4e23bf7.tar.gz
fiv-70a4729f363c25684098953cad99ed9af4e23bf7.tar.xz
fiv-70a4729f363c25684098953cad99ed9af4e23bf7.zip
Use bilinear filtering
It could be both faster and more accurate, though currently it's a good compromise.
Diffstat (limited to 'fastiv-view.c')
-rw-r--r--fastiv-view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fastiv-view.c b/fastiv-view.c
index 33a2878..ac312d5 100644
--- a/fastiv-view.c
+++ b/fastiv-view.c
@@ -137,6 +137,9 @@ fastiv_view_draw(GtkWidget *widget, cairo_t *cr)
cairo_set_source_surface(cr, self->surface,
x / self->scale, y / self->scale);
+ // TODO(p): Prescale it ourselves to an off-screen bitmap, gamma-correctly.
+ cairo_pattern_set_filter(cairo_get_source(cr), CAIRO_FILTER_GOOD);
+
cairo_paint(cr);
return TRUE;
}