mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update WR (CPU text optimizations, image format renames).
This commit is contained in:
parent
e3a52536b6
commit
e7b1e041c8
9 changed files with 39 additions and 39 deletions
|
@ -431,7 +431,7 @@ impl CanvasRenderingContext2D {
|
|||
|
||||
let image_size = Size2D::new(img.width as i32, img.height as i32);
|
||||
let image_data = match img.format {
|
||||
PixelFormat::RGBA8 => img.bytes.to_vec(),
|
||||
PixelFormat::BGRA8 => img.bytes.to_vec(),
|
||||
PixelFormat::K8 => panic!("K8 color type not supported"),
|
||||
PixelFormat::RGB8 => panic!("RGB8 color type not supported"),
|
||||
PixelFormat::KA8 => panic!("KA8 color type not supported"),
|
||||
|
|
|
@ -75,7 +75,7 @@ impl PaintWorkletGlobalScope {
|
|||
let image = Image {
|
||||
width: width,
|
||||
height: height,
|
||||
format: PixelFormat::RGBA8,
|
||||
format: PixelFormat::BGRA8,
|
||||
bytes: IpcSharedMemory::from_bytes(&*self.buffer.borrow()),
|
||||
id: None,
|
||||
};
|
||||
|
|
|
@ -690,9 +690,9 @@ impl WebGLRenderingContext {
|
|||
|
||||
let size = Size2D::new(img.width as i32, img.height as i32);
|
||||
|
||||
// For now Servo's images are all stored as RGBA8 internally.
|
||||
// For now Servo's images are all stored as BGRA8 internally.
|
||||
let mut data = match img.format {
|
||||
PixelFormat::RGBA8 => img.bytes.to_vec(),
|
||||
PixelFormat::BGRA8 => img.bytes.to_vec(),
|
||||
_ => unimplemented!(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue