aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMaskBlurFilter.h
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2017-08-15 15:00:03 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-15 15:00:17 +0000
commitf6975ea5fb178c572cf4c1cd255e5fe623418d45 (patch)
tree0dac43ecceb5cd75350c7a1c1eb131e0b50fb88c /src/core/SkMaskBlurFilter.h
parent72a37bed66c90ff2acb930dc4493dc633f265488 (diff)
Revert "Revert "Add an average mode for sigma < 2""
We are going to have the google3 auto roller build the CL, and add the fixes to the failing tests to that CL. Because these are scuba changes, this should be simpler. This reverts commit 8e7503195c40492df6a9c072d3303c9df9ec32dc. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Add an average mode for sigma < 2" > > This reverts commit ba8275148ab8b10393b053e2586b852796c4afc2. > > Reason for revert: layout tests, Google3 equivalent failing. > > Original change's description: > > Add an average mode for sigma < 2 > > > > The original code had an optimization when sigma < 2 that averaged > > pixels instead of Gaussian bluring them. This CL adds that > > behavior back to the new implementat. > > > > BUG=chromium:745290 > > Change-Id: I35b7de2138a859d546439cc2053b4b599a94ebe1 > > Reviewed-on: https://skia-review.googlesource.com/34180 > > Commit-Queue: Herb Derby <herb@google.com> > > Reviewed-by: Mike Klein <mtklein@chromium.org> > > TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com > > Change-Id: Ie8f38b042acec42260913cb7bed5538a2c957e9b > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:745290 > Reviewed-on: https://skia-review.googlesource.com/34640 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com Change-Id: I5f7b706a2f8c8d52b3576c638ecddf12a1652031 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:745290 Reviewed-on: https://skia-review.googlesource.com/34641 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkMaskBlurFilter.h')
-rw-r--r--src/core/SkMaskBlurFilter.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/SkMaskBlurFilter.h b/src/core/SkMaskBlurFilter.h
index c530488efb..000d9493a0 100644
--- a/src/core/SkMaskBlurFilter.h
+++ b/src/core/SkMaskBlurFilter.h
@@ -37,8 +37,13 @@ public:
// A factor used to simulate division using multiplication and shift.
uint64_t scaledWeight() const;
+ // Returned when sigma < 2.
+ bool isSmall() const;
+
private:
+ const bool fIsSmall;
const uint32_t fFilterWindow;
+ const uint64_t fWeight;
const uint64_t fScaledWeight;
};
@@ -59,6 +64,14 @@ private:
const uint8_t* src, size_t srcStride, const uint8_t* srcEnd,
uint8_t* dst, size_t dstStride, uint8_t* dstEnd) const;
+ void blurOneScanBox(FilterInfo gen,
+ const uint8_t* src, size_t srcStride, const uint8_t* srcEnd,
+ uint8_t* dst, size_t dstStride, uint8_t* dstEnd) const;
+
+ void blurOneScanGauss(FilterInfo gen,
+ const uint8_t* src, size_t srcStride, const uint8_t* srcEnd,
+ uint8_t* dst, size_t dstStride, uint8_t* dstEnd) const;
+
const FilterInfo fInfoW,
fInfoH;