mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
This reverts commitfb1c0a4c48
. Previously in `create_compositor_channel`, the [routing callback][1] was setup so that a message received on the Compositor's IPC receiver will be forwarded to the local receiver using the `CompositorProxy` which also takes care of waking up the event loop. In #38782, this was changed so that the routing callbacks simply forwards the message directly without going via the `CompositorProxy`. This breaks behaviours that rely on the event loop being woken up on message sending, e.g. updating image frames for animated gifs. Since the GenericChannel API doesn't allow custom routing callbacks, revert this change until we figure out a better solution. [1]:d2ccce6052/components/servo/lib.rs (L1114)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
26fb603d15
commit
c75995ec87
9 changed files with 42 additions and 96 deletions
|
@ -11,9 +11,9 @@ use std::rc::Rc;
|
|||
use std::sync::Arc;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use base::Epoch;
|
||||
use base::cross_process_instant::CrossProcessInstant;
|
||||
use base::id::{PipelineId, WebViewId};
|
||||
use base::{Epoch, generic_channel};
|
||||
use bitflags::bitflags;
|
||||
use compositing_traits::display_list::{CompositorDisplayListInfo, ScrollTree, ScrollType};
|
||||
use compositing_traits::rendering_context::RenderingContext;
|
||||
|
@ -22,7 +22,7 @@ use compositing_traits::{
|
|||
WebViewTrait,
|
||||
};
|
||||
use constellation_traits::{EmbedderToConstellationMessage, PaintMetricEvent};
|
||||
use crossbeam_channel::Sender;
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use dpi::PhysicalSize;
|
||||
use embedder_traits::{CompositorHitTestResult, InputEvent, ShutdownState, ViewportDetails};
|
||||
use euclid::{Point2D, Rect, Scale, Size2D, Transform3D};
|
||||
|
@ -92,7 +92,7 @@ pub struct ServoRenderer {
|
|||
shutdown_state: Rc<Cell<ShutdownState>>,
|
||||
|
||||
/// The port on which we receive messages.
|
||||
compositor_receiver: generic_channel::RoutedReceiver<CompositorMsg>,
|
||||
compositor_receiver: Receiver<CompositorMsg>,
|
||||
|
||||
/// The channel on which messages can be sent to the constellation.
|
||||
pub(crate) constellation_sender: Sender<EmbedderToConstellationMessage>,
|
||||
|
@ -1388,7 +1388,7 @@ impl IOCompositor {
|
|||
}
|
||||
|
||||
/// Get the message receiver for this [`IOCompositor`].
|
||||
pub fn receiver(&self) -> Ref<'_, generic_channel::RoutedReceiver<CompositorMsg>> {
|
||||
pub fn receiver(&self) -> Ref<'_, Receiver<CompositorMsg>> {
|
||||
Ref::map(self.global.borrow(), |global| &global.compositor_receiver)
|
||||
}
|
||||
|
||||
|
|
|
@ -7,11 +7,10 @@
|
|||
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::Sender;
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use embedder_traits::{EventLoopWaker, ShutdownState};
|
||||
use profile_traits::{mem, time};
|
||||
use webrender::RenderApi;
|
||||
|
@ -33,7 +32,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: generic_channel::RoutedReceiver<CompositorMsg>,
|
||||
pub receiver: Receiver<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