1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 15:20:05 -04:00

Replace uses of context-panels with ui-panels

This commit is contained in:
Emil Ernerfeldt
2025-11-16 19:04:15 +01:00
parent 3b97c828c6
commit 43f7982cd2
13 changed files with 177 additions and 164 deletions

View File

@@ -29,7 +29,9 @@ pub fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("demo_with_tessellate__realistic", |b| {
b.iter(|| {
let full_output = ctx.run(RawInput::default(), |ctx| {
demo_windows.ui(ctx);
egui::CentralPanel::default().show(ctx, |ui| {
demo_windows.ui(ui);
});
});
ctx.tessellate(full_output.shapes, full_output.pixels_per_point)
});
@@ -38,13 +40,17 @@ pub fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("demo_no_tessellate", |b| {
b.iter(|| {
ctx.run(RawInput::default(), |ctx| {
demo_windows.ui(ctx);
egui::CentralPanel::default().show(ctx, |ui| {
demo_windows.ui(ui);
});
})
});
});
let full_output = ctx.run(RawInput::default(), |ctx| {
demo_windows.ui(ctx);
egui::CentralPanel::default().show(ctx, |ui| {
demo_windows.ui(ui);
});
});
c.bench_function("demo_only_tessellate", |b| {
b.iter(|| ctx.tessellate(full_output.shapes.clone(), full_output.pixels_per_point));
@@ -58,7 +64,9 @@ pub fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("demo_full_no_tessellate", |b| {
b.iter(|| {
ctx.run(RawInput::default(), |ctx| {
demo_windows.ui(ctx);
egui::CentralPanel::default().show(ctx, |ui| {
demo_windows.ui(ui);
});
})
});
});