From 8f0b59a4b28bee028a879b0705eeeaa0b2e82df6 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 9 Feb 2020 03:36:59 +0100 Subject: Remove `scale_factor` from `iced_wgpu::Viewport` --- wgpu/src/window/backend.rs | 5 +++-- wgpu/src/window/swap_chain.rs | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'wgpu/src/window') diff --git a/wgpu/src/window/backend.rs b/wgpu/src/window/backend.rs index fda34a0a..0e4f02c9 100644 --- a/wgpu/src/window/backend.rs +++ b/wgpu/src/window/backend.rs @@ -47,9 +47,8 @@ impl iced_native::window::Backend for Backend { surface: &Self::Surface, width: u32, height: u32, - scale_factor: f64, ) -> SwapChain { - SwapChain::new(&self.device, surface, width, height, scale_factor) + SwapChain::new(&self.device, surface, width, height) } fn draw>( @@ -57,6 +56,7 @@ impl iced_native::window::Backend for Backend { renderer: &mut Self::Renderer, swap_chain: &mut SwapChain, output: &::Output, + scale_factor: f64, overlay: &[T], ) -> MouseCursor { let (frame, viewport) = swap_chain.next_frame(); @@ -89,6 +89,7 @@ impl iced_native::window::Backend for Backend { viewport, }, output, + scale_factor, overlay, ); diff --git a/wgpu/src/window/swap_chain.rs b/wgpu/src/window/swap_chain.rs index 46aaa869..3760e8a2 100644 --- a/wgpu/src/window/swap_chain.rs +++ b/wgpu/src/window/swap_chain.rs @@ -17,11 +17,10 @@ impl SwapChain { surface: &wgpu::Surface, width: u32, height: u32, - scale_factor: f64, ) -> SwapChain { SwapChain { raw: new_swap_chain(surface, width, height, device), - viewport: Viewport::new(width, height, scale_factor), + viewport: Viewport::new(width, height), } } -- cgit