mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implements profiler for blocked recv
This commit is contained in:
parent
563f0ec824
commit
7d4e2b11e9
27 changed files with 176 additions and 58 deletions
|
@ -7,12 +7,13 @@ use dom::bindings::codegen::Bindings::ScreenBinding::ScreenMethods;
|
|||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::num::Finite;
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::reflector::DomObject;
|
||||
use dom::bindings::root::{Dom, DomRoot};
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedSize2D;
|
||||
use ipc_channel::ipc;
|
||||
use profile_traits::ipc;
|
||||
use script_traits::ScriptMsg;
|
||||
use style_traits::CSSPixel;
|
||||
use webrender_api::DeviceUintSize;
|
||||
|
@ -38,7 +39,7 @@ impl Screen {
|
|||
}
|
||||
|
||||
fn screen_size(&self) -> TypedSize2D<u32, CSSPixel> {
|
||||
let (send, recv) = ipc::channel::<DeviceUintSize>().unwrap();
|
||||
let (send, recv) = ipc::channel::<DeviceUintSize>(self.global().time_profiler_chan().clone()).unwrap();
|
||||
self.window.upcast::<GlobalScope>()
|
||||
.script_to_constellation_chan().send(ScriptMsg::GetScreenSize(send)).unwrap();
|
||||
let dpr = self.window.device_pixel_ratio();
|
||||
|
@ -47,7 +48,7 @@ impl Screen {
|
|||
}
|
||||
|
||||
fn screen_avail_size(&self) -> TypedSize2D<u32, CSSPixel> {
|
||||
let (send, recv) = ipc::channel::<DeviceUintSize>().unwrap();
|
||||
let (send, recv) = ipc::channel::<DeviceUintSize>(self.global().time_profiler_chan().clone()).unwrap();
|
||||
self.window.upcast::<GlobalScope>()
|
||||
.script_to_constellation_chan().send(ScriptMsg::GetScreenAvailSize(send)).unwrap();
|
||||
let dpr = self.window.device_pixel_ratio();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue