Clear texture uploads in the headless gradient swatch fixture

This commit is contained in:
yoriswind committed 2026-12-01 02:00:01 -08:00
1 parent 384e00d9f2
commit f2bb1978b4
1 file changed
+3 -1
@@ -28,9 +28,11 @@ fn classic_gradient_opacity_changes_the_painted_swatch_only_in_classic_mode() {
let draw = |app: &mut PhotocraftApp, alpha: f32| {
let rect = Rect::from_min_size(Pos2::ZERO, vec2(1400.0, 180.0));
let output = 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| {
ui.horizontal(|ui| super::bar(app, ui));
});
// This fixture inspects the paint shapes without a renderer.
output.textures_delta.clear();
let expected = Color32::from(Srgba::new(1.0, 0.0, 1.0, alpha));
assert!(output.shapes.iter().any(|clipped| mesh_has_color(&clipped.shape, expected)), "the swatch paints at alpha {alpha}");
};