mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix the LUMINANCE 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 format.
This commit is contained in:
parent
9a362391d5
commit
e61c7b757f
5 changed files with 26 additions and 1243 deletions
|
@ -4035,10 +4035,7 @@ fn rgba8_image_to_tex_image_data(
|
|||
},
|
||||
(TexFormat::Luminance, TexDataType::UnsignedByte) => {
|
||||
for i in 0..pixel_count {
|
||||
let p = {
|
||||
let rgb = &pixels[i * 4..i * 4 + 3];
|
||||
luminance(rgb[0], rgb[1], rgb[2])
|
||||
};
|
||||
let p = pixels[i * 4];
|
||||
pixels[i] = p;
|
||||
}
|
||||
pixels.truncate(pixel_count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue