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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2798513002: Revert of Make GeometryMapper fully static (Closed)
Patch Set: Created 3 years, 9 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 19552fe3689da9ca4ee0dadbfeaa7fe3f83ba386..9a608ea2d0aa84af160a63d7440a00ca320aed39 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -2870,6 +2870,19 @@
updateGeometries();
}
+GeometryMapper& FrameView::geometryMapper() {
+ DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
+ DCHECK(lifecycle().state() >= DocumentLifecycle::InPrePaint);
+
+ if (m_frame->isLocalRoot()) {
+ if (!m_geometryMapper)
+ m_geometryMapper = GeometryMapper::create();
+ return *m_geometryMapper.get();
+ }
+
+ return frame().localFrameRoot()->view()->geometryMapper();
+}
+
void FrameView::updateAllLifecyclePhases() {
frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(
DocumentLifecycle::PaintClean);
@@ -3137,7 +3150,7 @@
if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime");
- PrePaintTreeWalk().walk(*this);
+ PrePaintTreeWalk(geometryMapper()).walk(*this);
}
forAllNonThrottledFrameViews([](FrameView& frameView) {
@@ -3245,10 +3258,11 @@
SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime");
+ DCHECK(m_geometryMapper.get());
m_paintArtifactCompositor->update(
m_paintController->paintArtifact(),
m_paintController->paintChunksRasterInvalidationTrackingMap(),
- m_isStoringCompositedLayerDebugInfo);
+ m_isStoringCompositedLayerDebugInfo, *m_geometryMapper);
}
std::unique_ptr<JSONObject> FrameView::compositedLayersAsJSON(
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698