diff options
author | Florin Malita <fmalita@google.com> | 2017-07-12 02:52:48 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-12 02:52:56 +0000 |
commit | a30d407b4fe95335598f62644010d017195e6aac (patch) | |
tree | 9c14fa544a6d6d2b628364cf2c157794775a074c /src/core/SkMaskBlurFilter.h | |
parent | d96ed9d0def2d660f537e4ab5c79e9e66470ee22 (diff) |
Revert "Experimental blur code."
This reverts commit d96ed9d0def2d660f537e4ab5c79e9e66470ee22.
Reason for revert: dm crashing
https://luci-milo.appspot.com/swarming/task/374d82c1d1263910/steps/symbolized_dm/0/stdout
Likely culprit:
unit test BlurDrawing
Stack trace:
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2440eb) [0x568770eb]
linux-gate.so.1(__kernel_sigreturn+0) [0xf7714ca0]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter11blurOneScanENS_10FilterInfoEPKhjS2_PhjS3_+0x236) [0x5766301e]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter4blurERK6SkMaskPS0_+0x285) [0x57663491]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN10SkBlurMask7BoxBlurEP6SkMaskRKS0_f11SkBlurStyle13SkBlurQualityP8SkIPointb+0x5c) [0x5720d48e]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl10filterMaskEP6SkMaskRKS0_RK8SkMatrixP8SkIPoint+0x67) [0x5720e427]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl17filterRectsToNineEPK6SkRectiRK8SkMatrixRK7SkIRectPN12SkMaskFilter9NinePatchE+0x579) [0x5721a247]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK12SkMaskFilter10filterPathERK6SkPathRK8SkMatrixRK12SkRasterClipP9SkBlitterN11SkStrokeRec9InitStyleE+0xf6) [0x5706c2bc]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw11drawDevPathERK6SkPathRK7SkPaintbP9SkBlitterb+0x1bb) [0x57034f1b]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixbbP9SkBlitter+0x47f) [0x57035dd3]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN14SkBitmapDevice8drawPathERK6SkPathRK7SkPaintPK8SkMatrixb+0x6e) [0x56f937fc]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas10onDrawPathERK6SkPathRK7SkPaint+0x39d) [0x56fb12e5]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas8drawPathERK6SkPathRK7SkPaint+0x18) [0x56fad926]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x3f71b3) [0x56a2a1b3]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2450bd) [0x568780bd]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2450fb) [0x568780fb]
/mnt/pd0/s/w/ir/out/Debug/dm(+0xae53e7) [0x571183e7]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNKSt8functionIFvvEEclEv+0x20) [0x569f98de]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN12SkThreadPool4LoopEPv+0x298) [0x57045b2f]
/mnt/pd0/s/w/ir/out/Debug/dm(+0xbbd92c) [0x571f092c]
/lib/i386-linux-gnu/libpthread.so.0(+0x627a) [0xf76e827a]
/lib/i386-linux-gnu/libc.so.6(clone+0x66) [0xf70ecb56]
Segmentation fault
Original change's description:
> Experimental blur code.
>
> This uses a new method of blurring that runs the three
> passes of the box filter in a single pass. This implementation
> currently only does 1x1 pixel at a time, but it should be simple
> to expand to 4x4 pixels at a time.
>
> On the blur_10_normal_high_quality benchmark, the new is 7% faster
> than the old code. For the blur_100.50_normal_high_quality
> benchmark, the new code is 11% slower.
>
> Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02
> Reviewed-on: https://skia-review.googlesource.com/21739
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=herb@google.com,reed@google.com
Change-Id: I9e896c548d0a4cd3308d6a311c8bd16719a08a85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/22421
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Diffstat (limited to 'src/core/SkMaskBlurFilter.h')
-rw-r--r-- | src/core/SkMaskBlurFilter.h | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/src/core/SkMaskBlurFilter.h b/src/core/SkMaskBlurFilter.h deleted file mode 100644 index 9becadca39..0000000000 --- a/src/core/SkMaskBlurFilter.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkBlurMaskFilter_DEFINED -#define SkBlurMaskFilter_DEFINED - -#include <algorithm> -#include <memory> - -#include "SkMask.h" -#include "SkTypes.h" - -// Implement a single channel Gaussian blur. The specifics for implementation are taken from: -// https://drafts.fxtf.org/filters/#feGaussianBlurElement -class SkMaskBlurFilter { -public: - // Given a filter specified by sigma, generate various quantities. - class FilterInfo { - public: - explicit FilterInfo(double sigma); - - // The final weight to divide by given a box size calculated from sigma accumulated for - // all three passes. For example, if the box size is 5, then the final weight for all - // three passes is 5^3 or 125. - uint64_t weight() const; - - // The distance between the first value of the dst and the first value of the src. - uint32_t borderSize() const; - - // The size of the box filter. - size_t diameter(uint8_t) const; - - // A factor used to simulate division using multiplication and shift. - uint64_t scaledWeight() const; - - private: - const uint32_t fFilterWindow; - const uint64_t fScaledWeight; - }; - - // Create an object suitable for filtering an SkMask using a filter with width sigmaW and - // height sigmaH. - SkMaskBlurFilter(double sigmaW, double sigmaH); - - // Given a src SkMask, generate dst SkMask returning the border width and height. - SkIPoint blur(const SkMask& src, SkMask* dst) const; - -private: - size_t bufferSize(uint8_t bufferPass) const; - - void blurOneScan(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; - std::unique_ptr<uint32_t[]> fBuffer0, - fBuffer1, - fBuffer2; -}; - -#endif // SkBlurMaskFilter_DEFINED |