Index: src/gpu/SkGpuDevice.cpp |
=================================================================== |
--- src/gpu/SkGpuDevice.cpp (revision 9604) |
+++ src/gpu/SkGpuDevice.cpp (working copy) |
@@ -47,18 +47,6 @@ |
kXfermodeEffectIdx = 2, |
}; |
-#define MAX_BLUR_SIGMA 4.0f |
-// FIXME: This value comes from from SkBlurMaskFilter.cpp. |
-// Should probably be put in a common header someplace. |
-#define MAX_BLUR_RADIUS SkIntToScalar(128) |
-// This constant approximates the scaling done in the software path's |
-// "high quality" mode, in SkBlurMask::Blur() (1 / sqrt(3)). |
-// IMHO, it actually should be 1: we blur "less" than we should do |
-// according to the CSS and canvas specs, simply because Safari does the same. |
-// Firefox used to do the same too, until 4.0 where they fixed it. So at some |
-// point we should probably get rid of these scaling constants and rebaseline |
-// all the blur tests. |
-#define BLUR_SIGMA_SCALE 0.6f |
// This constant represents the screen alignment criterion in texels for |
// requiring texture domain clamping to prevent color bleeding when drawing |
// a sub region of a larger source image. |
@@ -798,7 +786,7 @@ |
} |
SkScalar radius = info.fIgnoreTransform ? info.fRadius |
: context->getMatrix().mapRadius(info.fRadius); |
- radius = SkMinScalar(radius, MAX_BLUR_RADIUS); |
+ radius = SkMinScalar(radius, info.fMaxRadius); |
if (radius <= 0) { |
return false; |
} |
@@ -808,7 +796,7 @@ |
return false; |
} |
- float sigma = SkScalarToFloat(radius) * BLUR_SIGMA_SCALE; |
+ float sigma = SkScalarToFloat(radius) * info.fSigmaFraction; |
float sigma3 = sigma * 3.0f; |
SkRect clipRect; |