Closed Bug 1914835 Opened 7 months ago Closed 6 months ago

Don't use DesktopAndCursorComposer with ScreenCaptureKit

Categories

(Core :: WebRTC: Audio/Video, task)

task

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox-esr128 --- fixed
firefox131 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

DesktopAndCursorComposer on macOS is rather expensive, even if it never composes (because the cursor was embedded from the backend). The cost is in comparing the previous and the current cursor to see if it had changed. This is done by converting both cursors to TIFF and comparing all their pixels. On every frame.

ScreenCaptureKit can embed the cursor directly, so use that mode instead, and skip the composer entirely.

The MouseCursorMonitor on macOS is rather expensive, as for every pulled frame
it compares all pixels of the cursors used for the current and last frames.
Getting to the pixels may also incur a conversion.

Note that this comparison happens even if the backend reports it had embedded
the cursor already, as the embedding only affects composing the monitored cursor
into a captured frame.

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/8ca7b371646d With ScreenCaptureKit embed the mouse cursor directly. r=webrtc-reviewers,ng
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch

The MouseCursorMonitor on macOS is rather expensive, as for every pulled frame
it compares all pixels of the cursors used for the current and last frames.
Getting to the pixels may also incur a conversion.

Note that this comparison happens even if the backend reports it had embedded
the cursor already, as the embedding only affects composing the monitored cursor
into a captured frame.

Original Revision: https://phabricator.services.mozilla.com/D220092

Attachment #9444297 - Flags: approval-mozilla-esr128?
Attachment #9444297 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: