| Index: src/effects/SkBlurMask.cpp
|
| ===================================================================
|
| --- src/effects/SkBlurMask.cpp (revision 9604)
|
| +++ src/effects/SkBlurMask.cpp (working copy)
|
| @@ -11,15 +11,8 @@
|
| #include "SkMath.h"
|
| #include "SkTemplates.h"
|
| #include "SkEndian.h"
|
| +#include "SkBlurMaskFilter.h"
|
|
|
| -// scale factor for the blur radius to match the behavior of the all existing blur
|
| -// code (both on the CPU and the GPU). This magic constant is 1/sqrt(3).
|
| -
|
| -// TODO: get rid of this fudge factor and move any required fudging up into
|
| -// the calling library
|
| -
|
| -#define kBlurRadiusFudgeFactor SkFloatToScalar( .57735f )
|
| -
|
| #define UNROLL_SEPARABLE_LOOPS
|
|
|
| /**
|
| @@ -495,7 +488,7 @@
|
| // to approximate a Gaussian blur
|
| int passCount = (kHigh_Quality == quality) ? 3 : 1;
|
| SkScalar passRadius = (kHigh_Quality == quality) ?
|
| - SkScalarMul( radius, kBlurRadiusFudgeFactor):
|
| + SkScalarMul( radius, SkBlurMaskFilter::kBlurRadiusFudgeFactor):
|
| radius;
|
|
|
| int rx = SkScalarCeil(passRadius);
|
| @@ -715,7 +708,7 @@
|
| SkIPoint *margin, SkMask::CreateMode createMode) {
|
| int profile_size;
|
|
|
| - float radius = SkScalarToFloat(SkScalarMul(provided_radius, kBlurRadiusFudgeFactor));
|
| + float radius = SkScalarToFloat(SkScalarMul(provided_radius, SkBlurMaskFilter::kBlurRadiusFudgeFactor));
|
|
|
| // adjust blur radius to match interpretation from boxfilter code
|
| radius = (radius + .5f) * 2.f;
|
| @@ -851,7 +844,7 @@
|
| return false;
|
| }
|
|
|
| - float radius = SkScalarToFloat(SkScalarMul(provided_radius, kBlurRadiusFudgeFactor));
|
| + float radius = SkScalarToFloat(SkScalarMul(provided_radius, SkBlurMaskFilter::kBlurRadiusFudgeFactor));
|
| float stddev = SkScalarToFloat(radius) /2.0f;
|
| float variance = stddev * stddev;
|
|
|
|
|