Index: src/gpu/SkGpuDevice.cpp |
=================================================================== |
--- src/gpu/SkGpuDevice.cpp (revision 9604) |
+++ src/gpu/SkGpuDevice.cpp (working copy) |
@@ -24,6 +24,7 @@ |
#include "SkRRect.h" |
#include "SkStroke.h" |
#include "SkUtils.h" |
+#include "SkBlurMaskFilter.h" |
#define CACHE_COMPATIBLE_DEVICE_TEXTURES 1 |
@@ -47,18 +48,9 @@ |
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. |
@@ -808,7 +800,7 @@ |
return false; |
} |
- float sigma = SkScalarToFloat(radius) * BLUR_SIGMA_SCALE; |
+ float sigma = SkScalarToFloat(radius) * SkBlurMaskFilter::kBLUR_SIGMA_SCALE; |
bsalomon
2013/06/14 18:23:54
Could the radius returned in info already account
|
float sigma3 = sigma * 3.0f; |
SkRect clipRect; |