Closed Bug 1978432 Opened 1 month ago Closed 15 days ago

Make NativeLayerRootRemoteMacParent run on a different thread than the main thread

Categories

(Core :: Widget: Cocoa, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: bradwerth, Assigned: bradwerth)

References

Details

Attachments

(2 files)

Bug 1889757 setup the NativeLayerRootRemoteMacParent to run on the parent process main thread, for simplicity. But we don't want any heavy-duty message handling to block other important main thread work. So instead create the parent-side on actor on a different existing thread, possibly the compositor thread.

(In reply to Brad Werth [:bradwerth] from comment #0)

But we don't want any heavy-duty message handling to block other important main thread work.

It's actually more the other way round: We don't want existing heavy-duty main thread work to delay compositing.

The nsCocoaWindow does not own its compositor widget delegate, and does
not need to call Shutdown() on it. Removing this call fixes a warning
about sending the delete message to a closed actor.

Attachment #9503445 - Attachment description: WIP: Bug 1978432 Part 1: Move the main work of nsCocoaWindow::CreateCompositor to the compositor thread. → WIP: Bug 1978432 Part 2: Move the main work of nsCocoaWindow::CreateCompositor to the compositor thread.
Attachment #9504143 - Attachment description: WIP: Bug 1978432 Part 1: Prevent nsCocoaWindow::DestroyCompositor from shutting down its compositor widget delegate. → Bug 1978432 Part 1: Prevent nsCocoaWindow::DestroyCompositor from shutting down its compositor widget delegate.
Attachment #9503445 - Attachment description: WIP: Bug 1978432 Part 2: Move the main work of nsCocoaWindow::CreateCompositor to the compositor thread. → Bug 1978432 Part 2: Move the main work of nsCocoaWindow::CreateCompositor to the compositor thread.
Pushed by bwerth@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/80a848f2b79e https://hg.mozilla.org/integration/autoland/rev/4c74b9125c51 Part 1: Prevent nsCocoaWindow::DestroyCompositor from shutting down its compositor widget delegate. r=mstange https://github.com/mozilla-firefox/firefox/commit/b7344aab70f1 https://hg.mozilla.org/integration/autoland/rev/a5e76824597d Part 2: Move the main work of nsCocoaWindow::CreateCompositor to the compositor thread. r=mstange
Status: NEW → RESOLVED
Closed: 15 days ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: