| Index: Source/core/platform/graphics/filters/FilterEffect.cpp
|
| diff --git a/Source/core/platform/graphics/filters/FilterEffect.cpp b/Source/core/platform/graphics/filters/FilterEffect.cpp
|
| index 01e4b0a6278d5a66915688a0e6a3713d52a18670..5972bcddcc1aa69f7321ff4fcfcacd49461f5c46 100644
|
| --- a/Source/core/platform/graphics/filters/FilterEffect.cpp
|
| +++ b/Source/core/platform/graphics/filters/FilterEffect.cpp
|
| @@ -481,4 +481,17 @@ PassRefPtr<SkImageFilter> FilterEffect::createImageFilter(SkiaImageFilterBuilder
|
| return 0;
|
| }
|
|
|
| +SkIRect FilterEffect::getCropRect(const FloatSize& cropOffset) const
|
| +{
|
| + SkIRect rect;
|
| + FloatRect boundaries = effectBoundaries();
|
| + FloatSize resolution = filter()->filterResolution();
|
| + boundaries.scale(resolution.width(), resolution.height());
|
| + rect.fLeft = hasX() ? static_cast<int>(boundaries.x()) + cropOffset.width() : 0;
|
| + rect.fTop = hasY() ? static_cast<int>(boundaries.y()) + cropOffset.height() : 0;
|
| + rect.fRight = hasWidth() ? rect.fLeft + static_cast<int>(boundaries.width()) : SK_MaxS32;
|
| + rect.fBottom = hasHeight() ? rect.fTop + static_cast<int>(boundaries.height()) : SK_MaxS32;
|
| + return rect;
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|