Closed Bug 1457246 Opened 2 years ago Closed 2 years ago

Don't hold the sIndirectLayerTreesLock while cloning the WebRenderAPI

Categories

(Core :: Graphics: WebRender, enhancement)

Other Branch
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: kats, Assigned: kats)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

We grab the lock at https://searchfox.org/mozilla-central/rev/78dbe34925f04975f16cb9a5d4938be714d41897/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp#213 and then clone the API at https://searchfox.org/mozilla-central/rev/78dbe34925f04975f16cb9a5d4938be714d41897/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp#239. This is not great, because the cloning process does a blocking call on the render backend thread, and this entangles the two threads unnecessarily. I had a local build where I was trying some scene builder changes and those changes combined with this triggered a deadlock which I think is easily avoidable.
Comment on attachment 8971363 [details]
Bug 1457246 - Don't hold the sIndirectLayerTreesLock while making synchronous calls to the RenderBackend thread.

https://reviewboard.mozilla.org/r/240118/#review245982

Looks good. Good catch!
Attachment #8971363 - Flags: review?(sotaro.ikeda.g) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d52b265b6b52
Don't hold the sIndirectLayerTreesLock while making synchronous calls to the RenderBackend thread. r=sotaro
https://hg.mozilla.org/mozilla-central/rev/d52b265b6b52
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.