diff options
author | Herb Derby <herb@google.com> | 2017-11-16 21:43:26 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-16 22:46:09 +0000 |
commit | 35c556f33e2c9316055537e5683c28ea1645ff49 (patch) | |
tree | 4bb7c7a01a41350254465f132d3ca21573205de6 /src/core/SkGaussFilter.h | |
parent | 1e09e461d2ffcf8b07242cfe93dd7d12c4d75866 (diff) |
Revert "Revert "Direct evaluation of gaussian""
This reverts commit a53d999007f92ecd4244b078fa909b76fd0d9f3b.
Reason for revert: Bug in SkNx_sse fixed.
Original change's description:
> Revert "Direct evaluation of gaussian"
>
> This reverts commit 5e18cdea0a0a3f23d8e8b8140c82a4b54e121402.
>
> Reason for revert: ASAN
> Original change's description:
> > 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>
>
> TBR=mtklein@google.com,herb@google.com
>
> Change-Id: I936077dfa659d71bc361339d98340c55545a1eb8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/72481
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,herb@google.com,brianosman@google.com
Change-Id: I4c30e3481308a8148d40223519e286885ec6f880
Reviewed-on: https://skia-review.googlesource.com/72900
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkGaussFilter.h')
-rw-r--r-- | src/core/SkGaussFilter.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkGaussFilter.h b/src/core/SkGaussFilter.h index 9af45c875b..be00cf2cc0 100644 --- a/src/core/SkGaussFilter.h +++ b/src/core/SkGaussFilter.h @@ -27,10 +27,16 @@ public: int radius() const { return fN - 1; } int width() const { return 2 * this->radius() + 1; } + // TODO: remove filterDouble and use the ranged-for loop interface. + // Take an array of values where the gaussian factors will be placed. Return the number of // values filled. int filterDouble(double values[5]) const; + // Allow a filter to be used in a C++ ranged-for loop. + const double* begin() const { return &fBasis[0]; } + const double* end() const { return &fBasis[fN]; } + private: double fBasis[5]; int fN; |