Tue, 06 Jan 2015 21:39:09 +0100
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 | /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef GLCONTEXT_TYPES_H_ |
michael@0 | 7 | #define GLCONTEXT_TYPES_H_ |
michael@0 | 8 | |
michael@0 | 9 | #include "GLTypes.h" |
michael@0 | 10 | #include "mozilla/TypedEnum.h" |
michael@0 | 11 | |
michael@0 | 12 | namespace mozilla { |
michael@0 | 13 | namespace gl { |
michael@0 | 14 | |
michael@0 | 15 | class GLContext; |
michael@0 | 16 | |
michael@0 | 17 | typedef uintptr_t SharedTextureHandle; |
michael@0 | 18 | |
michael@0 | 19 | MOZ_BEGIN_ENUM_CLASS(SharedTextureShareType) |
michael@0 | 20 | SameProcess = 0, |
michael@0 | 21 | CrossProcess |
michael@0 | 22 | MOZ_END_ENUM_CLASS(SharedTextureShareType) |
michael@0 | 23 | |
michael@0 | 24 | MOZ_BEGIN_ENUM_CLASS(SharedTextureBufferType) |
michael@0 | 25 | TextureID, |
michael@0 | 26 | SurfaceTexture, |
michael@0 | 27 | IOSurface |
michael@0 | 28 | MOZ_END_ENUM_CLASS(SharedTextureBufferType) |
michael@0 | 29 | |
michael@0 | 30 | MOZ_BEGIN_ENUM_CLASS(GLContextType) |
michael@0 | 31 | Unknown, |
michael@0 | 32 | WGL, |
michael@0 | 33 | CGL, |
michael@0 | 34 | GLX, |
michael@0 | 35 | EGL |
michael@0 | 36 | MOZ_END_ENUM_CLASS(GLContextType) |
michael@0 | 37 | |
michael@0 | 38 | struct GLFormats |
michael@0 | 39 | { |
michael@0 | 40 | // Constructs a zeroed object: |
michael@0 | 41 | GLFormats(); |
michael@0 | 42 | |
michael@0 | 43 | GLenum color_texInternalFormat; |
michael@0 | 44 | GLenum color_texFormat; |
michael@0 | 45 | GLenum color_texType; |
michael@0 | 46 | GLenum color_rbFormat; |
michael@0 | 47 | |
michael@0 | 48 | GLenum depthStencil; |
michael@0 | 49 | GLenum depth; |
michael@0 | 50 | GLenum stencil; |
michael@0 | 51 | |
michael@0 | 52 | GLsizei samples; |
michael@0 | 53 | }; |
michael@0 | 54 | |
michael@0 | 55 | |
michael@0 | 56 | struct PixelBufferFormat |
michael@0 | 57 | { |
michael@0 | 58 | // Constructs a zeroed object: |
michael@0 | 59 | PixelBufferFormat(); |
michael@0 | 60 | |
michael@0 | 61 | int red, green, blue; |
michael@0 | 62 | int alpha; |
michael@0 | 63 | int depth, stencil; |
michael@0 | 64 | int samples; |
michael@0 | 65 | |
michael@0 | 66 | int ColorBits() const { return red + green + blue; } |
michael@0 | 67 | }; |
michael@0 | 68 | |
michael@0 | 69 | |
michael@0 | 70 | } /* namespace gl */ |
michael@0 | 71 | } /* namespace mozilla */ |
michael@0 | 72 | |
michael@0 | 73 | #endif /* GLCONTEXT_TYPES_H_ */ |