gfx/gl/GLContextTypes.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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
    39 {
    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;
    53 };
    56 struct PixelBufferFormat
    57 {
    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; }
    67 };
    70 } /* namespace gl */
    71 } /* namespace mozilla */
    73 #endif /* GLCONTEXT_TYPES_H_ */

mercurial