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

Introduce ViewportInfo

This commit is contained in:
Konkitoman
2023-11-08 07:29:00 +02:00
parent 0d7c87836c
commit 12f3782721
12 changed files with 102 additions and 106 deletions

View File

@@ -19,7 +19,7 @@ pub mod easy_mark;
pub use color_test::ColorTest;
pub use demo::DemoWindows;
#[cfg(test)]
use egui::{ViewportId, ViewportIdPair};
use egui::ViewportId;
/// View some Rust code with syntax highlighting and selection.
pub(crate) fn rust_view_ui(ui: &mut egui::Ui, code: &str) {
@@ -76,7 +76,7 @@ fn test_egui_e2e() {
const NUM_FRAMES: usize = 5;
for _ in 0..NUM_FRAMES {
let full_output = ctx.run(raw_input.clone(), ViewportIdPair::ROOT, |ctx| {
let full_output = ctx.run(raw_input.clone(), |ctx| {
demo_windows.ui(ctx);
});
let clipped_primitives = ctx.tessellate(full_output.shapes, ViewportId::ROOT);
@@ -95,7 +95,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(), ViewportIdPair::ROOT, |ctx| {
let full_output = ctx.run(raw_input.clone(), |ctx| {
demo_windows.ui(ctx);
});
let clipped_primitives = ctx.tessellate(full_output.shapes, ViewportId::ROOT);