Revert "compositor: Create a single cross-process compositor API (#33619)" (#33645)

This reverts commit f2f5614ad6.

This is causing intermittent crashes: https://github.com/servo/servo/actions/runs/11167043809/job/31044255019

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2024-10-04 11:08:19 +02:00 committed by GitHub
parent 826e31eaa5
commit 48f8ff6236
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 799 additions and 545 deletions

View file

@ -58,9 +58,7 @@ use style_traits::{CSSPixel, SpeculativePainter};
use webgpu::WebGPUMsg;
use webrender_api::units::{DeviceIntSize, DevicePixel, LayoutPixel};
use webrender_api::{DocumentId, ExternalScrollId, ImageKey};
use webrender_traits::{
CrossProcessCompositorApi, UntrustedNodeAddress as WebRenderUntrustedNodeAddress,
};
use webrender_traits::{UntrustedNodeAddress as WebRenderUntrustedNodeAddress, WebRenderScriptApi};
pub use crate::script_msg::{
DOMMessage, EventResult, HistoryEntryReplacement, IFrameSizeMsg, Job, JobError, JobResult,
@ -661,8 +659,8 @@ pub struct InitialScriptState {
pub webxr_registry: webxr_api::Registry,
/// The Webrender document ID associated with this thread.
pub webrender_document: DocumentId,
/// Access to the compositor across a process boundary.
pub compositor_api: CrossProcessCompositorApi,
/// FIXME(victor): The Webrender API sender in this constellation's pipeline
pub webrender_api_sender: WebRenderScriptApi,
/// Application window's GL Context for Media player
pub player_context: WindowGLContext,
}

View file

@ -24,6 +24,7 @@ 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,
@ -244,6 +245,12 @@ 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),
@ -311,6 +318,9 @@ impl fmt::Debug for ScriptMsg {
PipelineExited => "PipelineExited",
ForwardDOMMessage(..) => "ForwardDOMMessage",
ScheduleJob(..) => "ScheduleJob",
GetClientWindow(..) => "GetClientWindow",
GetScreenSize(..) => "GetScreenSize",
GetScreenAvailSize(..) => "GetScreenAvailSize",
MediaSessionEvent(..) => "MediaSessionEvent",
RequestAdapter(..) => "RequestAdapter",
GetWebGPUChan(..) => "GetWebGPUChan",