Measure layout queries blocked by ongoing layout

This commit is contained in:
Philipp Albrecht 2019-03-25 22:39:41 +01:00 committed by pylbrecht
parent a74f5222db
commit 858011c513
9 changed files with 73 additions and 6 deletions

View file

@ -40,6 +40,7 @@ use std::env;
use std::ffi::OsStr;
use std::process;
use std::rc::Rc;
use std::sync::atomic::AtomicBool;
use std::sync::Arc;
use style_traits::CSSPixel;
use style_traits::DevicePixel;
@ -528,6 +529,7 @@ impl UnprivilegedPipelineContent {
self.script_chan.clone(),
self.load_data.url.clone(),
);
let layout_thread_busy_flag = Arc::new(AtomicBool::new(false));
let layout_pair = STF::create(
InitialScriptState {
id: self.id,
@ -554,6 +556,7 @@ impl UnprivilegedPipelineContent {
webvr_chan: self.webvr_chan,
webrender_document: self.webrender_document,
webrender_api_sender: self.webrender_api_sender.clone(),
layout_is_busy: layout_thread_busy_flag.clone(),
},
self.load_data.clone(),
);
@ -576,6 +579,7 @@ impl UnprivilegedPipelineContent {
self.webrender_api_sender,
self.webrender_document,
paint_time_metrics,
layout_thread_busy_flag.clone(),
);
if wait_for_completion {