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

Unified Diff: third_party/WebKit/Source/core/paint/FilterPainter.cpp

Issue 1459953002: Fix the reference box computation for CSS filter effects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO per review Created 5 years, 1 month 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/core/paint/FilterPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/FilterPainter.cpp b/third_party/WebKit/Source/core/paint/FilterPainter.cpp
index 618338860f0336c08dca839cec9d29e3df4102ad..cc14063934468c50812b25e92c576382a6271f38 100644
--- a/third_party/WebKit/Source/core/paint/FilterPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/FilterPainter.cpp
@@ -27,13 +27,16 @@ FilterPainter::FilterPainter(PaintLayer& layer, GraphicsContext* context, const
, m_context(context)
, m_layoutObject(layer.layoutObject())
{
- if (!layer.filterEffectBuilder() || !layer.paintsWithFilters())
+ if (!layer.paintsWithFilters())
+ return;
+
+ RefPtrWillBeRawPtr<FilterEffect> lastEffect = layer.lastFilterEffect();
+ if (!lastEffect)
return;
ASSERT(layer.filterInfo());
SkiaImageFilterBuilder builder;
- RefPtrWillBeRawPtr<FilterEffect> lastEffect = layer.filterEffectBuilder()->lastEffect();
lastEffect->determineFilterPrimitiveSubregion(MapRectForward);
RefPtr<SkImageFilter> imageFilter = builder.build(lastEffect.get(), ColorSpaceDeviceRGB);
if (!imageFilter)

Powered by Google App Engine
This is Rietveld 408576698