Bug 1032573 part 4 - Add AnimationTimeline::ToTimelineTime helper method; r=dbaron
[gecko.git] / gfx / gl / GLContextTypes.h
blobbd6532c69d756be45b9ef64d07ed44ec4689e6ad
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GLCONTEXT_TYPES_H_
7 #define GLCONTEXT_TYPES_H_
9 #include "GLTypes.h"
10 #include "mozilla/TypedEnum.h"
12 namespace mozilla {
13 namespace gl {
15 class GLContext;
17 typedef uintptr_t SharedTextureHandle;
19 MOZ_BEGIN_ENUM_CLASS(SharedTextureShareType)
20 SameProcess = 0,
21 CrossProcess
22 MOZ_END_ENUM_CLASS(SharedTextureShareType)
24 MOZ_BEGIN_ENUM_CLASS(SharedTextureBufferType)
25 TextureID,
26 SurfaceTexture,
27 IOSurface
28 MOZ_END_ENUM_CLASS(SharedTextureBufferType)
30 MOZ_BEGIN_ENUM_CLASS(GLContextType)
31 Unknown,
32 WGL,
33 CGL,
34 GLX,
35 EGL
36 MOZ_END_ENUM_CLASS(GLContextType)
38 struct GLFormats
40 // Constructs a zeroed object:
41 GLFormats();
43 GLenum color_texInternalFormat;
44 GLenum color_texFormat;
45 GLenum color_texType;
46 GLenum color_rbFormat;
48 GLenum depthStencil;
49 GLenum depth;
50 GLenum stencil;
52 GLsizei samples;
56 struct PixelBufferFormat
58 // Constructs a zeroed object:
59 PixelBufferFormat();
61 int red, green, blue;
62 int alpha;
63 int depth, stencil;
64 int samples;
66 int ColorBits() const { return red + green + blue; }
70 } /* namespace gl */
71 } /* namespace mozilla */
73 #endif /* GLCONTEXT_TYPES_H_ */