Index: third_party/WebKit/Source/platform/graphics/filters/FETile.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp b/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp |
index 696d603789dd398f7fc5bcdc0e137e1986f1989c..62ba539a2e4babb5dad54fa43cc2131f63091dd6 100644 |
--- a/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp |
@@ -45,26 +45,11 @@ FloatRect FETile::mapPaintRect(const FloatRect& rect, bool forward) |
return forward ? maxEffectRect() : inputEffect(0)->maxEffectRect(); |
} |
-static FloatRect getRect(FilterEffect* effect) |
-{ |
- FloatRect result = effect->filter()->filterRegion(); |
- FloatRect boundaries = effect->effectBoundaries(); |
- if (effect->hasX()) |
- result.setX(boundaries.x()); |
- if (effect->hasY()) |
- result.setY(boundaries.y()); |
- if (effect->hasWidth()) |
- result.setWidth(boundaries.width()); |
- if (effect->hasHeight()) |
- result.setHeight(boundaries.height()); |
- return result; |
-} |
- |
PassRefPtr<SkImageFilter> FETile::createImageFilter(SkiaImageFilterBuilder& builder) |
{ |
RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpace())); |
- FloatRect srcRect = inputEffect(0) ? getRect(inputEffect(0)) : filter()->filterRegion(); |
- FloatRect dstRect = getRect(this); |
+ FloatRect srcRect = inputEffect(0)->applyEffectBoundaries(filter()->filterRegion()); |
+ FloatRect dstRect = applyEffectBoundaries(filter()->filterRegion()); |
return adoptRef(SkTileImageFilter::Create(srcRect, dstRect, input.get())); |
} |