gfx/gl/GLContextTypes.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/gl/GLContextTypes.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,73 @@
     1.4 +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef GLCONTEXT_TYPES_H_
    1.10 +#define GLCONTEXT_TYPES_H_
    1.11 +
    1.12 +#include "GLTypes.h"
    1.13 +#include "mozilla/TypedEnum.h"
    1.14 +
    1.15 +namespace mozilla {
    1.16 +namespace gl {
    1.17 +
    1.18 +class GLContext;
    1.19 +
    1.20 +typedef uintptr_t SharedTextureHandle;
    1.21 +
    1.22 +MOZ_BEGIN_ENUM_CLASS(SharedTextureShareType)
    1.23 +    SameProcess = 0,
    1.24 +    CrossProcess
    1.25 +MOZ_END_ENUM_CLASS(SharedTextureShareType)
    1.26 +
    1.27 +MOZ_BEGIN_ENUM_CLASS(SharedTextureBufferType)
    1.28 +    TextureID,
    1.29 +    SurfaceTexture,
    1.30 +    IOSurface
    1.31 +MOZ_END_ENUM_CLASS(SharedTextureBufferType)
    1.32 +
    1.33 +MOZ_BEGIN_ENUM_CLASS(GLContextType)
    1.34 +    Unknown,
    1.35 +    WGL,
    1.36 +    CGL,
    1.37 +    GLX,
    1.38 +    EGL
    1.39 +MOZ_END_ENUM_CLASS(GLContextType)
    1.40 +
    1.41 +struct GLFormats
    1.42 +{
    1.43 +    // Constructs a zeroed object:
    1.44 +    GLFormats();
    1.45 +
    1.46 +    GLenum color_texInternalFormat;
    1.47 +    GLenum color_texFormat;
    1.48 +    GLenum color_texType;
    1.49 +    GLenum color_rbFormat;
    1.50 +
    1.51 +    GLenum depthStencil;
    1.52 +    GLenum depth;
    1.53 +    GLenum stencil;
    1.54 +
    1.55 +    GLsizei samples;
    1.56 +};
    1.57 +
    1.58 +
    1.59 +struct PixelBufferFormat
    1.60 +{
    1.61 +    // Constructs a zeroed object:
    1.62 +    PixelBufferFormat();
    1.63 +
    1.64 +    int red, green, blue;
    1.65 +    int alpha;
    1.66 +    int depth, stencil;
    1.67 +    int samples;
    1.68 +
    1.69 +    int ColorBits() const { return red + green + blue; }
    1.70 +};
    1.71 +
    1.72 +
    1.73 +} /* namespace gl */
    1.74 +} /* namespace mozilla */
    1.75 +
    1.76 +#endif /* GLCONTEXT_TYPES_H_ */

mercurial