1 // GENERATED FILE - DO NOT EDIT. 2 // Generated by gen_packed_gl_enums.py using data from packed_egl_enums.json. 3 // 4 // Copyright 2020 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 #include <angle_gl.h> 18 19 #include <cstdint> 20 #include <ostream> 21 22 namespace egl 23 { 24 25 template <typename Enum> 26 Enum FromEGLenum(EGLenum from); 27 28 enum class CompositorTiming : uint8_t 29 { 30 CompositeDeadline = 0, 31 CompositInterval = 1, 32 CompositToPresentLatency = 2, 33 34 InvalidEnum = 3, 35 EnumCount = 3, 36 }; 37 38 template <> 39 CompositorTiming FromEGLenum<CompositorTiming>(EGLenum from); 40 EGLenum ToEGLenum(CompositorTiming from); 41 std::ostream &operator<<(std::ostream &os, CompositorTiming value); 42 43 enum class ContextPriority : uint8_t 44 { 45 Low = 0, 46 Medium = 1, 47 High = 2, 48 49 InvalidEnum = 3, 50 EnumCount = 3, 51 }; 52 53 template <> 54 ContextPriority FromEGLenum<ContextPriority>(EGLenum from); 55 EGLenum ToEGLenum(ContextPriority from); 56 std::ostream &operator<<(std::ostream &os, ContextPriority value); 57 58 enum class MessageType : uint8_t 59 { 60 Critical = 0, 61 Error = 1, 62 Warn = 2, 63 Info = 3, 64 65 InvalidEnum = 4, 66 EnumCount = 4, 67 }; 68 69 template <> 70 MessageType FromEGLenum<MessageType>(EGLenum from); 71 EGLenum ToEGLenum(MessageType from); 72 std::ostream &operator<<(std::ostream &os, MessageType value); 73 74 enum class ObjectType : uint8_t 75 { 76 Thread = 0, 77 Display = 1, 78 Context = 2, 79 Surface = 3, 80 Image = 4, 81 Sync = 5, 82 Stream = 6, 83 84 InvalidEnum = 7, 85 EnumCount = 7, 86 }; 87 88 template <> 89 ObjectType FromEGLenum<ObjectType>(EGLenum from); 90 EGLenum ToEGLenum(ObjectType from); 91 std::ostream &operator<<(std::ostream &os, ObjectType value); 92 93 enum class TextureFormat : uint8_t 94 { 95 NoTexture = 0, 96 RGB = 1, 97 RGBA = 2, 98 99 InvalidEnum = 3, 100 EnumCount = 3, 101 }; 102 103 template <> 104 TextureFormat FromEGLenum<TextureFormat>(EGLenum from); 105 EGLenum ToEGLenum(TextureFormat from); 106 std::ostream &operator<<(std::ostream &os, TextureFormat value); 107 108 enum class Timestamp : uint8_t 109 { 110 RequestedPresentTime = 0, 111 RenderingCompleteTime = 1, 112 CompositionLatchTime = 2, 113 FirstCompositionStartTime = 3, 114 LastCompositionStartTime = 4, 115 FirstCompositionGPUFinishedTime = 5, 116 DisplayPresentTime = 6, 117 DequeueReadyTime = 7, 118 ReadsDoneTime = 8, 119 120 InvalidEnum = 9, 121 EnumCount = 9, 122 }; 123 124 template <> 125 Timestamp FromEGLenum<Timestamp>(EGLenum from); 126 EGLenum ToEGLenum(Timestamp from); 127 std::ostream &operator<<(std::ostream &os, Timestamp value); 128 129 } // namespace egl 130 131 #endif // COMMON_PACKEDEGLENUMS_AUTOGEN_H_ 132