mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove some boolean flags in tex_image_2d and tex_sub_image_2d
This commit is contained in:
parent
3f8a3b2887
commit
947e5afa0c
2 changed files with 89 additions and 30 deletions
|
@ -757,6 +757,24 @@ impl TexDataType {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
|
||||
pub enum AlphaTreatment {
|
||||
Premultiply,
|
||||
Unmultiply,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
|
||||
pub enum YAxisTreatment {
|
||||
AsIs,
|
||||
Flipped,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
|
||||
pub enum TexSource {
|
||||
FromHtmlElement,
|
||||
FromArray,
|
||||
}
|
||||
|
||||
/// Translates an image in rgba8 (red in the first byte) format to
|
||||
/// the format that was requested of TexImage.
|
||||
pub fn rgba8_image_to_tex_image_data(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue