test(gpu): cover clipped Dissolve opacity and fill parity

This commit is contained in:
Nigel Ihza Firdausy authored and Ni-zav committed 2026-10-19 07:18:54 +07:00
1 parent 9050e86dac
commit 2ef53bb673
1 file changed
+13
+13
View File
@@ -735,6 +735,19 @@ fn groups_masks_and_clipping() {
d.layers.extend([base, c1, c2]);
check(&mut g, &d, &format!("clipping hidden={hidden}"));
}
// #3052/#4921: a clipped Dissolve layer retains opacity/fill binary coverage
// across the partially covered clipping base; the GPU must match the CPU.
for (opacity, fill) in [(0.4, 1.0), (0.8, 0.5)] {
let mut d = base_doc(56, 44);
let base = noise_layer("base", PixelFormat::RGBA8, Rect::new(5, 6, 48, 40), 45, 0.0);
let mut clip = noise_layer("dissolve clip", PixelFormat::RGBA8, d.bounds(), 46, 0.0);
clip.clipped = true;
clip.blend = BlendMode::Dissolve;
clip.opacity = opacity;
clip.fill_opacity = fill;
d.layers.extend([base, clip]);
check(&mut g, &d, "clipped Dissolve opacity/fill CPU/GPU parity");
}
// Clipped group base (isolated) with a clipped layer.
let mut d = base_doc(56, 44);
let mut gb = Layer::group("gb", vec![child(18, BlendMode::Normal)]);