mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
gpu: avoid pointers of pathData
Save allocations by using pathData instead of *pathData. Signed-off-by: Viktor <viktor.ogeman@gmail.com>
This commit is contained in:
+1
-1
@@ -318,7 +318,7 @@ func (g *GPU) Collect(viewport image.Point, frameOps *op.Ops) {
|
||||
g.cleanupTimer = g.timers.newTimer()
|
||||
}
|
||||
for _, p := range g.drawOps.pathOps {
|
||||
if v, exists := g.drawOps.pathCache.get(p.pathKey); !exists || v.data == nil {
|
||||
if v, exists := g.drawOps.pathCache.get(p.pathKey); !exists || v.data.data == nil {
|
||||
data := buildPath(g.ctx, p.pathVerts)
|
||||
g.drawOps.pathCache.put(p.pathKey, opCacheValue{
|
||||
data: data,
|
||||
|
||||
Reference in New Issue
Block a user