summaryrefslogtreecommitdiffstats
path: root/tiny_skia
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-10 19:55:27 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-10 19:55:27 +0200
commitfdd9896dc5f727f4c659ad6252f1ab36cca77762 (patch)
tree4e2e8fe380346d50cdfa5e10b65f175fb0b8160f /tiny_skia
parent32cd456fb936117307c178b4d47ae89124c8329a (diff)
downloadiced-fdd9896dc5f727f4c659ad6252f1ab36cca77762.tar.gz
iced-fdd9896dc5f727f4c659ad6252f1ab36cca77762.tar.bz2
iced-fdd9896dc5f727f4c659ad6252f1ab36cca77762.zip
Track image damage in `iced_tiny_skia`
Diffstat (limited to 'tiny_skia')
-rw-r--r--tiny_skia/src/layer.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tiny_skia/src/layer.rs b/tiny_skia/src/layer.rs
index 17e6ac13..d3d8b988 100644
--- a/tiny_skia/src/layer.rs
+++ b/tiny_skia/src/layer.rs
@@ -241,8 +241,16 @@ impl Layer {
},
);
+ let images = damage::list(
+ &previous.images,
+ &current.images,
+ |image| vec![image.bounds().expand(1.0)],
+ Image::eq,
+ );
+
damage.extend(text);
damage.extend(primitives);
+ damage.extend(images);
damage
}
}