Closed Bug 1664047 Opened 3 months ago Closed 2 months ago

Unnecessary GPU usage during compositing from profiler screenshots code even if the profiler is off

Categories

(Core :: Graphics: WebRender, defect)

All
macOS
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox80 --- unaffected
firefox81 --- unaffected
firefox82 + fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

This is a regression from bug 1592031: We call UpdateSnapshot even when the profiler is off, which causes unnecessary extra CPU and GPU work on each composite on macOS+WR. We only need to call UpdateSnapshot if the profiler is running and the Screenshots profiler setting is enabled.

This requires passing down the window size down in a different way, because the
NativeLayerRootSnapshotter does not know the window size otherwise.

At the same time, this patch also removes WindowNLRS and makes the NativeLayerRoot
implement the profiler_screenshots::Window interface directly.

Depends on D89863

[Tracking Requested - why for this release]: Regression that affects WR perf. WR will ride the train to most Mac users in 82 on release (bug 1654271).

Thanks Markus.

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/d8996fcd3568
Only call UpdateSnapshot when ScreenshotGrabber calls GetWindowContents, which it only does if the profiler is running (and Screenshots are enabled). r=mattwoodrow
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/36693e01331a
Only call UpdateSnapshot when ScreenshotGrabber calls GetWindowContents, which it only does if the profiler is running (and Screenshots are enabled). r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Flags: needinfo?(mstange.moz)
You need to log in before you can comment on or make changes to this bug.