1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Remove viewport_id from tessellate and added tessellate_for

This commit is contained in:
Konkitoman
2023-11-08 07:36:36 +02:00
parent 12f3782721
commit f174467d42
5 changed files with 24 additions and 19 deletions

View File

@@ -18,8 +18,6 @@ pub mod easy_mark;
pub use color_test::ColorTest;
pub use demo::DemoWindows;
#[cfg(test)]
use egui::ViewportId;
/// View some Rust code with syntax highlighting and selection.
pub(crate) fn rust_view_ui(ui: &mut egui::Ui, code: &str) {
@@ -79,7 +77,7 @@ fn test_egui_e2e() {
let full_output = ctx.run(raw_input.clone(), |ctx| {
demo_windows.ui(ctx);
});
let clipped_primitives = ctx.tessellate(full_output.shapes, ViewportId::ROOT);
let clipped_primitives = ctx.tessellate(full_output.shapes);
assert!(!clipped_primitives.is_empty());
}
}
@@ -98,7 +96,7 @@ fn test_egui_zero_window_size() {
let full_output = ctx.run(raw_input.clone(), |ctx| {
demo_windows.ui(ctx);
});
let clipped_primitives = ctx.tessellate(full_output.shapes, ViewportId::ROOT);
let clipped_primitives = ctx.tessellate(full_output.shapes);
assert!(
clipped_primitives.is_empty(),
"There should be nothing to show, has at least one primitive with clip_rect: {:?}",