#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 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)
constexpr Mask< EnumType > operator&(const EnumType &lhs, const EnumType &rhs)
Definition at line 77 of file GrTypes.h.
◆ 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.
◆ 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.
156 {
158
160
171};
@ kProgram_GrGLBackendState
@ kTextureBinding_GrGLBackendState
@ kVertex_GrGLBackendState
@ kBlend_GrGLBackendState
@ kMSAAEnable_GrGLBackendState
@ kFixedFunction_GrGLBackendState
@ kPixelStore_GrGLBackendState
@ kStencil_GrGLBackendState
@ kRenderTarget_GrGLBackendState
◆ 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.
229 : bool {
232};
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
◆ 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.
147 : int {
150};
@ kBottomLeft_GrSurfaceOrigin
@ kTopLeft_GrSurfaceOrigin
◆ 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