summaryrefslogtreecommitdiffstats
path: root/graphics/src/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-10 15:21:42 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-10 15:21:42 +0200
commit1e802e776cb591f3860d1bfbaa1423d356fc8456 (patch)
tree6d18b7ed93daac1f56346f1a18b16da9e378419d /graphics/src/layer.rs
parent14b9708f723f9fc730634e7ded3dec7dc912ce34 (diff)
downloadiced-1e802e776cb591f3860d1bfbaa1423d356fc8456.tar.gz
iced-1e802e776cb591f3860d1bfbaa1423d356fc8456.tar.bz2
iced-1e802e776cb591f3860d1bfbaa1423d356fc8456.zip
Reintroduce damage tracking for `iced_tiny_skia`
Diffstat (limited to '')
-rw-r--r--graphics/src/layer.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/src/layer.rs b/graphics/src/layer.rs
index 0187cc59..c9a818fb 100644
--- a/graphics/src/layer.rs
+++ b/graphics/src/layer.rs
@@ -113,6 +113,11 @@ impl<T: Layer> Stack<T> {
self.layers[..self.active_count].iter()
}
+ /// Returns the slice of layers in the [`Stack`].
+ pub fn as_slice(&self) -> &[T] {
+ &self.layers[..self.active_count]
+ }
+
/// Flushes and settles any primitives in the current layer of the [`Stack`].
pub fn flush(&mut self) {
self.layers[self.current].flush();