diff options
Diffstat (limited to 'components/compositing/headless.rs')
-rw-r--r-- | components/compositing/headless.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/components/compositing/headless.rs b/components/compositing/headless.rs index d56c50de1d2..d8f952beada 100644 --- a/components/compositing/headless.rs +++ b/components/compositing/headless.rs @@ -7,6 +7,7 @@ use windowing::WindowEvent; use euclid::scale_factor::ScaleFactor; use euclid::size::Size2D; +use msg::constellation_msg::AnimationState; use msg::constellation_msg::Msg as ConstellationMsg; use msg::constellation_msg::{ConstellationChan, WindowSizeData}; use profile_traits::mem; @@ -88,6 +89,18 @@ impl CompositorEventListener for NullCompositor { response_chan.send(()).unwrap(); } + Msg::ChangeRunningAnimationsState(pipeline_id, animation_state) => { + match animation_state { + AnimationState::AnimationsPresent | + AnimationState::NoAnimationsPresent | + AnimationState::NoAnimationCallbacksPresent => {} + AnimationState::AnimationCallbacksPresent => { + let msg = ConstellationMsg::TickAnimation(pipeline_id); + self.constellation_chan.0.send(msg).unwrap() + } + } + } + // Explicitly list ignored messages so that when we add a new one, // we'll notice and think about whether it needs a response, like // SetFrameTree. @@ -95,7 +108,6 @@ impl CompositorEventListener for NullCompositor { Msg::InitializeLayersForPipeline(..) | Msg::SetLayerRect(..) | Msg::AssignPaintedBuffers(..) | - Msg::ChangeRunningAnimationsState(..) | Msg::ScrollFragmentPoint(..) | Msg::Status(..) | Msg::LoadStart(..) | |