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..6e5b4d883f6acae208f468498748762b97627293 100644 |
--- a/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp |
@@ -45,26 +45,13 @@ 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 = filter()->filterRegion(); |
+ inputEffect(0)->applyEffectBoundaries(srcRect); |
Stephen White
2015/11/19 14:54:34
Can inputEffect(0) not be null here?
fs
2015/11/19 15:48:09
Nope. (That should even hold generally - at least
|
+ FloatRect dstRect = filter()->filterRegion(); |
+ applyEffectBoundaries(dstRect); |
return adoptRef(SkTileImageFilter::Create(srcRect, dstRect, input.get())); |
} |