diff options
author | senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 16:46:43 +0000 |
---|---|---|
committer | senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 16:46:43 +0000 |
commit | f14bcd25e57c6f29cdfa7aa95798d9780e6729b8 (patch) | |
tree | d0b20d21d725de97ae9d81296538727704ee9c3a | |
parent | 23be7a58d9d69ae0a06788c2d798f2f92baea29c (diff) |
Remove some now-unused #ifdefs.
R=mtklein@google.com, mtklein, reed@google.com
Review URL: https://codereview.chromium.org/68473003
git-svn-id: http://skia.googlecode.com/svn/trunk@12246 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/effects/SkBlurImageFilter.cpp | 18 | ||||
-rw-r--r-- | src/effects/SkBlurMask.cpp | 8 |
2 files changed, 0 insertions, 26 deletions
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp index fa8ccc866e..262733a74b 100644 --- a/src/effects/SkBlurImageFilter.cpp +++ b/src/effects/SkBlurImageFilter.cpp @@ -72,10 +72,8 @@ static void boxBlur(const SkPMColor* src, int srcStride, SkPMColor* dst, int ker int dstStrideX = dstDirection == kX ? 1 : height; int srcStrideY = srcDirection == kX ? srcStride : 1; int dstStrideY = dstDirection == kX ? width : 1; -#ifndef SK_DISABLE_BLUR_DIVISION_OPTIMIZATION uint32_t scale = (1 << 24) / kernelSize; uint32_t half = 1 << 23; -#endif for (int y = 0; y < height; ++y) { int sumA = 0, sumR = 0, sumG = 0, sumB = 0; const SkPMColor* p = src; @@ -90,17 +88,10 @@ static void boxBlur(const SkPMColor* src, int srcStride, SkPMColor* dst, int ker const SkPMColor* sptr = src; SkColor* dptr = dst; for (int x = 0; x < width; ++x) { -#ifndef SK_DISABLE_BLUR_DIVISION_OPTIMIZATION *dptr = SkPackARGB32((sumA * scale + half) >> 24, (sumR * scale + half) >> 24, (sumG * scale + half) >> 24, (sumB * scale + half) >> 24); -#else - *dptr = SkPackARGB32(sumA / kernelSize, - sumR / kernelSize, - sumG / kernelSize, - sumB / kernelSize); -#endif if (x >= leftOffset) { SkColor l = *(sptr - leftOffset * srcStrideX); sumA -= SkGetPackedA32(l); @@ -202,21 +193,12 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy, } if (kernelSizeX > 0 && kernelSizeY > 0) { -#ifndef SK_DISABLE_BLUR_DIVISION_OPTIMIZATION boxBlurX(s, sw, t, kernelSizeX, lowOffsetX, highOffsetX, w, h); boxBlurX(t, w, d, kernelSizeX, highOffsetX, lowOffsetX, w, h); boxBlurXY(d, w, t, kernelSizeX3, highOffsetX, highOffsetX, w, h); boxBlurX(t, h, d, kernelSizeY, lowOffsetY, highOffsetY, h, w); boxBlurX(d, h, t, kernelSizeY, highOffsetY, lowOffsetY, h, w); boxBlurXY(t, h, d, kernelSizeY3, highOffsetY, highOffsetY, h, w); -#else - boxBlurX(s, sw, t, kernelSizeX, lowOffsetX, highOffsetX, w, h); - boxBlurY(t, w, d, kernelSizeY, lowOffsetY, highOffsetY, h, w); - boxBlurX(d, w, t, kernelSizeX, highOffsetX, lowOffsetX, w, h); - boxBlurY(t, w, d, kernelSizeY, highOffsetY, lowOffsetY, h, w); - boxBlurX(d, w, t, kernelSizeX3, highOffsetX, highOffsetX, w, h); - boxBlurY(t, w, d, kernelSizeY3, highOffsetY, highOffsetY, h, w); -#endif } else if (kernelSizeX > 0) { boxBlurX(s, sw, d, kernelSizeX, lowOffsetX, highOffsetX, w, h); boxBlurX(d, w, t, kernelSizeX, highOffsetX, lowOffsetX, w, h); diff --git a/src/effects/SkBlurMask.cpp b/src/effects/SkBlurMask.cpp index d279880aec..97a623426b 100644 --- a/src/effects/SkBlurMask.cpp +++ b/src/effects/SkBlurMask.cpp @@ -83,11 +83,7 @@ static int boxBlur(const uint8_t* src, int src_y_stride, uint8_t* dst, int new_width = width + SkMax32(leftRadius, rightRadius) * 2; int dst_x_stride = transpose ? height : 1; int dst_y_stride = transpose ? 1 : new_width; -#ifndef SK_DISABLE_BLUR_ROUNDING uint32_t half = 1 << 23; -#else - uint32_t half = 0; -#endif for (int y = 0; y < height; ++y) { uint32_t sum = 0; uint8_t* dptr = dst + y * dst_y_stride; @@ -290,11 +286,7 @@ static int boxBlurInterp(const uint8_t* src, int src_y_stride, uint8_t* dst, inner_weight += inner_weight >> 7; uint32_t outer_scale = (outer_weight << 16) / kernelSize; uint32_t inner_scale = (inner_weight << 16) / (kernelSize - 2); -#ifndef SK_DISABLE_BLUR_ROUNDING uint32_t half = 1 << 23; -#else - uint32_t half = 0; -#endif int new_width = width + diameter; int dst_x_stride = transpose ? height : 1; int dst_y_stride = transpose ? 1 : new_width; |