mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +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
|
@ -7,10 +7,11 @@
|
|||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
|
||||
use base::generic_channel;
|
||||
use compositing_traits::rendering_context::RenderingContext;
|
||||
use compositing_traits::{CompositorMsg, CompositorProxy};
|
||||
use constellation_traits::EmbedderToConstellationMessage;
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use crossbeam_channel::Sender;
|
||||
use embedder_traits::{EventLoopWaker, ShutdownState};
|
||||
use profile_traits::{mem, time};
|
||||
use webrender::RenderApi;
|
||||
|
@ -32,7 +33,7 @@ pub struct InitialCompositorState {
|
|||
/// A channel to the compositor.
|
||||
pub sender: CompositorProxy,
|
||||
/// A port on which messages inbound to the compositor can be received.
|
||||
pub receiver: Receiver<CompositorMsg>,
|
||||
pub receiver: generic_channel::RoutedReceiver<CompositorMsg>,
|
||||
/// A channel to the constellation.
|
||||
pub constellation_chan: Sender<EmbedderToConstellationMessage>,
|
||||
/// A channel to the time profiler thread.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue