Open Bug 1483410 Opened 7 years ago Updated 3 years ago

Use a refcounted array of PathCommand to store SVG Path

Categories

(Core :: CSS Parsing and Computation, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: boris, Unassigned)

References

Details

In bug 1429298, we introduce a new type, SVGPathData(Box<[PathComand]>), and copy it into StyleSVGPath. However, the SVG path could be a very large array, so a possible optimization of the memory usage is to use a refcounted array, instead of copying it into StyleSVGPath. i.e. We could replace Box<[PathCommand]> with Arc<[PathCommand]> [1]. [1] Bug 1429298 Comment 34 and Bug 1429298 Comment 35
Severity: normal → enhancement
Assignee: boris.chiou → nobody

We use cbindgen to generate the StyleOffsetPath, which uses StyleArcSlice, a wrapper type for a refcounted slice using ThinArc.
This could be fixed after we use cbindgen for StyleShapeSource.

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