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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h

Issue 2565223002: Add more specific metrics for main thread scrolling reasons (Closed)
Patch Set: Refactoring && merging master Created 4 years 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/PaintLayerScrollableArea.h
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
index e2bd6492b516b30a3c4ee1d4128dcbb291e88ce7..f050067a87b37b17b57351561c08cdfc2043ca89 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
@@ -476,6 +476,14 @@ class CORE_EXPORT PaintLayerScrollableArea final
void invalidateStickyConstraintsFor(PaintLayer*,
bool needsCompositingUpdate = true);
+ void removeStyleRelatedMainThreadScrollingReasons();
+ void addStyleRelatedMainThreadScrollingReasons(const uint32_t);
+ bool hasMainThreadScrollingReason(uint32_t reason) const {
+ return m_reasons & reason;
+ }
+ void setMainThreadScrollingReason(uint32_t reason) { m_reasons |= reason; }
bokan 2016/12/20 19:35:53 These aren't called from outside the class and onl
yigu 2016/12/20 19:59:31 Done.
+ void resetMainThreadScrollingReason(uint32_t reason) { m_reasons &= ~reason; }
+
uint64_t id() const;
DECLARE_VIRTUAL_TRACE();
@@ -531,6 +539,7 @@ class CORE_EXPORT PaintLayerScrollableArea final
return *m_rareData.get();
}
+ bool layerNeedsCompositedScrolling(const LCDTextMode, const PaintLayer*);
PaintLayer& m_layer;
PaintLayer* m_nextTopmostScrollChild;
@@ -582,6 +591,9 @@ class CORE_EXPORT PaintLayerScrollableArea final
std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData;
+ // MainThreadScrollingReason due to the properties of the LayoutObject
+ uint32_t m_reasons;
+
#if ENABLE(ASSERT)
bool m_hasBeenDisposed;
#endif

Powered by Google App Engine
This is Rietveld 408576698