Skip to content

Commit

Permalink
Bug 1616364 - initailize thread profiler on Compositor thread only on…
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeevPavel authored and github-sync committed Feb 19, 2020
1 parent 5def10f commit 0d042e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webrender/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,10 @@ impl Renderer {
shaders: Option<&mut WrShaders>,
start_size: DeviceIntSize,
) -> Result<(Self, RenderApiSender), RendererError> {
if !wr_has_been_initialized() {
register_thread_with_profiler("Compositor".to_owned());
}

HAS_BEEN_INITIALIZED.store(true, Ordering::SeqCst);

let (api_tx, api_rx) = channel::msg_channel()?;
Expand Down Expand Up @@ -2028,8 +2032,6 @@ impl Renderer {
let max_texture_size = device.max_texture_size();
let max_texture_layers = device.max_texture_layers();

register_thread_with_profiler("Compositor".to_owned());

device.begin_frame();

let shaders = match shaders {
Expand Down

0 comments on commit 0d042e8

Please sign in to comment.