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
+3 -3
View File
@@ -26,7 +26,7 @@ type opCache struct {
}
type opCacheValue struct {
data *pathData
data pathData
bounds f32.Rectangle
key ops.Key
keep bool
@@ -120,9 +120,9 @@ func (r *opCache) frame() {
if v.keep {
continue
}
if v.data != nil {
if v.data.data != nil {
v.data.release()
r.cache[i].data = nil
r.cache[i].data.data = nil
}
delete(r.index, v.key)
r.freelist = append(r.freelist, i)