Files
gio/gpu
Dominik Honnef b183774063 internal/stroke, gpu: reuse slice when splitting cubics
When building GPU vertices from paths, we call stroke.SplitCubic once
per OpCubic. Before this change, each call to stroke.SplitCubic would
allocate a slice, which we would only use to iterate over.

This allocation can be easily avoided by reusing the slice. We can
conveniently store it in gpu.quadSplitter.

In a real application that renders hundreds of paths with tens of
rounded rectangles per path, this saved roughly 4500 allocations (or 1
MB worth) per frame.

Signed-off-by: Dominik Honnef <dominik@honnef.co>
2023-06-19 16:19:07 +02:00
..
2022-07-02 20:12:41 +02:00
2022-07-02 20:12:41 +02:00
2023-01-06 18:26:38 -06:00
2023-01-06 18:26:42 -06:00
2023-01-06 18:26:42 -06:00
2023-01-06 18:26:38 -06:00
2021-07-27 14:34:18 +02:00