aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGaussFilter.cpp
diff options
context:
space:
mode:
authorGravatar Herbert Derby <herb@google.com>2017-10-20 14:53:45 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-16 18:06:22 +0000
commit5e18cdea0a0a3f23d8e8b8140c82a4b54e121402 (patch)
tree20df99a3ea7ed5cb80eac3fcb0438b167cf028ec /src/core/SkGaussFilter.cpp
parent3b2f5b60ff9a82ade01746d7e7cbbcc9348d6c03 (diff)
Direct evaluation of gaussian
The SVG(CSS) standard allows the 3 pass algorithm for sigma >= 2. But sigma < 2, the code must evaluate to the convolution. The old code used an interpolation scheme between windowed filters. This code directly evaluates the gaussian kernel for sigma < 2. This code produces cleaner results, is 25% faster, and does not use a temporary memory buffer. Change-Id: Ibd0caa73cadd06b637f55ba7bd4fefcfe7ac73db Reviewed-on: https://skia-review.googlesource.com/62540 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/core/SkGaussFilter.cpp')
-rw-r--r--src/core/SkGaussFilter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/SkGaussFilter.cpp b/src/core/SkGaussFilter.cpp
index 548ff4398d..c0d612ddec 100644
--- a/src/core/SkGaussFilter.cpp
+++ b/src/core/SkGaussFilter.cpp
@@ -143,10 +143,9 @@ SkGaussFilter::SkGaussFilter(double sigma, Type type) {
}
}
-int SkGaussFilter::filterDouble(double* values) const {
+int SkGaussFilter::filterDouble(double values[5]) const {
for (int i = 0; i < fN; i++) {
values[i] = fBasis[i];
}
return fN;
}
-