Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/FrameView.h |
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h |
| index f3496595a49b91242f2929265d357eb26dab8317..d825a9a9ac4cc1486f418850df1c7e3749c64b61 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.h |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.h |
| @@ -767,6 +767,21 @@ class CORE_EXPORT FrameView final |
| // Only for SPv2. |
| std::unique_ptr<JSONObject> compositedLayersAsJSON(LayerTreeFlags); |
| + inline int reasonIndex(uint32_t reason) const { |
|
bokan
2016/12/13 14:38:57
inline unneeded, this is inline by virtue of being
bokan
2016/12/13 14:38:57
This should move as a helper into MainThreadScroll
yigu
2016/12/13 20:54:10
Done.
yigu
2016/12/13 20:54:10
Done.
|
| + if (!reason || reason & (reason - 1)) |
| + return 0; |
| + int power = 0; |
| + while (reason > 0) { |
| + reason = reason >> 1; |
| + ++power; |
| + } |
| + return power; |
| + } |
| + |
| + void adjustMainThreadReasonsDueToLayoutObject(uint32_t reason, bool increase); |
|
bokan
2016/12/13 14:38:56
IMO, this should be called adjustMainThreadReasons
yigu
2016/12/13 20:54:10
Done.
|
| + |
| + MainThreadScrollingReasons checkMainThreadScrollingReasonDueToLayoutObject(); |
|
bokan
2016/12/13 14:38:56
check->get, Reason->Reasons
yigu
2016/12/13 20:54:10
Done.
|
| + |
| protected: |
| // Scroll the content via the compositor. |
| bool scrollContentsFastPath(const IntSize& scrollDelta); |
| @@ -1132,6 +1147,12 @@ class CORE_EXPORT FrameView final |
| // For Slimming Paint v2 only. |
| std::unique_ptr<PaintController> m_paintController; |
| std::unique_ptr<PaintArtifactCompositor> m_paintArtifactCompositor; |
| + |
| + // For recording main thread scrolling reasons |
| + // due to layout object properties. e.g. opacity, transform. |
| + // The size of the vector depends on the number of |
| + // main thread scrolling reasons. |
| + Vector<int> m_mainThreadScrollingReasonLayoutCounter; |
|
bokan
2016/12/13 14:38:57
My read is that this vector is tracking scrolling
yigu
2016/12/13 20:54:10
Done.
|
| }; |
| inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) { |