1 #pragma once
2 
3 #include <cstdint>
4 
5 namespace mbgl {
6 
7 enum class EventSeverity : uint8_t {
8     Debug,
9     Info,
10     Warning,
11     Error,
12 };
13 
14 enum class Event : uint8_t {
15     General,
16     Setup,
17     Shader,
18     ParseStyle,
19     ParseTile,
20     Render,
21     Style,
22     Database,
23     HttpRequest,
24     Sprite,
25     Image,
26     OpenGL,
27     JNI,
28     Android,
29     Crash,
30     Glyph,
31     Timing
32 };
33 
34 struct EventPermutation {
35     const EventSeverity severity;
36     const Event event;
37 
operator ==mbgl::EventPermutation38     constexpr bool operator==(const EventPermutation &rhs) const {
39         return severity == rhs.severity && event == rhs.event;
40     }
41 };
42 
43 constexpr EventSeverity disabledEventSeverities[] = {
44 #ifndef NDEBUG
45     EventSeverity(-1) // Avoid zero size array
46 #else
47     EventSeverity::Debug
48 #endif
49 };
50 
51 constexpr Event disabledEvents[] = {
52     Event(-1) // Avoid zero size array
53 };
54 
55 constexpr EventPermutation disabledEventPermutations[] = {
56     { EventSeverity::Debug, Event::Shader }
57 };
58 
59 } // namespace mbgl
60