Remove redundant fields
This commit is contained in:
parent
64cd487c37
commit
ac400f6122
|
@ -31,8 +31,6 @@ pub struct SurfaceTexture<'a> {
|
||||||
/// See [`PixelsBuilder`] for building a customized pixel buffer.
|
/// See [`PixelsBuilder`] for building a customized pixel buffer.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Pixels {
|
pub struct Pixels {
|
||||||
width: u32,
|
|
||||||
height: u32,
|
|
||||||
device: wgpu::Device,
|
device: wgpu::Device,
|
||||||
queue: wgpu::Queue,
|
queue: wgpu::Queue,
|
||||||
renderer: Renderer,
|
renderer: Renderer,
|
||||||
|
@ -161,8 +159,8 @@ impl Pixels {
|
||||||
wgpu::BufferCopyView {
|
wgpu::BufferCopyView {
|
||||||
buffer: &buffer,
|
buffer: &buffer,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
row_pitch: self.width * self.texture_format_size,
|
row_pitch: self.texture_extent.width * self.texture_format_size,
|
||||||
image_height: self.height,
|
image_height: self.texture_extent.height,
|
||||||
},
|
},
|
||||||
wgpu::TextureCopyView {
|
wgpu::TextureCopyView {
|
||||||
texture: &self.texture,
|
texture: &self.texture,
|
||||||
|
@ -415,8 +413,6 @@ impl<'a> PixelsBuilder<'a> {
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(Pixels {
|
Ok(Pixels {
|
||||||
width,
|
|
||||||
height,
|
|
||||||
device,
|
device,
|
||||||
queue,
|
queue,
|
||||||
renderer,
|
renderer,
|
||||||
|
|
Loading…
Reference in a new issue