mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 15:28:04 +08:00
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:
@@ -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(""))]
|
||||
|
||||
Reference in New Issue
Block a user