Closed Bug 1764948 Opened 2 years ago Closed 2 years ago

Implement anti-aliasing for DrawTargetWebgl

Categories

(Core :: Graphics: Canvas2D, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

Details

Attachments

(1 file)

We currently don't anti-alias accelerated rectangle drawing in DrawTargetWebgl, and this can predictably cause some things to look ugly and also fail some reftests when pref'd on.

This provides basic distange-to-edge anti-aliasing for accelerated rectangle
drawing in DrawTargetWebgl. It tracks the distance to each edge in screen space
for each edge of the rectangle. These distances are passed down to the fragment
shader in an interpolant and then the smallest one is selected from them to
represent the final opacity of the pixel. We also need to extrude the rectangle
outward by a pixel to account for the AA region.

This is based off WebRender's AA strategy as outlined in bug 1764364.

Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/94cd0cb132f2
Implement anti-aliasing for DrawTargetWebgl. r=gfx-reviewers,nical
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: