summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-02 06:40:48 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-02 06:40:48 +0200
commit8e8808f0e187ed6671441f5016f07bfcba426452 (patch)
treebc4d2eeb57f60e654a4a8ed7c562f79ee507abab /wgpu
parent2d7d9a130ece3fb6fa4cd52f9b32b4abd7887cf5 (diff)
parentc8952ee4a1118fe67bfdf40fc77f3ff30f5d0278 (diff)
downloadiced-8e8808f0e187ed6671441f5016f07bfcba426452.tar.gz
iced-8e8808f0e187ed6671441f5016f07bfcba426452.tar.bz2
iced-8e8808f0e187ed6671441f5016f07bfcba426452.zip
Merge branch 'master' into advanced-text
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/Cargo.toml6
-rw-r--r--wgpu/src/image/atlas.rs6
-rw-r--r--wgpu/src/window/compositor.rs3
3 files changed, 6 insertions, 9 deletions
diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml
index 6934ae49..41eb4c23 100644
--- a/wgpu/Cargo.toml
+++ b/wgpu/Cargo.toml
@@ -13,7 +13,7 @@ image = ["iced_graphics/image"]
svg = ["resvg"]
[dependencies]
-wgpu = "0.15"
+wgpu = "0.16"
raw-window-handle = "0.5"
log = "0.4"
guillotiere = "0.6"
@@ -23,7 +23,7 @@ once_cell = "1.0"
rustc-hash = "1.1"
[target.'cfg(target_arch = "wasm32")'.dependencies]
-wgpu = { version = "0.15", features = ["webgl"] }
+wgpu = { version = "0.16", features = ["webgl"] }
[dependencies.twox-hash]
version = "1.6"
@@ -44,7 +44,7 @@ path = "../graphics"
[dependencies.glyphon]
version = "0.2"
git = "https://github.com/hecrj/glyphon.git"
-rev = "504aa8a9a1fb42726f02fa244b70119e7ca25933"
+rev = "f145067d292082abdd1f2b2481812d4a52c394ec"
[dependencies.encase]
version = "0.3.0"
diff --git a/wgpu/src/image/atlas.rs b/wgpu/src/image/atlas.rs
index 39b6e5d2..366fe623 100644
--- a/wgpu/src/image/atlas.rs
+++ b/wgpu/src/image/atlas.rs
@@ -14,8 +14,6 @@ pub const SIZE: u32 = 2048;
use crate::core::Size;
-use std::num::NonZeroU32;
-
#[derive(Debug)]
pub struct Atlas {
texture: wgpu::Texture,
@@ -308,8 +306,8 @@ impl Atlas {
data,
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),
},
extent,
);
diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs
index c55ffa46..500458e8 100644
--- a/wgpu/src/window/compositor.rs
+++ b/wgpu/src/window/compositor.rs
@@ -72,9 +72,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!");