diff options
author | Bill Spitzak <spitzak@gmail.com> | 2016-03-06 17:06:48 -0800 |
---|---|---|
committer | Søren Sandmann Pedersen <soren.sandmann@gmail.com> | 2016-03-11 00:00:46 -0500 |
commit | e504c3524ed454f47838541321737a499d2e5665 (patch) | |
tree | 8c8686ad971376a621c5a29d4b846f1d68ccedcf | |
parent | 7dce6261397e7faf34d8c2ce8dc870a2df074abf (diff) |
pixman-filter: integral splitting is only needed for triangle filter
Only the triangle is discontinuous at 0. The other filters resemble a cubic closely
enough that Simpsons integration works without splitting.
Signed-off-by: Bill Spitzak <spitzak@gmail.com>
-rw-r--r-- | pixman/pixman-filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c index f9ad45f5..6d589c2b 100644 --- a/pixman/pixman-filter.c +++ b/pixman/pixman-filter.c @@ -176,13 +176,13 @@ integral (pixman_kernel_t kernel1, * as LINEAR that are not differentiable at 0 will still * integrate properly. */ - else if (low < 0 && high > 0) + else if (kernel1 == PIXMAN_KERNEL_LINEAR && low < 0 && high > 0) { return integral (kernel1, kernel2, scale, pos, low, 0) + integral (kernel1, kernel2, scale, pos, 0, high); } - else if (low < pos && high > pos) + else if (kernel2 == PIXMAN_KERNEL_LINEAR && low < pos && high > pos) { return integral (kernel1, kernel2, scale, pos, low, pos) + |