Skip to content

Commit

Permalink
A few fixes to the compositor for WebRender
Browse files Browse the repository at this point in the history
  • Loading branch information
pcwalton authored and jdm committed Jul 9, 2019
1 parent 2f9c9ce commit ae42048
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions components/compositing/compositor.rs
Expand Up @@ -43,7 +43,8 @@ use style_traits::viewport::ViewportConstraints;
use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
use time::{now, precise_time_ns, precise_time_s};
use webrender_api::{self, HitTestFlags, HitTestResult, ScrollLocation};
use webrender_api::units::{DeviceIntPoint, DevicePoint, FramebufferIntSize, LayoutVector2D};
use webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePoint};
use webrender_api::units::{FramebufferIntSize, LayoutVector2D};
use webvr_traits::WebVRMainThreadHeartbeat;

#[derive(Debug, PartialEq)]
Expand Down Expand Up @@ -1280,7 +1281,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|| {
debug!("compositor: compositing");

let size = FramebufferIntSize::from_untyped(
let size = DeviceIntSize::from_untyped(
&self.embedder_coordinates.framebuffer.to_untyped(),
);

Expand Down
4 changes: 2 additions & 2 deletions components/compositing/windowing.rs
Expand Up @@ -197,10 +197,10 @@ pub struct EmbedderCoordinates {
}

impl EmbedderCoordinates {
pub fn get_flipped_viewport(&self) -> FramebufferIntRect {
pub fn get_flipped_viewport(&self) -> DeviceIntRect {
let fb_height = self.framebuffer.height;
let mut view = self.viewport.clone();
view.origin.y = fb_height - view.origin.y - view.size.height;
FramebufferIntRect::from_untyped(&view.to_untyped())
DeviceIntRect::from_untyped(&view.to_untyped())
}
}

0 comments on commit ae42048

Please sign in to comment.