Update webrender

This commit is contained in:
Manish Goregaokar 2018-11-20 17:02:17 -08:00
parent 482923cec2
commit 5413328be2
20 changed files with 138 additions and 122 deletions

View file

@ -1182,8 +1182,12 @@ impl<Window: WindowMethods> IOCompositor<Window> {
&mut self,
target: CompositeTarget,
) -> Result<Option<Image>, UnableToComposite> {
let width = self.embedder_coordinates.framebuffer.width_typed();
let height = self.embedder_coordinates.framebuffer.height_typed();
let width = self.embedder_coordinates.framebuffer.to_u32().width_typed();
let height = self
.embedder_coordinates
.framebuffer
.to_u32()
.height_typed();
if !self.window.prepare_for_composite() {
return Err(UnableToComposite::WindowUnprepared);
}

View file

@ -17,7 +17,7 @@ use profile_traits::time;
use script_traits::{AnimationState, ConstellationMsg, EventResult};
use std::fmt::{Debug, Error, Formatter};
use style_traits::viewport::ViewportConstraints;
use webrender_api::{self, DeviceIntPoint, DeviceUintSize};
use webrender_api::{self, DeviceIntPoint, DeviceIntSize};
/// Sends messages to the compositor.
pub struct CompositorProxy {
@ -106,11 +106,11 @@ pub enum Msg {
LoadComplete(TopLevelBrowsingContextId),
/// Get Window Informations size and position.
GetClientWindow(IpcSender<(DeviceUintSize, DeviceIntPoint)>),
GetClientWindow(IpcSender<(DeviceIntSize, DeviceIntPoint)>),
/// Get screen size.
GetScreenSize(IpcSender<DeviceUintSize>),
GetScreenSize(IpcSender<DeviceIntSize>),
/// Get screen available size.
GetScreenAvailSize(IpcSender<DeviceUintSize>),
GetScreenAvailSize(IpcSender<DeviceIntSize>),
}
impl Debug for Msg {

View file

@ -17,7 +17,7 @@ use std::fmt::{Debug, Error, Formatter};
#[cfg(feature = "gl")]
use std::rc::Rc;
use style_traits::DevicePixel;
use webrender_api::{DeviceIntPoint, DevicePoint, DeviceUintRect, DeviceUintSize, ScrollLocation};
use webrender_api::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePoint, ScrollLocation};
#[derive(Clone)]
pub enum MouseWindowEvent {
@ -149,13 +149,13 @@ pub struct EmbedderCoordinates {
/// The pixel density of the display.
pub hidpi_factor: TypedScale<f32, DeviceIndependentPixel, DevicePixel>,
/// Size of the screen.
pub screen: DeviceUintSize,
pub screen: DeviceIntSize,
/// Size of the available screen space (screen without toolbars and docks).
pub screen_avail: DeviceUintSize,
pub screen_avail: DeviceIntSize,
/// Size of the native window.
pub window: (DeviceUintSize, DeviceIntPoint),
pub window: (DeviceIntSize, DeviceIntPoint),
/// Size of the GL buffer in the window.
pub framebuffer: DeviceUintSize,
pub framebuffer: DeviceIntSize,
/// Coordinates of the document within the framebuffer.
pub viewport: DeviceUintRect,
pub viewport: DeviceIntRect,
}