mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix the LUMINANCE_ALPHA case of rgba8_image_to_tex_image_data
The internal format and format values match, thus the canvas or image input must be interpreted as already in LUMINANCE_ALPHA format.
This commit is contained in:
parent
9c1c58a498
commit
9a362391d5
5 changed files with 19 additions and 1233 deletions
|
@ -4048,7 +4048,7 @@ fn rgba8_image_to_tex_image_data(
|
|||
for i in 0..pixel_count {
|
||||
let (lum, a) = {
|
||||
let rgba = &pixels[i * 4..i * 4 + 4];
|
||||
(luminance(rgba[0], rgba[1], rgba[2]), rgba[3])
|
||||
(rgba[0], rgba[3])
|
||||
};
|
||||
pixels[i * 2] = lum;
|
||||
pixels[i * 2 + 1] = a;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue