Remove image abstractions in iced_graphics

This commit is contained in:
Héctor Ramón Jiménez 2023-03-07 03:47:49 +01:00
parent 9b4bcd287a
commit 3a26baa564
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
11 changed files with 352 additions and 436 deletions

View file

@ -1,5 +1,4 @@
use crate::core::Size;
use crate::graphics::image;
use crate::image::atlas;
#[derive(Debug)]
@ -11,8 +10,9 @@ pub enum Entry {
},
}
impl image::storage::Entry for Entry {
fn size(&self) -> Size<u32> {
impl Entry {
#[cfg(feature = "image")]
pub fn size(&self) -> Size<u32> {
match self {
Entry::Contiguous(allocation) => allocation.size(),
Entry::Fragmented { size, .. } => *size,