Trim measurements in renderer::Backend

This commit is contained in:
Héctor Ramón Jiménez 2023-02-25 15:11:35 +01:00
parent 27e21a83f7
commit a01bc865a0
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -9,7 +9,13 @@ pub enum Backend {
Wgpu(iced_wgpu::Backend),
}
impl iced_graphics::Backend for Backend {}
impl iced_graphics::Backend for Backend {
fn trim_measurements(&mut self) {
match self {
Self::Wgpu(backend) => backend.trim_measurements(),
}
}
}
impl backend::Text for Backend {
const ICON_FONT: Font = Font::Name("Iced-Icons");