Consume texture updates in Layer Edges paint tests

This commit is contained in:
yoriswind committed 2026-11-30 15:00:02 -08:00
1 parent be84ea8814
commit d7f42fa770
1 file changed
+5 -2
@@ -30,6 +30,7 @@ fn blue_meshes(shapes: &[ClippedShape]) -> Vec<&Mesh> {
match shape {
egui::Shape::Mesh(mesh) if mesh.vertices.len() == 8 && mesh.vertices.iter().all(|v| v.color == BLUE) => found.push(mesh),
egui::Shape::Vec(shapes) => shapes.iter().for_each(|shape| add(shape, found)),
egui::Shape::PaintChunk(shapes) => shapes.iter().for_each(|clipped| add(&clipped.shape, found)),
_ => {}
}
}
@@ -67,9 +68,11 @@ fn canvas_draws_one_blue_device_pixel_inside_each_targeted_layer() {
let mut draw = |extras, layer_edges| {
app.ui.view.extras = extras;
app.ui.view.show.layer_edges = layer_edges;
ctx.run_ui(egui::RawInput { screen_rect: Some(rect), ..Default::default() }, |ui| {
let mut output = ctx.run_ui(egui::RawInput { screen_rect: Some(rect), ..Default::default() }, |ui| {
super::super::canvas_view(&mut app, ui, CanvasHost::main(0), rect, view.clone(), true);
})
});
output.textures_delta.clear();
output
};
let frame = draw(true, true);
assert_eq!(frame.pixels_per_point, ppp);