Open Bug 1531942 Opened 7 years ago Updated 3 years ago

Improve masking API

Categories

(Core :: Graphics, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

Details

Moz2D's masking API doesn't serve SVGs needs very well. We've cobbled together improvements to it over time, but it still isn't doing great.

Here's a list of the functionality that we need:

  • Non trivial clip-path handling:

    • clip-paths turn into masks under two conditions:
      1. If there are multiple shapes they need to be unioned.
      2. If the clip path or any shapes in it are clipped they need to be intersected.

    These could be implemented with skia pathops (Chrome seems to do the unioning this way) but for now we use masks.

  • Merging clip-path masks with svg masks

  • Converting masks from color to luminance

Ideally the user of the api doesn't have to worry about any transforms to device space like they currently do.

Priority: -- → P3

A first pass it this will happen in bug 1539702

Depends on: 1539702
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.