mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add initial support for WebGL compressed textures
This commit is contained in:
parent
a14b952fa3
commit
7f0b820d4e
16 changed files with 792 additions and 37 deletions
|
@ -470,7 +470,24 @@ impl ImageInfo {
|
|||
}
|
||||
|
||||
fn is_compressed_format(&self) -> bool {
|
||||
// TODO: Once Servo supports compressed formats, check for them here
|
||||
false
|
||||
match self.internal_format {
|
||||
Some(format) => format.is_compressed(),
|
||||
None => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf)]
|
||||
pub enum TexCompressionValidation {
|
||||
None,
|
||||
S3TC,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf)]
|
||||
pub struct TexCompression {
|
||||
pub format: TexFormat,
|
||||
pub bytes_per_block: u8,
|
||||
pub block_width: u8,
|
||||
pub block_height: u8,
|
||||
pub validation: TexCompressionValidation,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue