aboutsummaryrefslogtreecommitdiffstats
path: root/components/pixels/lib.rs
diff options
context:
space:
mode:
authorAndrei Volykhin <andrei.volykhin@gmail.com>2025-05-08 10:38:02 +0300
committerGitHub <noreply@github.com>2025-05-08 07:38:02 +0000
commitbc9f55bcc9df08620d81c5c9e31e3a563be08428 (patch)
treef331c8f292675e0b1ea03c64e8c1886a771b99b1 /components/pixels/lib.rs
parentc6de8fc8e614d87d7b3b76040572388ba98650e6 (diff)
downloadservo-bc9f55bcc9df08620d81c5c9e31e3a563be08428.tar.gz
servo-bc9f55bcc9df08620d81c5c9e31e3a563be08428.zip
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>
Diffstat (limited to 'components/pixels/lib.rs')
-rw-r--r--components/pixels/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/pixels/lib.rs b/components/pixels/lib.rs
index 24386ff830a..c1f57875c6d 100644
--- a/components/pixels/lib.rs
+++ b/components/pixels/lib.rs
@@ -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;