Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FETile.cpp

Issue 2303703002: Revamp filter primitive region calculations for Filter Effects (Closed)
Patch Set: Baselines again; Manual for mac10.11-retina Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 8677ed991cbdee191da940562afbad4b0941fbc9..b777eb13ea2dd0d977600bf0d07bcf1977c76771 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp
@@ -46,8 +46,12 @@ FloatRect FETile::mapPaintRect(const FloatRect& rect, bool forward) const
sk_sp<SkImageFilter> FETile::createImageFilter()
{
sk_sp<SkImageFilter> input(SkiaImageFilterBuilder::build(inputEffect(0), operatingColorSpace()));
- FloatRect srcRect = inputEffect(0)->filterPrimitiveSubregion();
- FloatRect dstRect = applyEffectBoundaries(getFilter()->filterRegion());
+ FloatRect srcRect;
+ if (inputEffect(0)->getFilterEffectType() == FilterEffectTypeSourceInput)
Stephen White 2016/09/13 15:48:02 Would it not be possible to have make filterPrimit
fs 2016/09/13 16:11:52 I think that more general here would be to check c
+ srcRect = getFilter()->filterRegion();
+ else
+ srcRect = inputEffect(0)->filterPrimitiveSubregion();
+ FloatRect dstRect = filterPrimitiveSubregion();
return SkTileImageFilter::Make(srcRect, dstRect, std::move(input));
}

Powered by Google App Engine
This is Rietveld 408576698