compositing: Only recomposite after a scroll if layers actually moved,

and fix the jerky scrolling "pops" during flings on Mac.

See the comments in compositor.rs for more details.

Requires servo/webrender#302 and servo/webrender_traits#64.
This commit is contained in:
Patrick Walton 2016-06-29 16:52:35 -07:00 committed by Ms2ger
parent 8052f5b80d
commit 90e970a6d2
4 changed files with 90 additions and 23 deletions

View file

@ -185,6 +185,9 @@ pub enum Msg {
GetScrollOffset(PipelineId, LayerId, IpcSender<Point2D<f32>>),
/// Pipeline visibility changed
PipelineVisibilityChanged(PipelineId, bool),
/// WebRender has successfully processed a scroll. The boolean specifies whether a composite is
/// needed.
NewScrollFrameReady(bool),
/// A pipeline was shut down.
// This message acts as a synchronization point between the constellation,
// when it shuts down a pipeline, to the compositor; when the compositor
@ -228,6 +231,7 @@ impl Debug for Msg {
Msg::PipelineVisibilityChanged(..) => write!(f, "PipelineVisibilityChanged"),
Msg::PipelineExited(..) => write!(f, "PipelineExited"),
Msg::GetScrollOffset(..) => write!(f, "GetScrollOffset"),
Msg::NewScrollFrameReady(..) => write!(f, "NewScrollFrameReady"),
}
}
}