1 // GENERATED FILE - DO NOT EDIT. 2 // Generated by gen_packed_gl_enums.py using data from packed_egl_enums.json. 3 // 4 // Copyright 2019 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 MessageType : uint8_t 44 { 45 Critical = 0, 46 Error = 1, 47 Warn = 2, 48 Info = 3, 49 50 InvalidEnum = 4, 51 EnumCount = 4, 52 }; 53 54 template <> 55 MessageType FromEGLenum<MessageType>(EGLenum from); 56 EGLenum ToEGLenum(MessageType from); 57 std::ostream &operator<<(std::ostream &os, MessageType value); 58 59 enum class ObjectType : uint8_t 60 { 61 Thread = 0, 62 Display = 1, 63 Context = 2, 64 Surface = 3, 65 Image = 4, 66 Sync = 5, 67 Stream = 6, 68 69 InvalidEnum = 7, 70 EnumCount = 7, 71 }; 72 73 template <> 74 ObjectType FromEGLenum<ObjectType>(EGLenum from); 75 EGLenum ToEGLenum(ObjectType from); 76 std::ostream &operator<<(std::ostream &os, ObjectType value); 77 78 enum class TextureFormat : uint8_t 79 { 80 NoTexture = 0, 81 RGB = 1, 82 RGBA = 2, 83 84 InvalidEnum = 3, 85 EnumCount = 3, 86 }; 87 88 template <> 89 TextureFormat FromEGLenum<TextureFormat>(EGLenum from); 90 EGLenum ToEGLenum(TextureFormat from); 91 std::ostream &operator<<(std::ostream &os, TextureFormat value); 92 93 enum class Timestamp : uint8_t 94 { 95 RequestedPresentTime = 0, 96 RenderingCompleteTime = 1, 97 CompositionLatchTime = 2, 98 FirstCompositionStartTime = 3, 99 LastCompositionStartTime = 4, 100 FirstCompositionGPUFinishedTime = 5, 101 DisplayPresentTime = 6, 102 DequeueReadyTime = 7, 103 ReadsDoneTime = 8, 104 105 InvalidEnum = 9, 106 EnumCount = 9, 107 }; 108 109 template <> 110 Timestamp FromEGLenum<Timestamp>(EGLenum from); 111 EGLenum ToEGLenum(Timestamp from); 112 std::ostream &operator<<(std::ostream &os, Timestamp value); 113 114 } // namespace egl 115 116 #endif // COMMON_PACKEDEGLENUMS_AUTOGEN_H_ 117