summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/scheduler/main_thread/use_case.h
blob: 7ab1c4d57b20c7eefbda0cf27c7380a94475434f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_MAIN_THREAD_USE_CASE_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_MAIN_THREAD_USE_CASE_H_

namespace blink {
namespace scheduler {

// Keep RendererScheduler::UseCaseToString in sync with this enum.
// This enum is used for histograms and should not be renumbered.
enum class UseCase {
  // No active use case detected.
  kNone = 0,
  // A continuous gesture (e.g., scroll, pinch) which is being driven by the
  // compositor thread.
  kCompositorGesture = 1,
  // An unspecified touch gesture which is being handled by the main thread.
  // Note that since we don't have a full view of the use case, we should be
  // careful to prioritize all work equally.
  kMainThreadCustomInputHandling = 2,
  // A continuous gesture (e.g., scroll, pinch) which is being driven by the
  // compositor thread but also observed by the main thread. An example is
  // synchronized scrolling where a scroll listener on the main thread changes
  // page layout based on the current scroll position.
  kSynchronizedGesture = 3,
  // A gesture has recently started and we are about to run main thread touch
  // listeners to find out the actual gesture type. To minimize touch latency,
  // only input handling work should run in this state.
  kTouchstart = 4,
  // A page is loading.
  kLoading = 5,
  // A continuous gesture (e.g., scroll) which is being handled by the main
  // thread.
  kMainThreadGesture = 6,
  kFirstUseCase = kNone,

  // Must be the last entry.
  kCount = 7,
};

}  // namespace scheduler
}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_MAIN_THREAD_USE_CASE_H_