Index: cc/input/main_thread_scrolling_reason.h |
diff --git a/cc/input/main_thread_scrolling_reason.h b/cc/input/main_thread_scrolling_reason.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3bc4a9aeccd7e1f6b34925bce4a27f03c4227c4d |
--- /dev/null |
+++ b/cc/input/main_thread_scrolling_reason.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CC_INPUT_MAIN_THREAD_SCROLLING_REASON_H_ |
+#define CC_INPUT_MAIN_THREAD_SCROLLING_REASON_H_ |
+ |
+namespace cc { |
+ |
+// Ensure this stays in sync with MainThreadScrollingReason in histograms.xml, |
+// and that this extends ScrollingCoordinator::MainThreadScrollingReason. |
+// ScrollingCoordinator::MainThreadScrollingReason contains the flags |
+// which are associated with a layer. The flags only contained in |
+// MainThreadScrollingReason are computed for each scroll begin. |
+struct MainThreadScrollingReason { |
+ // Non-transient scrolling reasons. |
+ enum : uint32_t { kNotScrollingOnMain = 0 }; |
+ enum : uint32_t { kHasBackgroundAttachmentFixedObjects = 1 << 0 }; |
+ // TODO(tdresser): Unused. Remove? |
+ enum : uint32_t { kHasNonLayerViewportConstrainedObjects = 1 << 1 }; |
+ // TODO(tdresser): Unused. Remove? |
+ enum : uint32_t { kThreadedScrollingDisabled = 1 << 2 }; |
+ enum : uint32_t { kScrollbarScrolling = 1 << 3 }; |
+ // TODO(tdresser): Unused. Remove? |
+ enum : uint32_t { kPageOverlay = 1 << 4 }; |
+ enum : uint32_t { kMaxNonTransientScrollingReason = kPageOverlay }; |
tdresser
2016/01/20 15:17:27
These will be used after your other change.
See h
danakj
2016/01/20 21:00:01
Done.
|
+ |
+ // Transcient scrolling reasons. |
tdresser
2016/01/20 15:17:27
Can you fix my spelling here too?
"Transient"
Tha
danakj
2016/01/20 21:00:01
Done.
|
+ enum : uint32_t { kNonFastScrollableRegion = 1 << 5 }; |
+ enum : uint32_t { kEventHandlers = 1 << 6 }; |
+ enum : uint32_t { kFailedHitTest = 1 << 7 }; |
+ enum : uint32_t { kNoScrollingLayer = 1 << 8 }; |
+ enum : uint32_t { kNotScrollable = 1 << 9 }; |
+ enum : uint32_t { kContinuingMainThreadScroll = 1 << 10 }; |
+ enum : uint32_t { kNonInvertibleTransform = 1 << 11 }; |
+ |
+ // The number of flags in this struct (excluding itself). |
+ enum : uint32_t { kMainThreadScrollingReasonCount = 13 }; |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_INPUT_MAIN_THREAD_SCROLLING_REASON_H_ |