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

Optimize tessellator by around 9%

This commit is contained in:
Emil Ernerfeldt
2021-03-30 22:36:45 +02:00
parent 8c4bb0d1d9
commit 17983e1bbc
2 changed files with 14 additions and 8 deletions

View File

@@ -44,13 +44,15 @@ pub fn criterion_benchmark(c: &mut Criterion) {
{
let mut ctx = egui::CtxRef::default();
ctx.memory().set_everything_is_visible(true); // give us everything
// ctx.memory().set_everything_is_visible(true); // give us everything
let mut demo_windows = egui_demo_lib::DemoWindows::default();
ctx.begin_frame(raw_input.clone());
demo_windows.ui(&ctx);
let (_, shapes) = ctx.end_frame();
c.bench_function("tessellate", |b| b.iter(|| ctx.tessellate(shapes.clone())));
c.bench_function("demo_windows_minimal_tessellate", |b| {
b.iter(|| ctx.tessellate(shapes.clone()))
});
}
{