mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 12:21:31 +11:00
fix some clippy errors/warnings
This commit is contained in:
parent
e9278a9253
commit
2b0eab2bbc
|
@ -81,8 +81,8 @@ impl RenderConfig {
|
||||||
let height_in_tiles = new_height / TILE_HEIGHT;
|
let height_in_tiles = new_height / TILE_HEIGHT;
|
||||||
let n_path_tags = layout.path_tags_size();
|
let n_path_tags = layout.path_tags_size();
|
||||||
let workgroup_counts =
|
let workgroup_counts =
|
||||||
WorkgroupCounts::new(&layout, width_in_tiles, height_in_tiles, n_path_tags);
|
WorkgroupCounts::new(layout, width_in_tiles, height_in_tiles, n_path_tags);
|
||||||
let buffer_sizes = BufferSizes::new(&layout, &workgroup_counts, n_path_tags);
|
let buffer_sizes = BufferSizes::new(layout, &workgroup_counts, n_path_tags);
|
||||||
Self {
|
Self {
|
||||||
gpu: ConfigUniform {
|
gpu: ConfigUniform {
|
||||||
width_in_tiles,
|
width_in_tiles,
|
||||||
|
@ -175,7 +175,7 @@ impl WorkgroupCounts {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Typed buffer size primitive.
|
/// Typed buffer size primitive.
|
||||||
#[derive(Copy, Clone, Eq, Ord, Default, Debug)]
|
#[derive(Copy, Clone, Eq, Default, Debug)]
|
||||||
pub struct BufferSize<T: Sized> {
|
pub struct BufferSize<T: Sized> {
|
||||||
len: u32,
|
len: u32,
|
||||||
_phantom: std::marker::PhantomData<T>,
|
_phantom: std::marker::PhantomData<T>,
|
||||||
|
|
|
@ -129,9 +129,11 @@ impl Resolver {
|
||||||
self.resolve_pending_images();
|
self.resolve_pending_images();
|
||||||
let data = packed;
|
let data = packed;
|
||||||
data.clear();
|
data.clear();
|
||||||
let mut layout = Layout::default();
|
let mut layout = Layout {
|
||||||
layout.n_paths = encoding.n_paths;
|
n_paths: encoding.n_paths,
|
||||||
layout.n_clips = encoding.n_clips;
|
n_clips: encoding.n_clips,
|
||||||
|
..Layout::default()
|
||||||
|
};
|
||||||
// Compute size of data buffer
|
// Compute size of data buffer
|
||||||
let n_path_tags =
|
let n_path_tags =
|
||||||
encoding.path_tags.len() + sizes.path_tags + encoding.n_open_clips as usize;
|
encoding.path_tags.len() + sizes.path_tags + encoding.n_open_clips as usize;
|
||||||
|
|
|
@ -330,7 +330,7 @@ impl Engine {
|
||||||
let format = proxy.format.to_wgpu();
|
let format = proxy.format.to_wgpu();
|
||||||
queue.write_texture(
|
queue.write_texture(
|
||||||
wgpu::ImageCopyTexture {
|
wgpu::ImageCopyTexture {
|
||||||
texture: &texture,
|
texture,
|
||||||
mip_level: 0,
|
mip_level: 0,
|
||||||
origin: wgpu::Origin3d { x: *x, y: *y, z: 0 },
|
origin: wgpu::Origin3d { x: *x, y: *y, z: 0 },
|
||||||
aspect: TextureAspect::All,
|
aspect: TextureAspect::All,
|
||||||
|
|
|
@ -136,7 +136,7 @@ impl Renderer {
|
||||||
if target.width != width || target.height != height {
|
if target.width != width || target.height != height {
|
||||||
target = TargetTexture::new(device, width, height);
|
target = TargetTexture::new(device, width, height);
|
||||||
}
|
}
|
||||||
self.render_to_texture(device, queue, scene, &target.view, ¶ms)?;
|
self.render_to_texture(device, queue, scene, &target.view, params)?;
|
||||||
let blit = self
|
let blit = self
|
||||||
.blit
|
.blit
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
|
Loading…
Reference in a new issue