Merge branch 'master' into wgpu/better-architecture

This commit is contained in:
Héctor Ramón Jiménez 2024-04-07 14:01:05 +02:00
commit 13289dbd19
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
41 changed files with 318 additions and 267 deletions

View file

@ -1,3 +1,4 @@
#![allow(missing_docs)]
use criterion::{criterion_group, criterion_main, Bencher, Criterion};
use iced::alignment;
@ -11,6 +12,7 @@ use iced_wgpu::Renderer;
criterion_main!(benches);
criterion_group!(benches, wgpu_benchmark);
#[allow(unused_results)]
pub fn wgpu_benchmark(c: &mut Criterion) {
c.bench_function("wgpu — canvas (light)", |b| benchmark(b, scene(10)));
c.bench_function("wgpu — canvas (heavy)", |b| benchmark(b, scene(1_000)));
@ -101,7 +103,7 @@ fn benchmark(
);
bencher.iter(|| {
user_interface.draw(
let _ = user_interface.draw(
&mut renderer,
&Theme::Dark,
&core::renderer::Style {
@ -128,7 +130,6 @@ fn benchmark(
);
let submission = engine.submit(&queue, encoder);
let _ = device.poll(wgpu::Maintain::WaitForSubmissionIndex(submission));
});
}