feat: add GPU-backed raster surfaces and effects#14
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional GPU rendering path behind
RenderContextGPU preferences, withRasterImageable 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:RasterImagenow supports opaque GPU surfaces alongside CPU images, andRenderContextexposes 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.Rasterizenow 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.CachingRenderContextrecords GPU availability and per-operation counts (composite,shadow,outline,rasterize,readback) so live/demo output can show whether GPU work is actually happening.tellur-liveexposes GPU preference from the render context so demos can opt into GPU use without changing element code.