mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Some more work on making possible to render viewport_sync in glutin
Context::current_rendering_viewport was replaced by Context::get_viewport_id Added Context::get_parent_viewport_id Changed Context::run to need parent_viewport_id Changed Context::beagin to need parent_viewport_id Added ImplContext::frame_stack Some work on making posibile to render multiples frames at the same time A lot of more things in glutin backend is not Arc<RwLock<T>>
This commit is contained in:
@@ -13,7 +13,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
// The most end-to-end benchmark.
|
||||
c.bench_function("demo_with_tessellate__realistic", |b| {
|
||||
b.iter(|| {
|
||||
let full_output = ctx.run(RawInput::default(), 0, |ctx| {
|
||||
let full_output = ctx.run(RawInput::default(), 0, 0, |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
});
|
||||
ctx.tessellate(full_output.shapes)
|
||||
@@ -22,13 +22,13 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
|
||||
c.bench_function("demo_no_tessellate", |b| {
|
||||
b.iter(|| {
|
||||
ctx.run(RawInput::default(), 0, |ctx| {
|
||||
ctx.run(RawInput::default(), 0, 0, |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
let full_output = ctx.run(RawInput::default(), 0, |ctx| {
|
||||
let full_output = ctx.run(RawInput::default(), 0, 0, |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
});
|
||||
c.bench_function("demo_only_tessellate", |b| {
|
||||
@@ -42,7 +42,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
let mut demo_windows = egui_demo_lib::DemoWindows::default();
|
||||
c.bench_function("demo_full_no_tessellate", |b| {
|
||||
b.iter(|| {
|
||||
ctx.run(RawInput::default(), 0, |ctx| {
|
||||
ctx.run(RawInput::default(), 0, 0, |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
})
|
||||
});
|
||||
@@ -51,7 +51,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
|
||||
{
|
||||
let ctx = egui::Context::default();
|
||||
let _ = ctx.run(RawInput::default(), 0, |ctx| {
|
||||
let _ = ctx.run(RawInput::default(), 0, 0, |ctx| {
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
c.bench_function("label &str", |b| {
|
||||
b.iter(|| {
|
||||
@@ -69,7 +69,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
|
||||
{
|
||||
let ctx = egui::Context::default();
|
||||
ctx.begin_frame(RawInput::default(), 0);
|
||||
ctx.begin_frame(RawInput::default(), 0, 0);
|
||||
|
||||
egui::CentralPanel::default().show(&ctx, |ui| {
|
||||
c.bench_function("Painter::rect", |b| {
|
||||
|
||||
@@ -68,7 +68,7 @@ fn test_egui_e2e() {
|
||||
|
||||
const NUM_FRAMES: usize = 5;
|
||||
for _ in 0..NUM_FRAMES {
|
||||
let full_output = ctx.run(raw_input.clone(), 0, |ctx| {
|
||||
let full_output = ctx.run(raw_input.clone(), 0, 0, |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
});
|
||||
let clipped_primitives = ctx.tessellate(full_output.shapes);
|
||||
@@ -87,7 +87,7 @@ fn test_egui_zero_window_size() {
|
||||
|
||||
const NUM_FRAMES: usize = 5;
|
||||
for _ in 0..NUM_FRAMES {
|
||||
let full_output = ctx.run(raw_input.clone(), 0, |ctx| {
|
||||
let full_output = ctx.run(raw_input.clone(), 0, 0, |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
});
|
||||
let clipped_primitives = ctx.tessellate(full_output.shapes);
|
||||
|
||||
Reference in New Issue
Block a user