diff options
author | 2024-04-08 15:35:54 +0200 | |
---|---|---|
committer | 2024-04-08 15:35:54 +0200 | |
commit | 2c6fd9ac14c5d270e05b97b7a7fab811d25834c4 (patch) | |
tree | d4484aaf89ea81221e3b077bb3ac213bba015411 /wgpu | |
parent | f88488543f0b2d0ca95753d1e6527ba06981290a (diff) | |
download | iced-2c6fd9ac14c5d270e05b97b7a7fab811d25834c4.tar.gz iced-2c6fd9ac14c5d270e05b97b7a7fab811d25834c4.tar.bz2 iced-2c6fd9ac14c5d270e05b97b7a7fab811d25834c4.zip |
Make arguments of `Renderer::new` explicit in `iced_wgpu`
Diffstat (limited to 'wgpu')
-rw-r--r-- | wgpu/src/lib.rs | 10 | ||||
-rw-r--r-- | wgpu/src/window/compositor.rs | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 0580399d..b1ae4e89 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -87,10 +87,14 @@ pub struct Renderer { } impl Renderer { - pub fn new(settings: Settings, _engine: &Engine) -> Self { + pub fn new( + _engine: &Engine, + default_font: Font, + default_text_size: Pixels, + ) -> Self { Self { - default_font: settings.default_font, - default_text_size: settings.default_text_size, + default_font, + default_text_size, layers: layer::Stack::new(), triangle_storage: triangle::Storage::new(), diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index d546a6dc..095afd48 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -289,7 +289,11 @@ impl graphics::Compositor for Compositor { } fn create_renderer(&self) -> Self::Renderer { - Renderer::new(self.settings, &self.engine) + Renderer::new( + &self.engine, + self.settings.default_font, + self.settings.default_text_size, + ) } fn create_surface<W: compositor::Window>( |