Skip to content

[api] Add support for the Graphite GPU backend #3962

Description

@ramezgerges

Part of #4015

Graphite: Skia's Next-Generation GPU Backend

Graphite is Skia's new GPU rendering backend, designed from the ground up for modern graphics APIs. It replaces Ganesh, which has powered Skia's GPU rendering for over a decade.

Graphite is already in production — Chrome ships it on Apple Silicon Macs with ~15% rendering performance improvement, and is expanding to other platforms.

Why Graphite?

Ganesh was built around OpenGL and incrementally adapted for Vulkan, Metal, and Direct3D. This legacy shows in its single-threaded immediate-mode design. Graphite starts fresh with:

  • Deferred command submission — draw calls are recorded, batched, and reordered for optimal GPU throughput
  • Multi-threaded recording — multiple Recorders can accumulate work in parallel, then submit to a single Context
  • Pipeline precompilationPrecompileContext eliminates shader compilation jank by building pipelines ahead of time on background threads
  • Modern API-first — built for Metal, Vulkan, and Dawn (WebGPU) from day one

How it works

The programming model changes from Ganesh's immediate context to a record-then-submit pattern:

Context (owns GPU device and queue)
  └── Recorder (accumulates draw calls — exposes SkCanvas)
        └── Recording (immutable command snapshot)
              └── Context.insertRecording() → submit() to GPU

SkCanvas is still the drawing API. All existing drawing code (paths, images, text, shaders, effects) works identically. What changes is how you create the context and surface, and how commands get to the GPU.

Supported backends

Backend Platforms Notes
Metal macOS, iOS Most mature. Production in Chrome.
Vulkan Android, Linux, Windows Direct access, largest implementation.
Dawn Windows, Linux, WASM, all platforms WebGPU abstraction — wraps D3D12, Vulkan, or Metal underneath. Chrome's primary path for Windows.

Graphite does not support OpenGL or Direct3D directly. Dawn provides D3D12 coverage on Windows and Vulkan coverage on Linux — making it the cross-platform solution for platforms without native Metal or Vulkan.

Ganesh deprecation

Google is actively deprecating Ganesh:

  • Dawn support was removed from Ganesh in Skia m118 — Dawn is Graphite-only
  • OpenGL and Direct3D remain in Ganesh but have no Graphite equivalent
  • Ganesh will be maintained for a while for non-Chrome consumers, but active development has shifted to Graphite

What this means for SkiaSharp users

Nothing changes today — SkiaSharp v4 continues to use Ganesh for all GPU rendering. Existing code will keep working.

But if you're starting new GPU-accelerated work or evaluating rendering architecture, Graphite is where Skia's future investment is going. Benefits you'd get from Graphite adoption:

  • Better GPU throughput from deferred command batching
  • Elimination of shader compilation hitches via precompilation
  • Multi-threaded recording for complex scenes
  • Access to Dawn for modern D3D12/WebGPU on Windows and WASM

Considerations

  • Design C API shims for Graphite core types (Context, Recorder, Recording)
  • Decide Dawn strategy — Dawn requires additional build dependencies but is the only path for Windows/Linux GPU in a post-Ganesh world
  • Plan coexistence: Graphite and Ganesh can run side-by-side, allowing gradual migration
  • Evaluate platform view changes needed for Graphite context creation
  • Consider which backends to prioritize: Metal (most mature) → Vulkan (Android) → Dawn (Windows/WASM)

Metadata

Metadata

Assignees

Labels

area/SkiaSharpIssues that relate to the C# binding of SkiaSharp.backend/Metalbackend/Vulkancost/xlOver a month. Architectural, research-heavy, or high coordination costos/Androidos/Linuxos/WASMIssues running on WebAssembly (ASP.NET Blazor or Uno Platform)os/Windows-ClassicIssues running on Microsoft Windows using Win32 APIs (Windows.Forms or WPF)os/iOSos/macOSpartner/unoplatformIssues and PRs that are/should being looked at or worked on by the Uno Platform partners.priority/3Backlog: only if extra capacity. Won't block any release.triage/triagedtype/feature-requestupgrading/4.xIssues and discussions relating to the upgrade from 3.x to 4.x

Type

No type

Projects

Status
New

Relationships

None yet

Development

No branches or pull requests

Issue actions