Closed Bug 1591526 Opened 2 years ago Closed 2 years ago

Save memory by culling hidden OS compositor surfaces


(Core :: Graphics: WebRender, enhancement)

Not set



Tracking Status
firefox72 --- fixed


(Reporter: mstange, Assigned: gw)


(Blocks 1 open bug)



(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
Use occlusion culling to reduce number of picture cache tiles. r=nical
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

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


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:

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