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

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

Issue 2676923002: End-to-end prototype of compositor scrolling with slimming paint v2 (Closed)
Patch Set: Add SPV2 test of didScroll callback Created 3 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 9aa2afd891f4c5db3153c129e59e86973d43ca32..19375038e80988b0a28bff8360441f2222f037ee 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3158,11 +3158,33 @@ void FrameView::pushPaintArtifactToCompositor() {
SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime");
+ // TODO(pdr): This map should be cached.
+ PaintArtifactCompositor::ScrollClientMap scrollClientMap;
+ if (m_scrollableAreas) {
+ for (auto scrollableArea : *m_scrollableAreas) {
+ const auto* box = scrollableArea->layoutBox();
+ if (!box)
+ continue;
+ const auto* properties = box->paintProperties();
+ if (!properties)
+ continue;
+ const auto* scrollTranslation = properties->scrollTranslation();
+ if (!scrollTranslation)
+ continue;
+ const auto* scrollNode = scrollTranslation->scrollNode();
+ scrollClientMap.set(scrollNode, scrollableArea.get());
+ }
+ }
+ if (const auto* scrollTranslationNode = scrollTranslation()) {
+ if (auto* scrollableArea = getScrollableArea())
+ scrollClientMap.set(scrollTranslationNode->scrollNode(), scrollableArea);
+ }
+
DCHECK(m_geometryMapper.get());
m_paintArtifactCompositor->update(
m_paintController->paintArtifact(),
m_paintController->paintChunksRasterInvalidationTrackingMap(),
- m_isStoringCompositedLayerDebugInfo, *m_geometryMapper);
+ m_isStoringCompositedLayerDebugInfo, *m_geometryMapper, scrollClientMap);
}
std::unique_ptr<JSONObject> FrameView::compositedLayersAsJSON(

Powered by Google App Engine
This is Rietveld 408576698