Reintroduce damage tracking for iced_tiny_skia

This commit is contained in:
Héctor Ramón Jiménez 2024-04-10 15:21:42 +02:00
parent 14b9708f72
commit 1e802e776c
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
10 changed files with 347 additions and 92 deletions

View file

@ -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();