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

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

Issue 2565223002: Add more specific metrics for main thread scrolling reasons (Closed)
Patch Set: Add unit test && refactoring 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 e50b22e5205e7f496382be7851be5b05eca1ee41..1b27cf2b10cdc58f2e74fdb796169a48a462c1eb 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
@@ -51,6 +51,7 @@
#include "core/paint/PaintLayerFragment.h"
#include "core/paint/ScrollbarManager.h"
#include "platform/heap/Handle.h"
+#include "platform/scroll/MainThreadScrollingReason.h"
#include "wtf/PtrUtil.h"
#include <memory>
@@ -475,6 +476,11 @@ class CORE_EXPORT PaintLayerScrollableArea final
void invalidateStickyConstraintsFor(PaintLayer*,
bool needsCompositingUpdate = true);
+ bool hasMainThreadScrollingReason(uint32_t reason) const {
+ return m_reasons & reason;
+ }
+ void flipMainThreadScrollingReason(uint32_t reason) { m_reasons ^= reason; }
+
uint64_t id() const;
DECLARE_VIRTUAL_TRACE();
@@ -579,6 +585,9 @@ class CORE_EXPORT PaintLayerScrollableArea final
std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData;
+ // MainThreadScrollingReason due to the property of each layout object
+ uint32_t m_reasons;
+
#if ENABLE(ASSERT)
bool m_hasBeenDisposed;
#endif

Powered by Google App Engine
This is Rietveld 408576698