Flutter Engine
The Flutter Engine
ContextType.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef ContextType_DEFINED
9#define ContextType_DEFINED
10
11enum class GrBackendApi : unsigned;
12
13namespace skgpu {
14
15enum class BackendApi : unsigned;
16
17// The availability of context types is subject to platform and build configuration
18// restrictions.
19enum class ContextType {
20 kGL, //! OpenGL context.
21 kGLES, //! OpenGL ES context.
22 kANGLE_D3D9_ES2, //! ANGLE on Direct3D9 OpenGL ES 2 context.
23 kANGLE_D3D11_ES2, //! ANGLE on Direct3D11 OpenGL ES 2 context.
24 kANGLE_D3D11_ES3, //! ANGLE on Direct3D11 OpenGL ES 3 context.
25 kANGLE_GL_ES2, //! ANGLE on OpenGL OpenGL ES 2 context.
26 kANGLE_GL_ES3, //! ANGLE on OpenGL OpenGL ES 3 context.
27 kANGLE_Metal_ES2, //! ANGLE on Metal ES 2 context.
28 kANGLE_Metal_ES3, //! ANGLE on Metal ES 3 context.
29 kVulkan, //! Vulkan
30 kMetal, //! Metal
31 kDirect3D, //! Direct3D 12
32 kDawn_D3D11, //! Dawn on Direct3D11
33 kDawn_D3D12, //! Dawn on Direct3D12
34 kDawn_Metal, //! Dawn on Metal
35 kDawn_Vulkan, //! Dawn on Vulkan
36 kDawn_OpenGL, //! Dawn on OpenGL
37 kDawn_OpenGLES, //! Dawn on OpenGL ES
38 kMock, //! Mock context that does not draw.
40};
41
43
45
47
49
51
52namespace ganesh {
53
55
56} // namespace ganesh
57
58namespace graphite {
59
61
62} // namespace graphite
63} // namespace skgpu
64
65#endif
GrBackendApi
Definition: GrTypes.h:95
GLenum type
@ kVulkan
Definition: embedder.h:86
@ kMetal
Definition: embedder.h:85
GrBackendApi ContextTypeBackend(skgpu::ContextType type)
Definition: ContextType.cpp:92
skgpu::BackendApi ContextTypeBackend(skgpu::ContextType type)
Definition: GpuTools.h:21
bool IsDawnBackend(skgpu::ContextType type)
Definition: ContextType.cpp:73
BackendApi
Definition: GpuTypes.h:22
bool IsNativeBackend(skgpu::ContextType type)
Definition: ContextType.cpp:57
static const int kContextTypeCount
Definition: ContextType.h:42
ContextType
Definition: ContextType.h:19
@ kDawn_OpenGLES
Dawn on OpenGL.
@ kDawn_Metal
Dawn on Direct3D12.
@ kGLES
OpenGL context.
@ kANGLE_GL_ES2
ANGLE on Direct3D11 OpenGL ES 3 context.
@ kDawn_D3D12
Dawn on Direct3D11.
@ kANGLE_GL_ES3
ANGLE on OpenGL OpenGL ES 2 context.
@ kANGLE_D3D11_ES2
ANGLE on Direct3D9 OpenGL ES 2 context.
@ kLastContextType
Mock context that does not draw.
@ kDawn_Vulkan
Dawn on Metal.
@ kDawn_OpenGL
Dawn on Vulkan.
@ kDawn_D3D11
Direct3D 12.
@ kANGLE_D3D11_ES3
ANGLE on Direct3D11 OpenGL ES 2 context.
@ kANGLE_D3D9_ES2
OpenGL ES context.
@ kANGLE_Metal_ES2
ANGLE on OpenGL OpenGL ES 3 context.
@ kANGLE_Metal_ES3
ANGLE on Metal ES 2 context.
const char * ContextTypeName(skgpu::ContextType type)
Definition: ContextType.cpp:13
bool IsRenderingContext(skgpu::ContextType type)
Definition: ContextType.cpp:88