diff --git a/crates/eframe/src/epi/icon_data.rs b/crates/eframe/src/epi/icon_data.rs index 2bb6b138158..c62b6a689a1 100644 --- a/crates/eframe/src/epi/icon_data.rs +++ b/crates/eframe/src/epi/icon_data.rs @@ -20,6 +20,7 @@ impl IconData { /// # Errors /// If this is not a valid png. pub fn try_from_png_bytes(png_bytes: &[u8]) -> Result { + crate::profile_function!(); let image = image::load_from_memory(png_bytes)?; Ok(Self::from_image(image)) } @@ -38,6 +39,7 @@ impl IconData { /// # Errors /// If `width*height != 4 * rgba.len()`, or if the image is too big. pub fn to_image(&self) -> Result { + crate::profile_function!(); let Self { rgba, width, @@ -51,6 +53,7 @@ impl IconData { /// # Errors /// The image is invalid, or the PNG encoder failed. pub fn to_png_bytes(&self) -> Result, String> { + crate::profile_function!(); let image = self.to_image()?; let mut png_bytes: Vec = Vec::new(); image