#include "include/core/SkTypes.h"
#include "include/private/base/SkTo.h"
#include <cstddef>
#include <cstdint>
Go to the source code of this file.
|
| skgpu |
| This file includes numerous public types that are used by all of our gpu backends.
|
|
|
enum class | GrBackendApi : unsigned {
kOpenGL
, kVulkan
, kMetal
, kDirect3D
,
kMock
, kUnsupported
, kOpenGL_GrBackend = kOpenGL
} |
| Possible 3D APIs that may be used by Ganesh. More...
|
|
enum | GrSurfaceOrigin : int { kTopLeft_GrSurfaceOrigin
, kBottomLeft_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. More...
|
|
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
} |
| A GrContext's cache of backend context state can be partially invalidated. More...
|
|
enum class | GrSemaphoresSubmitted : bool { kNo = false
, kYes = true
} |
| 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. More...
|
|
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:
friend constexpr X operator |(X, X); \
friend X& operator |=(X&, X); \
friend constexpr bool operator &(X, X); \
Wraps a C++11 enum that we use as a bitfield, and enables a limited amount of masking with type safet...
Definition: GrTypes.h:30
◆ 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.
◆ 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.
◆ GrDirectContextDestroyedContext
◆ GrDirectContextDestroyedProc
◆ GrGpuFinishedContext
◆ GrGpuFinishedProc
◆ GrGpuSubmittedContext
◆ GrGpuSubmittedProc
◆ GrMipmapped
Used to say whether a texture has mip levels allocated or not.
Deprecated legacy alias of skgpu::Mipmapped.
◆ GrMipMapped
◆ 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.
|
◆ 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 | |
◆ GrPurgeResourceOptions
Enumerator |
---|
kAllResources | |
kScratchResourcesOnly | |
◆ 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.
◆ 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 | |
◆ GrSyncCpu
◆ kAll_GrBackendState
const uint32_t kAll_GrBackendState = 0xffffffff |
|
static |
This value translates to reseting all the context state for any backend.
◆ kMetal_GrBackend
◆ kMock_GrBackend
◆ kVulkan_GrBackend