Skip to content

Commit

Permalink
remove WindowMethods::size()
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrouget committed Mar 16, 2018
1 parent e25dd45 commit fef0506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions components/compositing/windowing.rs
Expand Up @@ -17,7 +17,7 @@ use std::fmt::{Debug, Error, Formatter};
use std::rc::Rc;
use style_traits::DevicePixel;
use style_traits::cursor::CursorKind;
use webrender_api::{DeviceIntPoint, DeviceSize, DevicePoint, DeviceUintSize, DeviceUintRect, ScrollLocation};
use webrender_api::{DeviceIntPoint, DevicePoint, DeviceUintSize, DeviceUintRect, ScrollLocation};

#[derive(Clone)]
pub enum MouseWindowEvent {
Expand Down Expand Up @@ -122,8 +122,6 @@ pub trait WindowMethods {
fn framebuffer_size(&self) -> DeviceUintSize;
/// Returns the position and size of the window within the rendering area.
fn window_rect(&self) -> DeviceUintRect;
/// Returns the size of the window.
fn size(&self) -> DeviceSize;
/// Presents the window to the screen (perhaps by page flipping).
fn present(&self);

Expand Down
6 changes: 1 addition & 5 deletions ports/servo/glutin_app/window.rs
Expand Up @@ -868,7 +868,7 @@ impl WindowMethods for Window {
}

fn framebuffer_size(&self) -> DeviceUintSize {
self.size().to_u32()
(self.inner_size.get().to_f32() * self.hidpi_factor()).to_u32()
}

fn window_rect(&self) -> DeviceUintRect {
Expand All @@ -877,10 +877,6 @@ impl WindowMethods for Window {
DeviceUintRect::new(origin, size)
}

fn size(&self) -> TypedSize2D<f32, DevicePixel> {
self.inner_size.get().to_f32() * self.hidpi_factor()
}

fn client_window(&self, _: BrowserId) -> (DeviceUintSize, DeviceIntPoint) {
let (size, point) = match self.kind {
WindowKind::Window(ref window, ..) => {
Expand Down

0 comments on commit fef0506

Please sign in to comment.