mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Wait for actual paint before setting paint related metrics
This commit is contained in:
parent
1059ef4fde
commit
1b123400eb
16 changed files with 203 additions and 72 deletions
|
@ -1255,6 +1255,10 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
debug!("constellation got iframe size message");
|
||||
self.handle_iframe_size_msg(iframe_sizes);
|
||||
}
|
||||
FromLayoutMsg::PendingPaintMetric(pipeline_id, epoch) => {
|
||||
debug!("constellation got a pending paint metric message");
|
||||
self.handle_pending_paint_metric(pipeline_id, epoch);
|
||||
}
|
||||
FromLayoutMsg::SetCursor(cursor) => {
|
||||
self.handle_set_cursor_msg(cursor)
|
||||
}
|
||||
|
@ -1700,6 +1704,10 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
});
|
||||
}
|
||||
|
||||
fn handle_pending_paint_metric(&self, pipeline_id: PipelineId, epoch: Epoch) {
|
||||
self.compositor_proxy.send(ToCompositorMsg::PendingPaintMetric(pipeline_id, epoch))
|
||||
}
|
||||
|
||||
fn handle_set_cursor_msg(&mut self, cursor: Cursor) {
|
||||
self.compositor_proxy.send(ToCompositorMsg::SetCursor(cursor))
|
||||
}
|
||||
|
|
|
@ -486,7 +486,9 @@ impl UnprivilegedPipelineContent {
|
|||
STF: ScriptThreadFactory<Message=Message>
|
||||
{
|
||||
let image_cache = Arc::new(ImageCacheImpl::new(self.webrender_api_sender.create_api()));
|
||||
let paint_time_metrics = PaintTimeMetrics::new(self.time_profiler_chan.clone());
|
||||
let paint_time_metrics = PaintTimeMetrics::new(self.id,
|
||||
self.time_profiler_chan.clone(),
|
||||
self.layout_to_constellation_chan.clone());
|
||||
let layout_pair = STF::create(InitialScriptState {
|
||||
id: self.id,
|
||||
browsing_context_id: self.browsing_context_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue