diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-10-09 10:30:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-09 17:30:24 +0000 |
commit | 9195344b75b4e5fd1cd86671b10df46a956f0fea (patch) | |
tree | 20ef541e886032195be6ae57403e4c05ff438c26 /components/shared/script/script_msg.rs | |
parent | 30cbf01280dc3aa03caeaba11f55808f7ba59cf3 (diff) | |
download | servo-9195344b75b4e5fd1cd86671b10df46a956f0fea.tar.gz servo-9195344b75b4e5fd1cd86671b10df46a956f0fea.zip |
compositor: Create a single cross-process compositor API (#33619) (#33660)
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>
Diffstat (limited to 'components/shared/script/script_msg.rs')
-rw-r--r-- | components/shared/script/script_msg.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/components/shared/script/script_msg.rs b/components/shared/script/script_msg.rs index ee8e8da1386..5689395ef32 100644 --- a/components/shared/script/script_msg.rs +++ b/components/shared/script/script_msg.rs @@ -24,7 +24,6 @@ use serde::{Deserialize, Serialize}; use servo_url::{ImmutableOrigin, ServoUrl}; use style_traits::CSSPixel; use webgpu::{wgc, WebGPU, WebGPUResponse}; -use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; use crate::{ AnimationState, AuxiliaryBrowsingContextLoadInfo, BroadcastMsg, DocumentState, @@ -245,12 +244,6 @@ pub enum ScriptMsg { ForwardDOMMessage(DOMMessage, ServoUrl), /// <https://w3c.github.io/ServiceWorker/#schedule-job-algorithm> ScheduleJob(Job), - /// Get Window Informations size and position - GetClientWindow(IpcSender<(DeviceIntSize, DeviceIntPoint)>), - /// Get the screen size (pixel) - GetScreenSize(IpcSender<DeviceIntSize>), - /// Get the available screen size (pixel) - GetScreenAvailSize(IpcSender<DeviceIntSize>), /// Notifies the constellation about media session events /// (i.e. when there is metadata for the active media session, playback state changes...). MediaSessionEvent(PipelineId, MediaSessionEvent), @@ -318,9 +311,6 @@ impl fmt::Debug for ScriptMsg { PipelineExited => "PipelineExited", ForwardDOMMessage(..) => "ForwardDOMMessage", ScheduleJob(..) => "ScheduleJob", - GetClientWindow(..) => "GetClientWindow", - GetScreenSize(..) => "GetScreenSize", - GetScreenAvailSize(..) => "GetScreenAvailSize", MediaSessionEvent(..) => "MediaSessionEvent", RequestAdapter(..) => "RequestAdapter", GetWebGPUChan(..) => "GetWebGPUChan", |