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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h

Issue 2642473002: Fix FilterDisplayItem::equals() (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/Source/platform/graphics/CompositorFilterOperations.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h
index 9aa4e53d054556f560aaee9db5000d882578fa2a..0406626a9991f708154d009c1d213cf21a674850 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/FilterDisplayItem.h
@@ -40,12 +40,14 @@ class PLATFORM_EXPORT BeginFilterDisplayItem final
void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override;
#endif
bool equals(const DisplayItem& other) const final {
- // TODO(wangxianzhu): compare m_imageFilter and m_webFilterOperations.
- const auto& other_display_item =
- static_cast<const BeginFilterDisplayItem&>(other);
- return DisplayItem::equals(other) &&
- m_bounds == other_display_item.m_bounds &&
- m_origin == other_display_item.m_origin;
+ if (!DisplayItem::equals(other))
+ return false;
+ const auto& otherItem = static_cast<const BeginFilterDisplayItem&>(other);
+ // Ignores changes of reference filters because SkImageFilter doesn't have
+ // an equality operator.
+ return m_bounds == otherItem.m_bounds && m_origin == otherItem.m_origin &&
+ m_compositorFilterOperations.equalsIgnoringReferenceFilters(
+ otherItem.m_compositorFilterOperations);
}
// FIXME: m_imageFilter should be replaced with m_webFilterOperations when
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/CompositorFilterOperations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698