gfx/gl/GLTypes.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #if !defined(GLTYPES_H_)
michael@0 6 #define GLTYPES_H_
michael@0 7
michael@0 8 #include <stddef.h>
michael@0 9 #include <stdint.h>
michael@0 10
michael@0 11 #ifndef GLAPIENTRY
michael@0 12 # ifdef WIN32
michael@0 13 # include <windef.h>
michael@0 14 # define GLAPIENTRY APIENTRY
michael@0 15 # define GLAPI
michael@0 16 # else
michael@0 17 # define GLAPIENTRY
michael@0 18 # define GLAPI
michael@0 19 # endif
michael@0 20 #endif
michael@0 21
michael@0 22 typedef int8_t realGLboolean;
michael@0 23
michael@0 24 #if !defined(__gltypes_h_) && !defined(__gl_h_)
michael@0 25 #define __gltypes_h_
michael@0 26 #define __gl_h_
michael@0 27
michael@0 28 typedef uint32_t GLenum;
michael@0 29 typedef uint32_t GLbitfield;
michael@0 30 typedef uint32_t GLuint;
michael@0 31 typedef int32_t GLint;
michael@0 32 typedef int32_t GLsizei;
michael@0 33 typedef int8_t GLbyte;
michael@0 34 typedef int16_t GLshort;
michael@0 35 typedef uint8_t GLubyte;
michael@0 36 typedef uint16_t GLushort;
michael@0 37 typedef float GLfloat;
michael@0 38 typedef float GLclampf;
michael@0 39 #ifndef GLdouble_defined
michael@0 40 typedef double GLdouble;
michael@0 41 #endif
michael@0 42 typedef double GLclampd;
michael@0 43 typedef void GLvoid;
michael@0 44
michael@0 45 typedef char GLchar;
michael@0 46 #ifndef __gl2_h_
michael@0 47 typedef intptr_t GLsizeiptr;
michael@0 48 typedef intptr_t GLintptr;
michael@0 49 #endif
michael@0 50
michael@0 51 #endif /* #if !defined(__gltypes_h_) && !defined(__gl_h_) */
michael@0 52
michael@0 53 #include <stdint.h>
michael@0 54
michael@0 55 // ARB_sync
michael@0 56 typedef struct __GLsync* GLsync;
michael@0 57 typedef int64_t GLint64;
michael@0 58 typedef uint64_t GLuint64;
michael@0 59
michael@0 60 // OES_EGL_image (GLES)
michael@0 61 typedef void* GLeglImage;
michael@0 62
michael@0 63 // KHR_debug
michael@0 64 typedef void (GLAPIENTRY *GLDEBUGPROC)(GLenum source,
michael@0 65 GLenum type,
michael@0 66 GLuint id,
michael@0 67 GLenum severity,
michael@0 68 GLsizei length,
michael@0 69 const GLchar* message,
michael@0 70 const GLvoid* userParam);
michael@0 71
michael@0 72 // EGL types
michael@0 73 typedef void* EGLImage;
michael@0 74 typedef int EGLint;
michael@0 75 typedef unsigned int EGLBoolean;
michael@0 76 typedef unsigned int EGLenum;
michael@0 77 typedef void *EGLConfig;
michael@0 78 typedef void *EGLContext;
michael@0 79 typedef void *EGLDisplay;
michael@0 80 typedef void *EGLSurface;
michael@0 81 typedef void *EGLClientBuffer;
michael@0 82 typedef void *EGLCastToRelevantPtr;
michael@0 83 typedef void *EGLImage;
michael@0 84 typedef void *EGLSync;
michael@0 85 typedef uint64_t EGLTime;
michael@0 86
michael@0 87 #define EGL_NO_CONTEXT ((EGLContext)0)
michael@0 88 #define EGL_NO_DISPLAY ((EGLDisplay)0)
michael@0 89 #define EGL_NO_SURFACE ((EGLSurface)0)
michael@0 90 #define EGL_NO_CONFIG ((EGLConfig)nullptr)
michael@0 91 #define EGL_NO_SYNC ((EGLSync)0)
michael@0 92 #define EGL_NO_IMAGE ((EGLImage)0)
michael@0 93
michael@0 94 #endif

mercurial