Open Bug 1784382 Opened 2 years ago Updated 2 years ago

Implement Filter::Mask to enable Gecko to use post-transform clipmasks

Categories

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

task

Tracking

()

People

(Reporter: ahale, Assigned: ahale)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Firefox uses clipmasks very little (just on tab title text, and rarely on web pages), we should refactor the clipmask functionality into a specific Filter::Mask operation rather than have it woven throughout the WebRender code which is a maintenance burden and a source of significant code duplication.

Additionally, applying clipmasks as a filter in the space of the destination surface will resolve aliasing artifacts in bug 1671784 where a rotated clipmask has undesirable image border issues.

This part of the solution is implementing Filter::Mask, Gecko integration will be addressed in a separate but related bug.

Blocks: 1784383

Implementation of the Filter::Mask operation which applies a clip mask
texture when rendering a stacking context into the parent surface.

Added a reftest as a proof of concept as Gecko doesn't use Filter::Mask
yet.

This shouldn't have any impact on existing code paths - integration
with Gecko will be a separate commit.

Status: Nearly looks right with my code changes, but there are polygon gaps between ImageMask tiles at some scroll offsets and zoom levels, so there's something doing some coordinate rounding in the primitive handling that I need to fix.

Attachment #9297203 - Attachment is obsolete: true

The following patch is waiting for review from a reviewer who resigned from the review:

ID Title Author Reviewer Status
D154484 Bug 1784382 - WebRender: Add Filter::Mask to apply an image mask r?gw ahale gw: Resigned from review

:ahale, could you please find another reviewer?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahale)
Flags: needinfo?(ahale)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: