diff --git a/gfx/wr/webrender/src/renderer.rs b/gfx/wr/webrender/src/renderer.rs index 4f5671ccba099..7003597ec4ecc 100644 --- a/gfx/wr/webrender/src/renderer.rs +++ b/gfx/wr/webrender/src/renderer.rs @@ -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()?; @@ -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 {