Skip to content

feat: add GPU-backed raster surfaces and effects#14

Merged
AsPulse merged 4 commits into
mainfrom
feat/gpu-raster-surfaces
May 27, 2026
Merged

feat: add GPU-backed raster surfaces and effects#14
AsPulse merged 4 commits into
mainfrom
feat/gpu-raster-surfaces

Conversation

@AsPulse
Copy link
Copy Markdown
Member

@AsPulse AsPulse commented May 27, 2026

Adds an optional GPU rendering path behind RenderContext GPU preferences, with RasterImage able to carry either CPU pixels or backend-owned GPU surfaces. CPU fallback stays in place for every path, so existing renderers keep working when GPU initialization is unavailable.

  • tellur-core: RasterImage now supports opaque GPU surfaces alongside CPU images, and RenderContext exposes GPU preference / backend hooks plus readback for CPU-only consumers.
  • tellur-renderer::gpu (new): wgpu backend for GPU-local RGBA surfaces, source-over compositing, drop shadows, outlines, readback, and Vello-backed vector rasterization.
  • Rasterize now tries GPU vector rasterization when the context prefers GPU, then falls back to the existing tiny-skia CPU path.
  • DropShadow, Outline, and layer compositing route through the GPU backend when available, while preserving the existing CPU implementations as fallback.
  • CachingRenderContext records GPU availability and per-operation counts (composite, shadow, outline, rasterize, readback) so live/demo output can show whether GPU work is actually happening.
  • tellur-live exposes GPU preference from the render context so demos can opt into GPU use without changing element code.

@AsPulse AsPulse merged commit c6d8bfd into main May 27, 2026
14 checks passed
@AsPulse AsPulse deleted the feat/gpu-raster-surfaces branch May 27, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant