From a8e3f54384501c671f2dab0f40fdc9b5720b33b1 Mon Sep 17 00:00:00 2001 From: Sangeun Kim Date: Wed, 20 Nov 2013 11:52:47 +0900 Subject: [PATCH] Remove unused files --- src/components/gfx/gfx.rc | 1 - src/components/gfx/native.rs | 13 ------------- src/components/gfx/surface.rs | 36 ----------------------------------- 3 files changed, 50 deletions(-) delete mode 100644 src/components/gfx/native.rs delete mode 100644 src/components/gfx/surface.rs diff --git a/src/components/gfx/gfx.rc b/src/components/gfx/gfx.rc index 4e882ba57b4..0fe77c73fb0 100644 --- a/src/components/gfx/gfx.rc +++ b/src/components/gfx/gfx.rc @@ -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; diff --git a/src/components/gfx/native.rs b/src/components/gfx/native.rs deleted file mode 100644 index c54196536b1..00000000000 --- a/src/components/gfx/native.rs +++ /dev/null @@ -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; diff --git a/src/components/gfx/surface.rs b/src/components/gfx/surface.rs deleted file mode 100644 index b30c165c08b..00000000000 --- a/src/components/gfx/surface.rs +++ /dev/null @@ -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, - format: format, - buffer: ~[u8] -} - -impl ImageSurface { - pub fn new(size: Size2D, format: format) -> ImageSurface { - ImageSurface { - size: size.clone(), - format: format, - buffer: vec::from_elem((size.area() as uint) * format.bpp(), 0u8) - } - } -}