• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by gen_packed_gl_enums.py using data from packed_egl_enums.json.
3 //
4 // Copyright 2017 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // PackedEGLEnums_autogen.h:
9 //   Declares ANGLE-specific enums classes for EGLenums and functions operating
10 //   on them.
11 
12 #ifndef COMMON_PACKEDEGLENUMS_AUTOGEN_H_
13 #define COMMON_PACKEDEGLENUMS_AUTOGEN_H_
14 
15 #include <EGL/egl.h>
16 #include <EGL/eglext.h>
17 
18 #include <cstdint>
19 #include <ostream>
20 
21 namespace egl
22 {
23 
24 template <typename Enum>
25 Enum FromEGLenum(EGLenum from);
26 
27 enum class CompositorTiming : uint8_t
28 {
29     CompositeDeadline        = 0,
30     CompositInterval         = 1,
31     CompositToPresentLatency = 2,
32 
33     InvalidEnum = 3,
34     EnumCount   = 3,
35 };
36 
37 template <>
38 CompositorTiming FromEGLenum<CompositorTiming>(EGLenum from);
39 EGLenum ToEGLenum(CompositorTiming from);
40 std::ostream &operator<<(std::ostream &os, CompositorTiming value);
41 
42 enum class ContextPriority : uint8_t
43 {
44     Low    = 0,
45     Medium = 1,
46     High   = 2,
47 
48     InvalidEnum = 3,
49     EnumCount   = 3,
50 };
51 
52 template <>
53 ContextPriority FromEGLenum<ContextPriority>(EGLenum from);
54 EGLenum ToEGLenum(ContextPriority from);
55 std::ostream &operator<<(std::ostream &os, ContextPriority value);
56 
57 enum class MessageType : uint8_t
58 {
59     Critical = 0,
60     Error    = 1,
61     Warn     = 2,
62     Info     = 3,
63 
64     InvalidEnum = 4,
65     EnumCount   = 4,
66 };
67 
68 template <>
69 MessageType FromEGLenum<MessageType>(EGLenum from);
70 EGLenum ToEGLenum(MessageType from);
71 std::ostream &operator<<(std::ostream &os, MessageType value);
72 
73 enum class ObjectType : uint8_t
74 {
75     Thread  = 0,
76     Display = 1,
77     Context = 2,
78     Surface = 3,
79     Image   = 4,
80     Sync    = 5,
81     Stream  = 6,
82 
83     InvalidEnum = 7,
84     EnumCount   = 7,
85 };
86 
87 template <>
88 ObjectType FromEGLenum<ObjectType>(EGLenum from);
89 EGLenum ToEGLenum(ObjectType from);
90 std::ostream &operator<<(std::ostream &os, ObjectType value);
91 
92 enum class TextureFormat : uint8_t
93 {
94     NoTexture = 0,
95     RGB       = 1,
96     RGBA      = 2,
97 
98     InvalidEnum = 3,
99     EnumCount   = 3,
100 };
101 
102 template <>
103 TextureFormat FromEGLenum<TextureFormat>(EGLenum from);
104 EGLenum ToEGLenum(TextureFormat from);
105 std::ostream &operator<<(std::ostream &os, TextureFormat value);
106 
107 enum class Timestamp : uint8_t
108 {
109     RequestedPresentTime            = 0,
110     RenderingCompleteTime           = 1,
111     CompositionLatchTime            = 2,
112     FirstCompositionStartTime       = 3,
113     LastCompositionStartTime        = 4,
114     FirstCompositionGPUFinishedTime = 5,
115     DisplayPresentTime              = 6,
116     DequeueReadyTime                = 7,
117     ReadsDoneTime                   = 8,
118 
119     InvalidEnum = 9,
120     EnumCount   = 9,
121 };
122 
123 template <>
124 Timestamp FromEGLenum<Timestamp>(EGLenum from);
125 EGLenum ToEGLenum(Timestamp from);
126 std::ostream &operator<<(std::ostream &os, Timestamp value);
127 
128 }  // namespace egl
129 
130 #endif  // COMMON_PACKEDEGLENUMS_AUTOGEN_H_
131