mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
GenericChannel: Migrate compositor channels to GenericChannel (#38782)
Besides migrating the channel to GenericChannel, this PR adds `routed_channel_with_local_sender()` to `generic_channel`. This is for existing use-cases, where we want to provide both an IPC capable GenericSender, as well as a crossbeam Sender, for efficient sending if the sender is in the same process. Testing: All of our channels should send / receive at least some messages during WPT tests. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
7441944e36
commit
fb1c0a4c48
9 changed files with 98 additions and 43 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use base::generic_channel::GenericSender;
|
||||
use base::id::PipelineId;
|
||||
use constellation_traits::{ScriptToConstellationChan, ScriptToConstellationMessage};
|
||||
use crossbeam_channel::Sender;
|
||||
|
@ -199,7 +200,7 @@ pub(crate) struct WorkletGlobalScopeInit {
|
|||
/// Channel to devtools
|
||||
pub(crate) devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||
/// Messages to send to constellation
|
||||
pub(crate) to_constellation_sender: IpcSender<(PipelineId, ScriptToConstellationMessage)>,
|
||||
pub(crate) to_constellation_sender: GenericSender<(PipelineId, ScriptToConstellationMessage)>,
|
||||
/// The image cache
|
||||
pub(crate) image_cache: Arc<dyn ImageCache>,
|
||||
/// Identity manager for WebGPU resources
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue