summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-10-27 03:58:45 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-10-27 03:58:45 +0200
commit65823875791ecebf24d049cc0782e7475a37899b (patch)
tree1088c656ef7ad9782374952045022d2c104931b2 /wgpu/src/image
parent8cc19de254c37d3123d5ea1b6513f1f34d35c7c8 (diff)
parentf1b1344d59fa7354615f560bd25ed01ad0c9f865 (diff)
downloadiced-65823875791ecebf24d049cc0782e7475a37899b.tar.gz
iced-65823875791ecebf24d049cc0782e7475a37899b.tar.bz2
iced-65823875791ecebf24d049cc0782e7475a37899b.zip
Merge branch 'master' into text-editor
Diffstat (limited to 'wgpu/src/image')
-rw-r--r--wgpu/src/image/atlas.rs12
-rw-r--r--wgpu/src/image/vector.rs2
2 files changed, 7 insertions, 7 deletions
diff --git a/wgpu/src/image/atlas.rs b/wgpu/src/image/atlas.rs
index e3de1290..789e35b4 100644
--- a/wgpu/src/image/atlas.rs
+++ b/wgpu/src/image/atlas.rs
@@ -86,7 +86,7 @@ impl Atlas {
entry
};
- log::info!("Allocated atlas entry: {:?}", entry);
+ log::info!("Allocated atlas entry: {entry:?}");
// It is a webgpu requirement that:
// BufferCopyView.layout.bytes_per_row % wgpu::COPY_BYTES_PER_ROW_ALIGNMENT == 0
@@ -104,7 +104,7 @@ impl Atlas {
padded_data[offset..offset + 4 * width as usize].copy_from_slice(
&data[row * 4 * width as usize..(row + 1) * 4 * width as usize],
- )
+ );
}
match &entry {
@@ -139,13 +139,13 @@ impl Atlas {
}
}
- log::info!("Current atlas: {:?}", self);
+ log::info!("Current atlas: {self:?}");
Some(entry)
}
pub fn remove(&mut self, entry: &Entry) {
- log::info!("Removing atlas entry: {:?}", entry);
+ log::info!("Removing atlas entry: {entry:?}");
match entry {
Entry::Contiguous(allocation) => {
@@ -237,7 +237,7 @@ impl Atlas {
}));
}
}
- _ => {}
+ Layer::Full => {}
}
}
@@ -258,7 +258,7 @@ impl Atlas {
}
fn deallocate(&mut self, allocation: &Allocation) {
- log::info!("Deallocating atlas: {:?}", allocation);
+ log::info!("Deallocating atlas: {allocation:?}");
match allocation {
Allocation::Full { layer } => {
diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs
index 2c03d36b..6582bb82 100644
--- a/wgpu/src/image/vector.rs
+++ b/wgpu/src/image/vector.rs
@@ -152,7 +152,7 @@ impl Cache {
let allocation =
atlas.upload(device, encoder, width, height, &rgba)?;
- log::debug!("allocating {} {}x{}", id, width, height);
+ log::debug!("allocating {id} {width}x{height}");
let _ = self.svg_hits.insert(id);
let _ = self.rasterized_hits.insert(key);