summaryrefslogtreecommitdiffstats
path: root/wgpu/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-04-21 21:58:32 +0200
committerLibravatar GitHub <noreply@github.com>2023-04-21 21:58:32 +0200
commit78924fa2998e2d158132dd5d06b2b8eea1edbc4b (patch)
tree6faabb2f8ab7b31c8265c57cb6a52c5873bc400e /wgpu/src
parent501b6b88009d912ddf8e8f205ce5ef7416dc63f4 (diff)
parentcc20baad6f422271f052cf68474a4aee40dcdc82 (diff)
downloadiced-78924fa2998e2d158132dd5d06b2b8eea1edbc4b.tar.gz
iced-78924fa2998e2d158132dd5d06b2b8eea1edbc4b.tar.bz2
iced-78924fa2998e2d158132dd5d06b2b8eea1edbc4b.zip
Merge pull request #1807 from Davidster/wgpu_16_w_glypth_20
Wgpu 0.16
Diffstat (limited to 'wgpu/src')
-rw-r--r--wgpu/src/image/atlas.rs6
-rw-r--r--wgpu/src/window/compositor.rs3
2 files changed, 3 insertions, 6 deletions
diff --git a/wgpu/src/image/atlas.rs b/wgpu/src/image/atlas.rs
index 82504147..a0fdf146 100644
--- a/wgpu/src/image/atlas.rs
+++ b/wgpu/src/image/atlas.rs
@@ -15,8 +15,6 @@ pub const SIZE: u32 = 2048;
use iced_graphics::image;
use iced_graphics::Size;
-use std::num::NonZeroU32;
-
#[derive(Debug)]
pub struct Atlas {
texture: wgpu::Texture,
@@ -209,8 +207,8 @@ impl Atlas {
buffer,
layout: wgpu::ImageDataLayout {
offset: offset as u64,
- bytes_per_row: NonZeroU32::new(4 * image_width + padding),
- rows_per_image: NonZeroU32::new(image_height),
+ bytes_per_row: Some(4 * image_width + padding),
+ rows_per_image: Some(image_height),
},
},
wgpu::ImageCopyTexture {
diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs
index d4a59471..53af19bf 100644
--- a/wgpu/src/window/compositor.rs
+++ b/wgpu/src/window/compositor.rs
@@ -71,9 +71,8 @@ impl<Theme> Compositor<Theme> {
capabilities
.formats
.iter()
- .filter(|format| format.describe().srgb)
.copied()
- .next()
+ .find(wgpu::TextureFormat::is_srgb)
.or_else(|| {
log::warn!("No sRGB format found!");