Cache Vello render output as stitchable textures (#3722)

* WIP render caching

* Hook up render cache to render pipeline

* Fixed offsets

* Initial cleanup

* Integrate cache with context invalidation

* Cleanup

* Improve rounding and reduce tile size to fix vello not rendering

* Include pointer position in cache key

* Avoid unwraps and zero sized textures

* Destroy textures after blitting to surface

* Fix context dependencies

* Exclude footprint from render params

* Batch animation frame messages

* Add vello max render size to preference dialogue

* Remove unused import

* Reorder vello preference

* Clean up preferences dialog

* Apply review suggestions

* Cap max render region size

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2026-02-22 11:12:50 +01:00
committed by GitHub
parent 5aca75dcbd
commit 0531769c41
19 changed files with 839 additions and 104 deletions

View File

@@ -18,6 +18,9 @@ use std::sync::Arc;
use vector_types::GradientStops;
use wgpu_executor::RenderContext;
// Re-export render_output_cache from render_cache module
pub use crate::render_cache::render_output_cache;
/// List of (canvas id, image data) pairs for embedding images as canvases in the final SVG string.
type ImageData = HashMap<Image<Color>, u64>;
@@ -28,9 +31,9 @@ pub enum RenderIntermediateType {
}
#[derive(Clone, dyn_any::DynAny)]
pub struct RenderIntermediate {
ty: RenderIntermediateType,
metadata: RenderMetadata,
contains_artboard: bool,
pub(crate) ty: RenderIntermediateType,
pub(crate) metadata: RenderMetadata,
pub(crate) contains_artboard: bool,
}
#[node_macro::node(category(""))]