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

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

Issue 1214673005: Check for empty WebFilterOperations in FilterPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: Source/core/paint/FilterPainter.cpp
diff --git a/Source/core/paint/FilterPainter.cpp b/Source/core/paint/FilterPainter.cpp
index 19116baab9659e819290455abc7f7c601279de76..21a6ff97b47e8f1a1d67b89007bd299cc32deb86 100644
--- a/Source/core/paint/FilterPainter.cpp
+++ b/Source/core/paint/FilterPainter.cpp
@@ -63,6 +63,12 @@ FilterPainter::FilterPainter(DeprecatedPaintLayer& layer, GraphicsContext* conte
FilterOperations filterOperations(layer.computeFilterOperations(m_layoutObject->styleRef()));
OwnPtr<WebFilterOperations> webFilterOperations = adoptPtr(Platform::current()->compositorSupport()->createFilterOperations());
builder.buildFilterOperations(filterOperations, webFilterOperations.get());
+ // FIXME: It's possible to have empty WebFilterOperations here even
+ // though the SkImageFilter produced above is non-null, since the
+ // layer's FilterEffectBuilder can have a stale representation of
+ // the layer's filter. See crbug.com/502026.
+ if (!webFilterOperations->size())
+ return;
OwnPtr<BeginFilterDisplayItem> filterDisplayItem = BeginFilterDisplayItem::create(*m_layoutObject, imageFilter, rootRelativeBounds, webFilterOperations.release());
context->displayItemList()->add(filterDisplayItem.release());

Powered by Google App Engine
This is Rietveld 408576698