auto merge of #1291 : sammykim/servo/unused-file, r=jdm

This commit is contained in:
bors-servo 2013-11-19 20:13:28 -08:00
commit 7d7f89c509
3 changed files with 0 additions and 50 deletions

View file

@ -45,7 +45,6 @@ mod render_context;
pub mod color;
pub mod display_list;
pub mod render_task;
pub mod surface;
// Fonts
pub mod font;

View file

@ -1,13 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This file exists just to make it easier to import platform-specific
implementations.
Note that you still must define each of the files as a module in
servo_gfx.rc. This is not ideal and may be changed in the future. */
pub use font::FontHandle;
pub use font_context::FontContextHandle;
pub use font_list::FontListHandle;

View file

@ -1,36 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::vec;
use geom::size::Size2D;
#[deriving(Eq)]
pub enum format {
fo_rgba_8888
// TODO: RGB 565, others?
}
impl format {
fn bpp(self) -> uint {
match self {
fo_rgba_8888 => 32u
}
}
}
pub struct ImageSurface {
size: Size2D<int>,
format: format,
buffer: ~[u8]
}
impl ImageSurface {
pub fn new(size: Size2D<int>, format: format) -> ImageSurface {
ImageSurface {
size: size.clone(),
format: format,
buffer: vec::from_elem((size.area() as uint) * format.bpp(), 0u8)
}
}
}