mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Consume texture updates in Layer Edges paint tests
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user