#include "include/core/SkTypes.h"
#include "include/private/base/SkTo.h"
#include <cstddef>
#include <cstdint>
Go to the source code of this file.
|
enum class | GrBackendApi : unsigned {
kOpenGL
, kVulkan
, kMetal
, kDirect3D
,
kMock
, kUnsupported
, kOpenGL_GrBackend = kOpenGL
} |
|
enum | GrSurfaceOrigin : int { kTopLeft_GrSurfaceOrigin
, kBottomLeft_GrSurfaceOrigin
} |
|
enum | GrGLBackendState {
kRenderTarget_GrGLBackendState = 1 << 0
, kTextureBinding_GrGLBackendState = 1 << 1
, kView_GrGLBackendState = 1 << 2
, kBlend_GrGLBackendState = 1 << 3
,
kMSAAEnable_GrGLBackendState = 1 << 4
, kVertex_GrGLBackendState = 1 << 5
, kStencil_GrGLBackendState = 1 << 6
, kPixelStore_GrGLBackendState = 1 << 7
,
kProgram_GrGLBackendState = 1 << 8
, kFixedFunction_GrGLBackendState = 1 << 9
, kMisc_GrGLBackendState = 1 << 10
, kALL_GrGLBackendState = 0xffff
} |
|
enum class | GrSemaphoresSubmitted : bool { kNo = false
, kYes = true
} |
|
enum class | GrPurgeResourceOptions { kAllResources
, kScratchResourcesOnly
} |
|
enum class | GrSyncCpu : bool { kNo = false
, kYes = true
} |
|
◆ GR_DECL_BITFIELD_CLASS_OPS_FRIENDS
#define GR_DECL_BITFIELD_CLASS_OPS_FRIENDS |
( |
|
X | ) |
|
Value:
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E > constexpr operator&(E l, E r)
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E & > constexpr operator&=(E &l, E r)
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E > constexpr operator~(E e)
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E > constexpr operator|(E l, E r)
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E & > constexpr operator|=(E &l, E r)
Definition at line 77 of file GrTypes.h.
94 : unsigned {
99
100
101
102
103
105
106
107
108
110
111
112
113
114
116};
117
118
119
120
121
123
127
128
129
130
131
132
134
135
136
137
139
140
141
142
143
144
145
149};
150
151
152
153
154
157
159
170};
171
172
173
174
176
179
182
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
222};
223
224
225
226
227
231};
232
236};
237
241};
242
243#endif
@ kBottomLeft_GrSurfaceOrigin
@ kTopLeft_GrSurfaceOrigin
static const uint32_t kAll_GrBackendState
static constexpr GrBackendApi kVulkan_GrBackend
static constexpr GrBackendApi kMock_GrBackend
void * GrDirectContextDestroyedContext
void * GrGpuSubmittedContext
void * GrGpuFinishedContext
void(* GrGpuSubmittedProc)(GrGpuSubmittedContext submittedContext, bool success)
void(* GrDirectContextDestroyedProc)(GrDirectContextDestroyedContext destroyedContext)
void(* GrGpuFinishedProc)(GrGpuFinishedContext finishedContext)
@ kProgram_GrGLBackendState
@ kTextureBinding_GrGLBackendState
@ kVertex_GrGLBackendState
@ kBlend_GrGLBackendState
@ kMSAAEnable_GrGLBackendState
@ kFixedFunction_GrGLBackendState
@ kPixelStore_GrGLBackendState
@ kStencil_GrGLBackendState
@ kRenderTarget_GrGLBackendState
static constexpr GrBackendApi kMetal_GrBackend
GrGpuFinishedContext fFinishedContext
GrBackendSemaphore * fSignalSemaphores
GrGpuFinishedProc fFinishedProc
GrGpuSubmittedContext fSubmittedContext
GrGpuSubmittedProc fSubmittedProc
◆ GR_MAKE_BITFIELD_CLASS_OPS
#define GR_MAKE_BITFIELD_CLASS_OPS |
( |
|
X | ) |
|
Defines bitwise operators that make it possible to use an enum class as a basic bitfield.
Definition at line 42 of file GrTypes.h.
43 { \
45 } \
47 return static_cast<X>(
static_cast<int>(
a) |
static_cast<int>(
b)); \
48 } \
51 } \
53 return SkToBool(
static_cast<int>(
a) &
static_cast<int>(
b)); \
54 } \
57 } \
60 } \
63 } \
65 return static_cast<X>(
a.value() &
b.value()); \
66 } \
68 return static_cast<X>(
a.value() &
static_cast<int>(
b)); \
69 } \
71 return static_cast<X>(
static_cast<int>(
a) &
b.value()); \
72 } \
75 } \
76
static constexpr bool SkToBool(const T &x)
◆ GrBackend
Previously the above enum was not an enum class but a normal enum. To support the legacy use of the enum values we define them below so that no clients break.
Definition at line 123 of file GrTypes.h.
◆ GrDirectContextDestroyedContext
◆ GrDirectContextDestroyedProc
◆ GrGpuFinishedContext
◆ GrGpuFinishedProc
◆ GrGpuSubmittedContext
◆ GrGpuSubmittedProc
◆ GrProtected
◆ GrRenderable
◆ GrBackendApi
Possible 3D APIs that may be used by Ganesh.
Enumerator |
---|
kOpenGL | |
kVulkan | |
kMetal | |
kDirect3D | |
kMock | Mock is a backend that does not draw anything. It is used for unit tests and to measure CPU overhead.
|
kUnsupported | Ganesh doesn't support some context types (e.g. Dawn) and will return Unsupported.
|
kOpenGL_GrBackend | Added here to support the legacy GrBackend enum value and clients who referenced it using GrBackend::kOpenGL_GrBackend.
|
Definition at line 95 of file GrTypes.h.
95 : unsigned {
100
101
102
103
104
106
107
108
109
111
112
113
114
115
117};
◆ GrGLBackendState
A GrContext's cache of backend context state can be partially invalidated. These enums are specific to the GL backend and we'd add a new set for an alternative backend.
Enumerator |
---|
kRenderTarget_GrGLBackendState | |
kTextureBinding_GrGLBackendState | |
kView_GrGLBackendState | |
kBlend_GrGLBackendState | |
kMSAAEnable_GrGLBackendState | |
kVertex_GrGLBackendState | |
kStencil_GrGLBackendState | |
kPixelStore_GrGLBackendState | |
kProgram_GrGLBackendState | |
kFixedFunction_GrGLBackendState | |
kMisc_GrGLBackendState | |
kALL_GrGLBackendState | |
Definition at line 156 of file GrTypes.h.
◆ GrPurgeResourceOptions
Enumerator |
---|
kAllResources | |
kScratchResourcesOnly | |
Definition at line 234 of file GrTypes.h.
◆ GrSemaphoresSubmitted
Enum used as return value when flush with semaphores so the client knows whether the valid semaphores will be submitted on the next GrContext::submit call.
Definition at line 229 of file GrTypes.h.
◆ GrSurfaceOrigin
GPU SkImage and SkSurfaces can be stored such that (0, 0) in texture space may correspond to either the top-left or bottom-left content pixel.
Enumerator |
---|
kTopLeft_GrSurfaceOrigin | |
kBottomLeft_GrSurfaceOrigin | |
Definition at line 147 of file GrTypes.h.
◆ GrSyncCpu
◆ kAll_GrBackendState
const uint32_t kAll_GrBackendState = 0xffffffff |
|
static |
This value translates to reseting all the context state for any backend.
Definition at line 176 of file GrTypes.h.
◆ kMetal_GrBackend
◆ kMock_GrBackend
◆ kVulkan_GrBackend