Closed Bug 1591526 Opened 9 months ago Closed 8 months ago

Save memory by culling hidden OS compositor surfaces

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mstange, Assigned: gw)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

At the moment, regular Firefox windows have 3x overdraw: One slice with the window background, one slice inside the "iframe" item with the non-scrolling web page background color, and one slice for the scrolled content.
The former two are usually not visible, so we should not allocate memory for them. We can do this by having WebRender apply occlusion culling to OS compositor surfaces.

Assignee: nobody → gwatson

Documenting a couple of potential wins from discussion of this feature:

(1) We may not need the solid color optimization anymore, simplifying the WR code and native compositor interface.
(2) Saves some GPU memory on tiles that don't match the solid color optimization.
(3) Reduces native compositor surface counts.
(4) Might allow rendering with subpixel AA in some cases where we currently don't.
(5) Performance win on Draw compositor implementations (small on systems with Hi-Z, but might be large in some cases).
(6) Will be useful / required for the software WR backend, so we might as well do it here anyway.

Duplicate of this bug: 1587428

During the visibility pass, picture caches register themselves as
occluders, if they have a valid opaque region.

During the primitive preparation pass, each tile queries if it is
occluded. If so, it skips rasterization and compositing of itself
for this frame. In this way, tiles that are always occluded never
end up allocating GPU memory for a surface.

Also add support during primitive dependency generation for opaque
images to be considered as part of the opaque backdrop region.

Pushed by gwatson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5a3b621d152d
Use occlusion culling to reduce number of picture cache tiles. r=nical
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

== Change summary for alert #23698 (as of Tue, 05 Nov 2019 04:05:56 GMT) ==

Improvements:

3% raptor-tp6-google-mail-firefox-cold fcp linux64-shippable-qr opt 211.58 -> 204.58
3% raptor-tp6-bing-firefox-cold fcp linux64-shippable-qr opt 266.88 -> 258.92

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=23698

You need to log in before you can comment on or make changes to this bug.