mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Instead of exposing many different kinds of messages to the compositor that are routed through the constellation, expose a single message type which can be sent across IPC channels. In addition, this IPC channel and the route to the crossbeam channel with the compositor is created along with the `CompositorProxy`, simplifying what needs to be passed around during pipeline initialization. Previously, some image updates (from video) were sent over IPC with a special serialization routine and some were sent via crossbeam channels (canvas). Now all updates go over the IPC channel `IpcSharedMemory` is used to avoid serialization penalties. This should improve performance and reduce copies for video, but add a memory copy overhead for canvas. This will improve in the future when canvas renders directly into a texture. All-in-all this is a simplification which opens the path toward having a standard compositor API and reduces the number of duplicate messages and proxying that had to happen in libservo. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
30cbf01280
commit
9195344b75
28 changed files with 547 additions and 800 deletions
|
@ -536,10 +536,10 @@ impl WindowMethods for Window {
|
|||
EmbedderCoordinates {
|
||||
viewport,
|
||||
framebuffer: viewport.size(),
|
||||
window: (window_size, window_origin),
|
||||
screen,
|
||||
window_rect: DeviceIntRect::from_origin_and_size(window_origin, window_size),
|
||||
screen_size: screen,
|
||||
// FIXME: Winit doesn't have API for available size. Fallback to screen size
|
||||
screen_avail: screen,
|
||||
available_screen_size: screen,
|
||||
hidpi_factor: self.hidpi_factor(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,9 +167,9 @@ impl WindowMethods for Window {
|
|||
EmbedderCoordinates {
|
||||
viewport,
|
||||
framebuffer: size,
|
||||
window: (size, Point2D::zero()),
|
||||
screen: size,
|
||||
screen_avail: size,
|
||||
window_rect: DeviceIntRect::from_origin_and_size(Point2D::zero(), size),
|
||||
screen_size: size,
|
||||
available_screen_size: size,
|
||||
hidpi_factor: dpr,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ use servo::script_traits::{
|
|||
};
|
||||
use servo::servo_url::ServoUrl;
|
||||
use servo::style_traits::DevicePixel;
|
||||
use servo::webrender_api::units::DeviceIntRect;
|
||||
use servo::webrender_api::ScrollLocation;
|
||||
use servo::webrender_traits::RenderingContext;
|
||||
use servo::{gl, Servo, TopLevelBrowsingContextId};
|
||||
|
@ -693,9 +694,9 @@ impl WindowMethods for ServoWindowCallbacks {
|
|||
EmbedderCoordinates {
|
||||
viewport: coords.viewport.to_box2d(),
|
||||
framebuffer: coords.framebuffer,
|
||||
window: (coords.viewport.size, Point2D::new(0, 0)),
|
||||
screen: coords.viewport.size,
|
||||
screen_avail: coords.viewport.size,
|
||||
window_rect: DeviceIntRect::from_origin_and_size(Point2D::zero(), coords.viewport.size),
|
||||
screen_size: coords.viewport.size,
|
||||
available_screen_size: coords.viewport.size,
|
||||
hidpi_factor: Scale::new(self.density),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue