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 ColorSpace : uint8_t 28 { 29 sRGB = 0, 30 Linear = 1, 31 32 InvalidEnum = 2, 33 EnumCount = 2, 34 }; 35 36 template <> 37 ColorSpace FromEGLenum<ColorSpace>(EGLenum from); 38 EGLenum ToEGLenum(ColorSpace from); 39 std::ostream &operator<<(std::ostream &os, ColorSpace value); 40 41 enum class CompositorTiming : uint8_t 42 { 43 CompositeDeadline = 0, 44 CompositInterval = 1, 45 CompositToPresentLatency = 2, 46 47 InvalidEnum = 3, 48 EnumCount = 3, 49 }; 50 51 template <> 52 CompositorTiming FromEGLenum<CompositorTiming>(EGLenum from); 53 EGLenum ToEGLenum(CompositorTiming from); 54 std::ostream &operator<<(std::ostream &os, CompositorTiming value); 55 56 enum class ContextPriority : uint8_t 57 { 58 Low = 0, 59 Medium = 1, 60 High = 2, 61 62 InvalidEnum = 3, 63 EnumCount = 3, 64 }; 65 66 template <> 67 ContextPriority FromEGLenum<ContextPriority>(EGLenum from); 68 EGLenum ToEGLenum(ContextPriority from); 69 std::ostream &operator<<(std::ostream &os, ContextPriority value); 70 71 enum class MessageType : uint8_t 72 { 73 Critical = 0, 74 Error = 1, 75 Warn = 2, 76 Info = 3, 77 78 InvalidEnum = 4, 79 EnumCount = 4, 80 }; 81 82 template <> 83 MessageType FromEGLenum<MessageType>(EGLenum from); 84 EGLenum ToEGLenum(MessageType from); 85 std::ostream &operator<<(std::ostream &os, MessageType value); 86 87 enum class ObjectType : uint8_t 88 { 89 Thread = 0, 90 Display = 1, 91 Context = 2, 92 Surface = 3, 93 Image = 4, 94 Sync = 5, 95 Stream = 6, 96 97 InvalidEnum = 7, 98 EnumCount = 7, 99 }; 100 101 template <> 102 ObjectType FromEGLenum<ObjectType>(EGLenum from); 103 EGLenum ToEGLenum(ObjectType from); 104 std::ostream &operator<<(std::ostream &os, ObjectType value); 105 106 enum class TextureFormat : uint8_t 107 { 108 NoTexture = 0, 109 RGB = 1, 110 RGBA = 2, 111 112 InvalidEnum = 3, 113 EnumCount = 3, 114 }; 115 116 template <> 117 TextureFormat FromEGLenum<TextureFormat>(EGLenum from); 118 EGLenum ToEGLenum(TextureFormat from); 119 std::ostream &operator<<(std::ostream &os, TextureFormat value); 120 121 enum class Timestamp : uint8_t 122 { 123 RequestedPresentTime = 0, 124 RenderingCompleteTime = 1, 125 CompositionLatchTime = 2, 126 FirstCompositionStartTime = 3, 127 LastCompositionStartTime = 4, 128 FirstCompositionGPUFinishedTime = 5, 129 DisplayPresentTime = 6, 130 DequeueReadyTime = 7, 131 ReadsDoneTime = 8, 132 133 InvalidEnum = 9, 134 EnumCount = 9, 135 }; 136 137 template <> 138 Timestamp FromEGLenum<Timestamp>(EGLenum from); 139 EGLenum ToEGLenum(Timestamp from); 140 std::ostream &operator<<(std::ostream &os, Timestamp value); 141 142 } // namespace egl 143 144 #endif // COMMON_PACKEDEGLENUMS_AUTOGEN_H_ 145