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

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

Issue 1391753005: (WIP) Invalidation during painting (for synchronized painting) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/SVGPaintContext.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
index ad3c5adb69cd67877eb3062004714df7c570e760..a0e83f36142cc2e1165a7cf2b5402a202d51af50 100644
--- a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
@@ -27,6 +27,7 @@
#include "core/frame/FrameHost.h"
#include "core/layout/svg/LayoutSVGResourceFilter.h"
#include "core/layout/svg/LayoutSVGResourceMasker.h"
+#include "core/layout/svg/LayoutSVGRoot.h"
#include "core/layout/svg/SVGLayoutSupport.h"
#include "core/layout/svg/SVGResources.h"
#include "core/layout/svg/SVGResourcesCache.h"
@@ -228,4 +229,20 @@ bool SVGPaintContext::paintForLayoutObject(const PaintInfo& paintInfo, const Com
return true;
}
+void SVGPaintContext::initializePaintInvalidationState()
+{
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled());
+
+ if (!m_originalPaintInfo->paintInvalidationState)
+ return;
+
+ if (m_object->isSVGRoot())
+ m_paintInvalidationState.emplace(*m_originalPaintInfo->paintInvalidationState, toLayoutBoxModelObject(*m_object), m_paintInfo.paintInvalidationState->paintInvalidationContainer());
+ else if (m_object->isSVGModelObject())
+ m_paintInvalidationState.emplace(*m_originalPaintInfo->paintInvalidationState, toLayoutSVGModelObject(*m_object));
+
+ if (m_paintInvalidationState)
+ m_paintInfo.paintInvalidationState = &*m_paintInvalidationState;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698