Index: third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp b/third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp |
index 9be12c2b3223a5207859eec7e0409cb23406b980..bf50630f531b1706c6677c8f704d8bd46e8407e3 100644 |
--- a/third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp |
@@ -92,10 +92,8 @@ FloatRect FEMorphology::mapEffect(const FloatRect& rect) const { |
sk_sp<SkImageFilter> FEMorphology::createImageFilter() { |
sk_sp<SkImageFilter> input( |
SkiaImageFilterBuilder::build(inputEffect(0), operatingColorSpace())); |
- SkScalar radiusX = |
- SkFloatToScalar(getFilter()->applyHorizontalScale(m_radiusX)); |
- SkScalar radiusY = |
- SkFloatToScalar(getFilter()->applyVerticalScale(m_radiusY)); |
+ int radiusX = clampTo<int>(getFilter()->applyHorizontalScale(m_radiusX)); |
+ int radiusY = clampTo<int>(getFilter()->applyVerticalScale(m_radiusY)); |
Stephen Chennney
2016/12/19 14:21:14
Does clampTo<SkScalar> work?
fs
2016/12/19 14:24:00
SkScalar is typedef'd to float (or double, but I t
|
SkImageFilter::CropRect rect = getCropRect(); |
if (m_type == FEMORPHOLOGY_OPERATOR_DILATE) |
return SkDilateImageFilter::Make(radiusX, radiusY, std::move(input), &rect); |