Closed Bug 1742742 Opened 2 years ago Closed 2 years ago

Use backdrop candidates for opaque picture detection

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: gw, Assigned: gw)

References

Details

Attachments

(1 file)

No description provided.

The opaque_rect in SurfaceInfo is used to determine whether a
picture with a backing surface can be considered opaque during
batching, to select an appropriate blend mode.

Instead of checking every primitive during the prepare pass, take
advantage of the backdrop candidate detection done by picture
caching during the visibility pass to find opaque pictures.

Strictly speaking, this doesn't catch quite as many cases as the
previous code, because it doesn't try to union rects and it doesn't
check every single primitive. However, it catches the vast majority
of real world cases, where there is a single background primitive
that covers the picture surface (e.g. color, gradient, image etc).
Any future improvements to the picture backdrop logic will also
automatically apply to the new picture opaque detection logic.

The primary benefits are improved performance, by removing some
per-primitive work that was being done during the prepare pass,
and removing another field from PrimitiveCluster which will be
changing signficantly in future.

Assignee: nobody → gwatson
Status: NEW → ASSIGNED
Pushed by gwatson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/65de433d5d75
Use backdrop candidates for opaque picture detection r=gfx-reviewers,nical
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Regressions: 1745878
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: