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

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

Issue 2401343002: Tracking filter mutation via SVGElementProxy (Closed)
Patch Set: Rebase Created 4 years, 2 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: third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp b/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
index b2334a401e695d71a91f10ede4e37182aba8bdd4..2fc627e1f91f3bc1bddf0cf12c65386183a057ef 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
@@ -29,8 +29,8 @@
#include "core/paint/PaintLayerFilterInfo.h"
+#include "core/dom/StyleChangeReason.h"
#include "core/paint/PaintLayer.h"
-#include "core/style/FilterOperations.h"
#include "platform/graphics/filters/FilterEffect.h"
namespace blink {
@@ -42,19 +42,30 @@ PaintLayerFilterInfo::~PaintLayerFilterInfo() {
DCHECK(!m_layer);
}
+void PaintLayerFilterInfo::resourceContentChanged(SVGElementProxy*) {
+ DCHECK(m_layer);
+ m_layer->layoutObject()->setShouldDoFullPaintInvalidation();
+ invalidateFilterChain();
+}
+
+void PaintLayerFilterInfo::resourceReferenceChanged(SVGElementProxy*) {
+ DCHECK(m_layer);
+ Node* node = m_layer->enclosingNode();
+ node->setNeedsStyleRecalc(LocalStyleChange,
+ StyleChangeReasonForTracing::create(
+ StyleChangeReason::SVGResourceChange));
+}
+
void PaintLayerFilterInfo::setLastEffect(FilterEffect* lastEffect) {
m_lastEffect = lastEffect;
}
-void PaintLayerFilterInfo::updateReferenceFilterClients(
- const FilterOperations& operations) {
- clearFilterReferences();
- addFilterReferences(operations, m_layer->layoutObject()->document());
+FilterEffect* PaintLayerFilterInfo::lastEffect() const {
+ return m_lastEffect;
}
-void PaintLayerFilterInfo::filterNeedsInvalidation() {
- if (m_layer)
- m_layer->filterNeedsPaintInvalidation();
+void PaintLayerFilterInfo::invalidateFilterChain() {
+ m_lastEffect = nullptr;
}
DEFINE_TRACE(PaintLayerFilterInfo) {

Powered by Google App Engine
This is Rietveld 408576698