Module gpu
Expand description
GPU support for Skia: the Ganesh (crate::gpu::ganesh) and Graphite backends,
their backend-specific APIs (D3D, GL, Metal, Vulkan), and the backend-agnostic GPU types
shared between them.
Modules§
- backend_
formats - Helpers for constructing and querying
crate::gpu::BackendFormatacross the Ganesh backends (D3D, GL, Metal, Vulkan). - backend_
render_ targets - Helpers for constructing and querying
crate::gpu::BackendRenderTargetacross the Ganesh backends (D3D, GL, Metal, Vulkan). - backend_
semaphores - Helpers for constructing and querying
crate::gpu::BackendSemaphoreacross the Ganesh backends (D3D and Vulkan). - backend_
textures - Helpers for constructing and querying
crate::gpu::BackendTextureacross the Ganesh backends (D3D, GL, Metal, Vulkan). - direct_
contexts - Creates a
crate::gpu::DirectContextfor each of the Ganesh backends (D3D, GL, Metal, Vulkan). - ganesh
- Ganesh, Skia’s GPU-accelerated drawing backend, and the types and APIs shared between its backend implementations.
- gl
- OpenGL types and helpers re-exported from the Ganesh GL backend (see
crate::gpu::ganesh::gl). - interfaces
- Creates the platform-specific GL
crate::gpu::gl::Interfaceused to make OpenGL calls. - surfaces
- GPU surface creation functions for the Ganesh backends.
Structs§
- Budgeted
- Indicates whether an allocation should count against a cache budget.
- Context
Options - Options for the
crate::gpu::DirectContext. - Direct
Context Id - A unique ID associated with a
DirectContext. - Driver
BugWorkarounds - Flush
Error - A Ganesh flush failed.
- Flush
Info - Struct to supply options to flush calls.
- GpuStats
- GpuStats
Flags - Submit
Info - Options passed to
crate::gpu::DirectContext::submit().
Enums§
- BackendAPI
- Backend
Api - Mipmapped
- Origin
- Protected
- Purge
Resource Options - Renderable
- Semaphores
Submitted - Surface
Origin - SyncCpu
Type Aliases§
- Backend
Format - Describes a texture or render target format for a specific backend API.
- Backend
Render Target - Describes a render target on a specific GPU backend.
- Backend
Semaphore - Wrapper type for passing into and receiving data from Ganesh about a backend semaphore object.
- Backend
Texture - Describes a texture on a specific GPU backend. Its contents may be initialized or not.
- Direct
Context - Mutable
Texture State - Since Skia and clients can both modify gpu textures and their connected state, Skia needs a way for clients to inform us if they have modifiend any of this state. In order to not need setters for every single API and state, we use this class to be a generic wrapper around all the mutable state. This class is used for calls that inform Skia of these texture/image state changes by the client as well as for requesting state changes to be done by Skia. The backend specific state that is wrapped by this class are located in files like:
- Recording
Context - YUVA
Backend Texture Info - A description of a set
BackendTextures that hold the planar data described by aYUVAInfo. - YUVA
Backend Textures - A set of
BackendTextures that hold the planar data for an image described aYUVAInfo.