mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Pass out pixels_per_point in output for use in tesselation
This commit is contained in:
@@ -9,7 +9,6 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
{
|
||||
let ctx = egui::Context::default();
|
||||
let mut demo_windows = egui_demo_lib::DemoWindows::default();
|
||||
let pixels_per_point = 1.0;
|
||||
|
||||
// The most end-to-end benchmark.
|
||||
c.bench_function("demo_with_tessellate__realistic", |b| {
|
||||
@@ -17,7 +16,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
let full_output = ctx.run(RawInput::default(), |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
});
|
||||
ctx.tessellate(full_output.shapes, pixels_per_point)
|
||||
ctx.tessellate(full_output.shapes, full_output.pixels_per_point)
|
||||
});
|
||||
});
|
||||
|
||||
@@ -33,7 +32,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
demo_windows.ui(ctx);
|
||||
});
|
||||
c.bench_function("demo_only_tessellate", |b| {
|
||||
b.iter(|| ctx.tessellate(full_output.shapes.clone(), pixels_per_point));
|
||||
b.iter(|| ctx.tessellate(full_output.shapes.clone(), full_output.pixels_per_point));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user