Closed Bug 1592031 Opened 2 years ago Closed 10 months ago

Make profiler screenshots work in the WR OS compositor configuration on macOS

Categories

(Core :: Graphics: WebRender, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Similar to bug 1592026, but with the added challenge that the readback needs to be as low-overhead and "non-blocking" as possible.

Priority: -- → P3

We can likely enable our compositor work in Nightly before fixing this, we should not let it ride to release until we fix.

Depends on: 1602643

:mstange, is there a document about how to use "window recording"? I could not find it. The window recording was added by Bug 1536174.

Flags: needinfo?(mstange)

It is used by browsertime when measuring "visual metrics" for pageload performance. But the simplest way to play with it is from the browser console. First, create a string pref with the name layers.windowrecording.path and set it to an absolute path to some directory. Then, restart Firefox, open the Browser Console (with devtools.chrome.enabled = true), and execute the following:

windowUtils.startCompositionRecording()
// now briefly interact with a web site in the browser, and then run:
windowUtils.stopCompositionRecording(true)

A new folder in the chosen directory should appear and be populated with PNG files which contain screenshots from the Firefox window.

Flags: needinfo?(mstange)

Great! Thank you.

Assignee: nobody → mstange
No longer blocks: 1536360, WR-Win-Compositing
Status: NEW → ASSIGNED
No longer depends on: 1602643
Summary: Make profiler screenshots and frame recording work in the WR OS compositor configuration → Make profiler screenshots and frame recording work in the WR OS compositor configuration on macOS
Attachment #9119453 - Attachment description: Bug 1592031 - WIP: Genericize ScreenshotGrabber → Bug 1592031 - Rename CompositorScreenshotGrabber to ScreenshotGrabber and give it a more generic interface. r=mattwoodrow
Attachment #9119454 - Attachment description: Bug 1592031 - WIP: Implement profiler screenshots for webrender + OS compositor on macOS. → Bug 1592031 - Add profiler screenshots functionality to NativeLayerSnapshotter. r=mattwoodrow

@Markus: Should this block Mac release?

Flags: needinfo?(mstange.moz)
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/925e3b179b9b
Rename CompositorScreenshotGrabber to ScreenshotGrabber and give it a more generic interface. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/5db68a6a5bc2
Add profiler screenshots functionality to NativeLayerSnapshotter. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/19145f742503
Use NativeLayerSnapshotter to capture profiler screenshots with WebRender on macOS. r=mattwoodrow
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/203d7e09574c
Rename CompositorScreenshotGrabber to ScreenshotGrabber and give it a more generic interface. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/6b2299a3cd00
Add profiler screenshots functionality to NativeLayerSnapshotter. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/eb44242ad435
Use NativeLayerSnapshotter to capture profiler screenshots with WebRender on macOS. r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

(In reply to Kris Taeleman (:ktaeleman) from comment #8)

@Markus: Should this block Mac release?

Yes, it should. It's causing confusion for users of the profiler, and sometimes even crashes.

Flags: needinfo?(mstange.moz)
Regressions: 1664047

The patches in this bug ended up only fixing the profiler screenshots aspect, and not the frame recording API. I filed bug 1664049 on the frame recording part.

Blocks: wr-mac-block
No longer blocks: wr-mac-nightly, 1592016
Summary: Make profiler screenshots and frame recording work in the WR OS compositor configuration on macOS → Make profiler screenshots work in the WR OS compositor configuration on macOS
See Also: → 1681869
You need to log in before you can comment on or make changes to this bug.