mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Remove unused code from a bunch of crates
This commit is contained in:
parent
8b6ed3d182
commit
e64de8d90a
8 changed files with 6 additions and 74 deletions
|
@ -997,26 +997,6 @@ fn write_image(
|
|||
);
|
||||
}
|
||||
|
||||
pub trait PointToi32 {
|
||||
fn to_i32(&self) -> Point2D<i32>;
|
||||
}
|
||||
|
||||
impl PointToi32 for Point2D<f64> {
|
||||
fn to_i32(&self) -> Point2D<i32> {
|
||||
Point2D::new(self.x.to_i32().unwrap(), self.y.to_i32().unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
pub trait SizeToi32 {
|
||||
fn to_i32(&self) -> Size2D<i32>;
|
||||
}
|
||||
|
||||
impl SizeToi32 for Size2D<f64> {
|
||||
fn to_i32(&self) -> Size2D<i32> {
|
||||
Size2D::new(self.width.to_i32().unwrap(), self.height.to_i32().unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
pub trait RectToi32 {
|
||||
fn to_i32(&self) -> Rect<i32>;
|
||||
fn ceil(&self) -> Rect<f64>;
|
||||
|
|
|
@ -147,17 +147,6 @@ impl GLContextWrapper {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn unbind(&self) {
|
||||
match *self {
|
||||
GLContextWrapper::Native(ref ctx) => {
|
||||
ctx.unbind().unwrap();
|
||||
},
|
||||
GLContextWrapper::OSMesa(ref ctx) => {
|
||||
ctx.unbind().unwrap();
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn apply_command(
|
||||
&self,
|
||||
cmd: WebGLCommand,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue