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
This commit is contained in:
senorblanco@chromium.org 2013-11-12 16:46:43 +00:00
parent 23be7a58d9
commit f14bcd25e5
2 changed files with 0 additions and 26 deletions

View File

@ -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);

View File

@ -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;