mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Fix the UNSIGNED_SHORT_5_5_5_1 case of premultiply_pixels
This commit is contained in:
parent
f726f18291
commit
d8b7394fa3
2 changed files with 3 additions and 8 deletions
|
@ -645,8 +645,9 @@ impl WebGLRenderingContext {
|
|||
},
|
||||
(TexFormat::RGBA, TexDataType::UnsignedShort5551) => {
|
||||
for rgba in pixels.chunks_mut(2) {
|
||||
let pix = NativeEndian::read_u16(rgba);
|
||||
NativeEndian::write_u16(rgba, if pix & (1 << 15) != 0 { pix } else { 0 });
|
||||
if NativeEndian::read_u16(rgba) & 1 == 0 {
|
||||
NativeEndian::write_u16(rgba, 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
(TexFormat::RGBA, TexDataType::UnsignedShort4444) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue