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

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

Issue 2653433002: Share GeometryMapper cache between pre-paint and compositing. (Closed)
Patch Set: none 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
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 9fe0bdffe9b7cda7e1e911799feb1dea066310bd..baee7467a4703dc7da09a6991ccbe6b4d6f33ff1 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3016,12 +3016,18 @@ void FrameView::prePaint() {
if (!m_paintController)
m_paintController = PaintController::create();
+ if (!m_geometryMapper)
+ m_geometryMapper.reset(new GeometryMapper());
+ // TODO(chrishtr): the cache only needs to be invalidated if one or more of
+ // the property tree nodes changed.
+ m_geometryMapper->clearCache();
+
forAllNonThrottledFrameViews([](FrameView& frameView) {
frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint);
});
if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
- PrePaintTreeWalk().walk(*this);
+ PrePaintTreeWalk(*m_geometryMapper).walk(*this);
forAllNonThrottledFrameViews([](FrameView& frameView) {
frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean);
@@ -3127,10 +3133,11 @@ void FrameView::pushPaintArtifactToCompositor() {
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/paint/PaintInvalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698