mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
compositor: Create a single cross-process compositor API (#33619)
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
986c3a38a3
commit
f2f5614ad6
28 changed files with 547 additions and 801 deletions
|
@ -10,7 +10,7 @@ use malloc_size_of_derive::MallocSizeOf;
|
|||
use pixels::{Image, ImageMetadata};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
use webrender_traits::WebRenderNetApi;
|
||||
use webrender_traits::CrossProcessCompositorApi;
|
||||
|
||||
use crate::request::CorsSettings;
|
||||
use crate::FetchResponseMsg;
|
||||
|
@ -99,7 +99,7 @@ pub enum ImageCacheResult {
|
|||
}
|
||||
|
||||
pub trait ImageCache: Sync + Send {
|
||||
fn new(webrender_api: WebRenderNetApi) -> Self
|
||||
fn new(compositor_api: CrossProcessCompositorApi) -> Self
|
||||
where
|
||||
Self: Sized;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue