summaryrefslogtreecommitdiffstats
path: root/renderer/src/geometry/cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'renderer/src/geometry/cache.rs')
-rw-r--r--renderer/src/geometry/cache.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/renderer/src/geometry/cache.rs b/renderer/src/geometry/cache.rs
index 3aff76b9..6a43ddb6 100644
--- a/renderer/src/geometry/cache.rs
+++ b/renderer/src/geometry/cache.rs
@@ -1,4 +1,5 @@
use crate::core::Size;
+use crate::custom;
use crate::geometry::{Frame, Geometry};
use crate::Renderer;
@@ -29,6 +30,7 @@ enum Internal {
TinySkia(Arc<iced_tiny_skia::Primitive>),
#[cfg(feature = "wgpu")]
Wgpu(Arc<iced_wgpu::Primitive>),
+ Custom(Arc<dyn custom::Geometry>),
}
impl Cache {
@@ -82,6 +84,9 @@ impl Cache {
content: primitive.clone(),
});
}
+ Internal::Custom(geometry) => {
+ return Geometry::Custom(geometry.clone().load())
+ }
}
}
}
@@ -100,6 +105,9 @@ impl Cache {
Geometry::Wgpu(primitive) => {
Internal::Wgpu(Arc::new(primitive))
}
+ Geometry::Custom(geometry) => {
+ Internal::Custom(geometry.cache())
+ }
}
};
@@ -120,6 +128,7 @@ impl Cache {
content: primitive,
})
}
+ Internal::Custom(geometry) => Geometry::Custom(geometry.load()),
}
}
}