Closed Bug 1549559 Opened 5 years ago Closed 5 years ago

Avoid copies of shape data all over the place.

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files)

Right now if you have a big SVG path, we copy the path to every element that match.

I want to add bindings for Arc<[Slice]> (effectively ThinArc<>), and this is a good test bed.

Cool. Thanks.

Depends on: 1549593
Depends on: 1549596

We could make the header PhantomData or something, but then we wouldn't be able
to bind to C++, since C++ doesn't have ZSTs. So add a canary instead to add a
runtime check of stuff being sane.

As I said over bug 1549593, the eventual goal is to use ArcSlice in all
inherited properties. But this seemed like a good first candidate that doesn't
require me to move around a lot more code, since we were already using cbindgen
for the path commands.

Depends on D30133

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dc57611c4e71
Introduce ArcSlice, a small wrapper over ThinArc but without an explicit header. r=heycam
https://hg.mozilla.org/integration/autoland/rev/51a7edbe0a9e
Add bindings for ArcSlice and ThinArc, and use them to reduce copies of SVG path data. r=heycam
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: