summaryrefslogtreecommitdiff
path: root/src/cairo-pattern.c
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2014-08-12 15:48:04 -0700
committerBryce Harrington <bryce@osg.samsung.com>2014-08-14 12:59:07 -0700
commit1d9f4ae5208d86843a6001d10c9cb5b16df2b785 (patch)
treed748f49ab8803505747b8ebfffc45ba096a4c49f /src/cairo-pattern.c
parent7d44f8d47e7c4389cf6a3baefc7fee7b5dffbb21 (diff)
downloadcairo-1d9f4ae5208d86843a6001d10c9cb5b16df2b785.tar.gz
V5: Use NEAREST filter when possible
(changed to use determinant funciton and remove debug printf) Modifies _cairo_matrix_has_unity_scale to return true for 90 degree rotations by allowing error caused by inaccuracy in trig functions. This fails after 14 additions of M_PI_2 to itself as a float argument to cairo_rotate, but the failure is in the detection of the integer translate, not in the trig components. I believe this is due to the matrix inversion, which may need similar rounding. Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'src/cairo-pattern.c')
-rw-r--r--src/cairo-pattern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index e104440c3..6905e15a3 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -3363,6 +3363,7 @@ _cairo_pattern_analyze_filter (const cairo_pattern_t *pattern,
case CAIRO_FILTER_GOOD:
case CAIRO_FILTER_BEST:
case CAIRO_FILTER_BILINEAR:
+ case CAIRO_FILTER_FAST:
/* If source pixels map 1:1 onto destination pixels, we do
* not need to filter (and do not want to filter, since it
* will cause blurriness)
@@ -3381,7 +3382,6 @@ _cairo_pattern_analyze_filter (const cairo_pattern_t *pattern,
}
break;
- case CAIRO_FILTER_FAST:
case CAIRO_FILTER_NEAREST:
case CAIRO_FILTER_GAUSSIAN:
default: