Open Bug 1661037 Opened 4 years ago Updated 4 years ago

Render more types of SVG content with WebRender display items

Categories

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

enhancement

Tracking

()

People

(Reporter: nical, Unassigned)

References

(Blocks 1 open bug)

Details

A lot of WebRender's performance issues come from slow blob image rasterization. There are some SVG elements that we can render efficiently as regular display items instead of using a blob image. For example we do this with images in some cases, but we should extend that to cover more image cases as well as text and simple shapes.

When generating a blob image, for one of its items to be promoted to a regular WR display item, we must be in the grouping code path and run into an item for which IsItemProbablyActive returns false. For SVG items this will call into nsSVGGeometryFrame::CreateWebRenderCommands (with aDryRun = true to only test whether we can create the command).

Most of the work here is around implementing CreateWebRenderCommands for more children of nsSVGGeometryFrame.

Note that the more svg items are made active, the more blobs will be split into several blobs, which can cause us to generate too many blobs and cause a lot of overdraw, so the might be cases where letting the item be rendered in the blob would be better (typically, if it is very small we might be better off not splitting the blob).

Blocks: 1656763
Severity: -- → N/A
You need to log in before you can comment on or make changes to this bug.