mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove some as_slice calls.
This commit is contained in:
parent
4ee89363fb
commit
6a55ae06d7
34 changed files with 79 additions and 79 deletions
|
@ -133,8 +133,8 @@ impl<'a> PaintContext<'a> {
|
|||
image_rendering: image_rendering::T) {
|
||||
let size = Size2D(image.width as i32, image.height as i32);
|
||||
let (pixel_width, pixels, source_format) = match image.pixels {
|
||||
PixelsByColorType::RGBA8(ref pixels) => (4, pixels.as_slice(), SurfaceFormat::B8G8R8A8),
|
||||
PixelsByColorType::K8(ref pixels) => (1, pixels.as_slice(), SurfaceFormat::A8),
|
||||
PixelsByColorType::RGBA8(ref pixels) => (4, pixels, SurfaceFormat::B8G8R8A8),
|
||||
PixelsByColorType::K8(ref pixels) => (1, pixels, SurfaceFormat::A8),
|
||||
PixelsByColorType::RGB8(_) => panic!("RGB8 color type not supported"),
|
||||
PixelsByColorType::KA8(_) => panic!("KA8 color type not supported"),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue