Bug 1890689 accumulate input in LargerReceiverBlockSizeThanDesiredBuffering GTest...
[gecko.git] / gfx / gl / GLTypes.h
blob6caa1cc62395dba312b4aec8225b7b3670b64fd5
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef GLTYPES_H_
6 #define GLTYPES_H_
8 #include <stddef.h>
9 #include <stdint.h>
11 #ifndef GLAPIENTRY
12 # ifdef WIN32
13 # include <windef.h>
14 # define GLAPIENTRY APIENTRY
15 # define GLAPI
16 # else
17 # define GLAPIENTRY
18 # define GLAPI
19 # endif
20 #endif
22 typedef uint8_t realGLboolean;
24 #if !defined(__gltypes_h_) && !defined(__gl_h_)
25 # define __gltypes_h_
26 # define __gl_h_
28 typedef uint32_t GLenum;
29 typedef uint32_t GLbitfield;
30 typedef uint32_t GLuint;
31 typedef int32_t GLint;
32 typedef int32_t GLsizei;
33 typedef int8_t GLbyte;
34 typedef int16_t GLshort;
35 typedef uint8_t GLubyte;
36 typedef uint16_t GLushort;
37 typedef float GLfloat;
38 typedef float GLclampf;
39 # ifndef GLdouble_defined
40 typedef double GLdouble;
41 # endif
42 typedef double GLclampd;
43 typedef void GLvoid;
45 typedef char GLchar;
46 # ifndef __gl2_h_
47 # ifdef _WIN64
48 typedef signed long long int GLintptr;
49 typedef signed long long int GLsizeiptr;
50 # else
51 typedef signed long int GLintptr;
52 typedef signed long int GLsizeiptr;
53 # endif
54 # endif
56 #endif /* #if !defined(__gltypes_h_) && !defined(__gl_h_) */
58 #ifdef XP_IOS
59 # ifndef GLdouble_defined
60 typedef double GLdouble;
61 # endif
62 typedef double GLclampd;
63 #endif
65 #include <stdint.h>
67 // ARB_sync
68 typedef struct __GLsync* GLsync;
69 typedef int64_t GLint64;
70 typedef uint64_t GLuint64;
72 // OES_EGL_image (GLES)
73 typedef void* GLeglImage;
75 // KHR_debug
76 typedef void(GLAPIENTRY* GLDEBUGPROC)(GLenum source, GLenum type, GLuint id,
77 GLenum severity, GLsizei length,
78 const GLchar* message,
79 const GLvoid* userParam);
81 // EGL types
82 typedef void* EGLImage;
83 typedef int EGLint;
84 typedef unsigned int EGLBoolean;
85 typedef unsigned int EGLenum;
86 typedef intptr_t EGLAttrib;
87 typedef void* EGLConfig;
88 typedef void* EGLContext;
89 typedef void* EGLDisplay;
90 typedef void* EGLDeviceEXT;
91 typedef void* EGLSurface;
92 typedef void* EGLClientBuffer;
93 typedef void* EGLCastToRelevantPtr;
94 typedef void* EGLImage;
95 typedef void* EGLSync;
96 typedef void* EGLStreamKHR;
97 typedef uint64_t EGLTime;
99 #define EGL_NO_CONTEXT ((EGLContext)0)
100 #define EGL_NO_DISPLAY ((EGLDisplay)0)
101 #define EGL_NO_SURFACE ((EGLSurface)0)
102 #define EGL_NO_CONFIG ((EGLConfig) nullptr)
103 #define EGL_NO_SYNC ((EGLSync)0)
104 #define EGL_NO_IMAGE ((EGLImage)0)
106 #ifdef XP_WIN
107 # ifndef WIN32_LEAN_AND_MEAN
108 # define WIN32_LEAN_AND_MEAN 1
109 # endif
111 # include <windef.h>
113 typedef HDC EGLNativeDisplayType;
114 typedef HBITMAP EGLNativePixmapType;
115 typedef HWND EGLNativeWindowType;
116 #else
117 typedef void* EGLNativeDisplayType;
118 typedef void* EGLNativePixmapType;
119 typedef void* EGLNativeWindowType;
120 #endif
122 #endif // GLTYPES_H_