| Index: Source/platform/graphics/DrawLooperBuilder.cpp
|
| diff --git a/Source/platform/graphics/DrawLooperBuilder.cpp b/Source/platform/graphics/DrawLooperBuilder.cpp
|
| index 3b0a8f45ae0f94efb0a724f92aa75483c59f84f7..1b30b6767fbf6cbb01c36da4f8f302ee4259d7aa 100644
|
| --- a/Source/platform/graphics/DrawLooperBuilder.cpp
|
| +++ b/Source/platform/graphics/DrawLooperBuilder.cpp
|
| @@ -33,6 +33,7 @@
|
|
|
| #include "platform/geometry/FloatSize.h"
|
| #include "platform/graphics/Color.h"
|
| +#include "platform/graphics/skia/SkiaUtils.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "third_party/skia/include/core/SkColorFilter.h"
|
| #include "third_party/skia/include/core/SkDrawLooper.h"
|
| @@ -63,13 +64,6 @@ void DrawLooperBuilder::addUnmodifiedContent()
|
| m_skDrawLooperBuilder.addLayerOnTop(info);
|
| }
|
|
|
| -// This replicates the old skia behavior when it used to take radius for blur. Now it takes sigma.
|
| -static SkScalar RadiusToSigma(SkScalar radius)
|
| -{
|
| - SkASSERT(radius > 0);
|
| - return 0.57735f * radius + 0.5f;
|
| -}
|
| -
|
| void DrawLooperBuilder::addShadow(const FloatSize& offset, float blur, const Color& color,
|
| ShadowTransformMode shadowTransformMode, ShadowAlphaMode shadowAlphaMode)
|
| {
|
| @@ -101,7 +95,7 @@ void DrawLooperBuilder::addShadow(const FloatSize& offset, float blur, const Col
|
| SkPaint* paint = m_skDrawLooperBuilder.addLayerOnTop(info);
|
|
|
| if (blur) {
|
| - const SkScalar sigma = RadiusToSigma(blur / 2);
|
| + const SkScalar sigma = skBlurRadiusToSigma(blur);
|
| uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag;
|
| if (shadowTransformMode == ShadowIgnoresTransforms)
|
| mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag;
|
|
|