Closed Bug 1665433 Opened 4 years ago Closed 4 years ago

Allow pictures to be rendered in the opaque pass

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

At the moment picture primitives are rendered in the alpha pass even if the content in the intermediate target is entirely opaque.

During scene building, we can build a conservative estimate of an opaque rect for each picture surface and see if it covers the entire surface rect.

In addition, if the opaque area only covers the picture's surface partially, we could segment the brush around the opaque rect during batching.

Attachment #9176317 - Attachment description: Bug 1665433 - Support the opaque pass in the bursh_blend shader. r=gw → Bug 1665433 - Support the opaque pass in the brush_blend shader. r=gw

This patch tracks tracks a conservative estimated opaque region represented as one rect per picture surface (in picture space). This is computed by first generating an opaque rect per cluster in the cluster's local space and accumulating cluster opaque rects for each picture during the prepare pass.
This information is used during batching to decide whether the content of a picture is entirely opaque in which case it can go in the opaque pass.

A potential followup to this is to segment the opaque and semi-transparent regions via a nine-patch for partially opaque pictures.

Depends on D90580

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/82f392188acb Support the opaque pass in the brush_blend shader. r=gw https://hg.mozilla.org/integration/autoland/rev/0481d7e34430 Track an opaque rect per picture surface and move some pictures to the opaque pass. r=gw
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f79f5a702d3d Support the opaque pass in the brush_blend shader. r=gw https://hg.mozilla.org/integration/autoland/rev/afa8408d3933 Track an opaque rect per picture surface and move some pictures to the opaque pass. r=gw
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Flags: needinfo?(nical.bugzilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: