mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 07:10:04 -04:00
Avoid deadlocks by using lambdas for context lock (#2625)
ctx.input().key_pressed(Key::A) -> ctx.input(|i| i.key_pressed(Key::A))
This commit is contained in:
@@ -38,7 +38,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
|
||||
if false {
|
||||
let ctx = egui::Context::default();
|
||||
ctx.memory().set_everything_is_visible(true); // give us everything
|
||||
ctx.memory_mut(|m| m.set_everything_is_visible(true)); // give us everything
|
||||
let mut demo_windows = egui_demo_lib::DemoWindows::default();
|
||||
c.bench_function("demo_full_no_tessellate", |b| {
|
||||
b.iter(|| {
|
||||
|
||||
Reference in New Issue
Block a user