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:
Viktor
2020-06-20 23:30:00 +02:00
committed by Elias Naur
parent 42f07ca538
commit 901478d102
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -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,