From ac400f6122f07d97db4348a1e5a4a7262ffde0da Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Thu, 3 Oct 2019 23:28:13 -0700 Subject: [PATCH] Remove redundant fields --- src/lib.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 80b24f0..b7dd55e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,8 +31,6 @@ pub struct SurfaceTexture<'a> { /// See [`PixelsBuilder`] for building a customized pixel buffer. #[derive(Debug)] pub struct Pixels { - width: u32, - height: u32, device: wgpu::Device, queue: wgpu::Queue, renderer: Renderer, @@ -161,8 +159,8 @@ impl Pixels { wgpu::BufferCopyView { buffer: &buffer, offset: 0, - row_pitch: self.width * self.texture_format_size, - image_height: self.height, + row_pitch: self.texture_extent.width * self.texture_format_size, + image_height: self.texture_extent.height, }, wgpu::TextureCopyView { texture: &self.texture, @@ -415,8 +413,6 @@ impl<'a> PixelsBuilder<'a> { }; Ok(Pixels { - width, - height, device, queue, renderer,