Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
index f7c2771743141f28f8d65ed237fec5339e22348b..9cf2cb0c58f2294695b0d661e3f211a7b66dd9f8 100644 |
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
@@ -221,6 +221,7 @@ void CanvasRenderingContext2D::didSetSurfaceSize() { |
DEFINE_TRACE(CanvasRenderingContext2D) { |
visitor->trace(m_hitRegionManager); |
+ visitor->trace(m_filterOperations); |
CanvasRenderingContext::trace(visitor); |
BaseRenderingContext2D::trace(visitor); |
SVGResourceClient::trace(visitor); |
@@ -565,7 +566,28 @@ void CanvasRenderingContext2D::styleDidChange(const ComputedStyle* oldStyle, |
pruneLocalFontCache(0); |
} |
-void CanvasRenderingContext2D::filterNeedsInvalidation() { |
+TreeScope* CanvasRenderingContext2D::treeScope() { |
+ return &canvas()->treeScope(); |
+} |
+ |
+void CanvasRenderingContext2D::clearFilterReferences() { |
+ m_filterOperations.removeClient(this); |
+ m_filterOperations.clear(); |
+} |
+ |
+void CanvasRenderingContext2D::updateFilterReferences( |
+ const FilterOperations& filters) { |
+ clearFilterReferences(); |
+ filters.addClient(this); |
+ m_filterOperations = filters; |
+} |
+ |
+void CanvasRenderingContext2D::resourceContentChanged() { |
+ resourceElementChanged(); |
+} |
+ |
+void CanvasRenderingContext2D::resourceElementChanged() { |
+ clearFilterReferences(); |
state().clearResolvedFilter(); |
} |