pixels: Actually write pixels in MULTIPLY generic_transform_inplace operations (#36895)

Multiply operations applied in `generic_transform_inplace` were
calculating the new pixel values, but not actually writing them.
This changes fixes that issue.

Testing: /webgl/tests/conformance/context/premultiplyalpha-test.html
Fixes: #35759

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
Andrei Volykhin 2025-05-08 10:38:02 +03:00 committed by GitHub
parent c6de8fc8e6
commit bc9f55bcc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 11 deletions

View file

@ -294,9 +294,10 @@ pub fn generic_transform_inplace<
match MULTIPLY {
1 => {
let a = rgba[3];
multiply_u8_color(rgba[0], a);
multiply_u8_color(rgba[1], a);
multiply_u8_color(rgba[2], a);
rgba[0] = multiply_u8_color(rgba[0], a);
rgba[1] = multiply_u8_color(rgba[1], a);
rgba[2] = multiply_u8_color(rgba[2], a);
},
2 => {
let a = rgba[3] as u32;

View file

@ -1,8 +0,0 @@
[premultiplyalpha-test.html]
bug: https://github.com/servo/servo/issues/21132
[WebGL test #62]
expected: FAIL
[WebGL test #69]
expected: FAIL