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

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

Issue 2634493006: Implement Internals::mainThreadScrollingReasons for SPV2 (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dff9ec6cdf05317ec33675b3d62167066f24030e..9d353189efb8d043a67ef5c640bd8b363b04f933 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4896,6 +4896,19 @@ MainThreadScrollingReasons FrameView::mainThreadScrollingReasons() const {
}
String FrameView::mainThreadScrollingReasonsAsText() const {
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ DCHECK(lifecycle().state() >= DocumentLifecycle::PrePaintClean);
+
+ // Slimming paint v2 stores main thread scrolling reasons on property
+ // trees instead of in |m_mainThreadScrollingReasons|.
+ MainThreadScrollingReasons reasons = 0;
+ if (const auto* scrollNode = scroll())
+ reasons |= scrollNode->mainThreadScrollingReasons();
+ return String(
+ MainThreadScrollingReason::mainThreadScrollingReasonsAsText(reasons)
+ .c_str());
+ }
+
DCHECK(lifecycle().state() >= DocumentLifecycle::CompositingClean);
if (layerForScrolling() && layerForScrolling()->platformLayer()) {
String result(
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698