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

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: isEmpty instead of size 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
« no previous file with comments | « Source/core/animation/AnimationTranslationUtilTest.cpp ('k') | public/platform/WebFilterOperations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/FilterPainter.cpp
diff --git a/Source/core/paint/FilterPainter.cpp b/Source/core/paint/FilterPainter.cpp
index 19116baab9659e819290455abc7f7c601279de76..a5a8e2457894d0ad241cef5421666626c27155be 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->isEmpty())
+ return;
OwnPtr<BeginFilterDisplayItem> filterDisplayItem = BeginFilterDisplayItem::create(*m_layoutObject, imageFilter, rootRelativeBounds, webFilterOperations.release());
context->displayItemList()->add(filterDisplayItem.release());
« no previous file with comments | « Source/core/animation/AnimationTranslationUtilTest.cpp ('k') | public/platform/WebFilterOperations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698