Bug 1797755 - Part 5: Use a single initial mark stack size regardless of whether...
[gecko.git] / gfx / gl / GLContextTypes.h
blobda8a19463a26b461b666ae76bdce84ebda6824ea
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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/TypedEnumBits.h"
12 namespace mozilla {
13 namespace gl {
15 class GLContext;
17 enum class GLContextType { Unknown, WGL, CGL, GLX, EGL, EAGL };
19 enum class OriginPos : uint8_t { TopLeft, BottomLeft };
21 enum class CreateContextFlags : uint16_t {
22 NONE = 0,
23 REQUIRE_COMPAT_PROFILE = 1 << 0,
24 // Force the use of hardware backed GL, don't allow software implementations.
25 FORCE_ENABLE_HARDWARE = 1 << 1,
26 /* Don't force discrete GPU to be used (if applicable) */
27 ALLOW_OFFLINE_RENDERER = 1 << 2,
28 // Ask for ES3 if possible
29 PREFER_ES3 = 1 << 3,
31 NO_VALIDATION = 1 << 4,
32 PREFER_ROBUSTNESS = 1 << 5,
33 HIGH_POWER = 1 << 6,
34 PROVOKING_VERTEX_DONT_CARE = 1 << 7,
35 PREFER_EXACT_VERSION = 1 << 8,
36 PREFER_MULTITHREADED = 1 << 9,
38 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(CreateContextFlags)
40 struct GLContextCreateDesc {
41 CreateContextFlags flags = CreateContextFlags::NONE;
44 struct GLContextDesc final : public GLContextCreateDesc {
45 bool isOffscreen = false;
48 } /* namespace gl */
49 } /* namespace mozilla */
51 #endif /* GLCONTEXT_TYPES_H_ */