diff --git a/druid/src/data.rs b/druid/src/data.rs index 764c79a431..6986173067 100644 --- a/druid/src/data.rs +++ b/druid/src/data.rs @@ -23,6 +23,7 @@ use crate::piet; use crate::shell::Scale; pub use druid_derive::Data; +use piet::ImageBuf; /// A trait used to represent value types. /// @@ -434,6 +435,12 @@ impl Data for piet::TextAlignment { } } +impl Data for ImageBuf { + fn same(&self, other: &Self) -> bool { + self.raw_pixels_shared().same(&other.raw_pixels_shared()) + } +} + #[cfg(feature = "im")] impl Data for im::Vector { fn same(&self, other: &Self) -> bool {