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

Add a dummy warm-up frame to the demo app to pre-cache emojis

This commit is contained in:
Emil Ernerfeldt
2021-01-02 14:42:43 +01:00
parent 4202c4b6a9
commit 14a96ca5d0
14 changed files with 144 additions and 55 deletions

View File

@@ -18,7 +18,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
{
let mut ctx = egui::CtxRef::default();
ctx.memory().all_collpasing_are_open = true; // expand the demo window with everything
ctx.memory().set_everything_is_visible(true); // give us everything
let mut demo_windows = egui_demo_lib::DemoWindows::default();
c.bench_function("demo_windows_full", |b| {
@@ -32,7 +32,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
{
let mut ctx = egui::CtxRef::default();
ctx.memory().all_collpasing_are_open = true; // expand the demo window with 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);