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
…ce r=gw

[import_pr] From servo/webrender#3864

Differential Revision: https://phabricator.services.mozilla.com/D63242

--HG--
extra : moz-landing-system : lando
  • Loading branch information
SergeevPavel committed Feb 18, 2020
1 parent 427ad8b commit 81d3bc7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gfx/wr/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 81d3bc7

Please sign in to comment.