Skip to main content

Module gpu

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::BackendFormat across the Ganesh backends (D3D, GL, Metal, Vulkan).
backend_render_targets
Helpers for constructing and querying crate::gpu::BackendRenderTarget across the Ganesh backends (D3D, GL, Metal, Vulkan).
backend_semaphores
Helpers for constructing and querying crate::gpu::BackendSemaphore across the Ganesh backends (D3D and Vulkan).
backend_textures
Helpers for constructing and querying crate::gpu::BackendTexture across the Ganesh backends (D3D, GL, Metal, Vulkan).
direct_contexts
Creates a crate::gpu::DirectContext for 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::Interface used 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.
ContextOptions
Options for the crate::gpu::DirectContext.
DirectContextId
A unique ID associated with a DirectContext.
DriverBugWorkarounds
FlushError
A Ganesh flush failed.
FlushInfo
Struct to supply options to flush calls.
GpuStats
GpuStatsFlags
SubmitInfo
Options passed to crate::gpu::DirectContext::submit().

Enums§

BackendAPI
BackendApi
Mipmapped
Origin
Protected
PurgeResourceOptions
Renderable
SemaphoresSubmitted
SurfaceOrigin
SyncCpu

Type Aliases§

BackendFormat
Describes a texture or render target format for a specific backend API.
BackendRenderTarget
Describes a render target on a specific GPU backend.
BackendSemaphore
Wrapper type for passing into and receiving data from Ganesh about a backend semaphore object.
BackendTexture
Describes a texture on a specific GPU backend. Its contents may be initialized or not.
DirectContext
MutableTextureState
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:
RecordingContext
YUVABackendTextureInfo
A description of a set BackendTextures that hold the planar data described by a YUVAInfo.
YUVABackendTextures
A set of BackendTextures that hold the planar data for an image described a YUVAInfo.