mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
ebiten: reorder fields as recommended by the fieldalignment utility (#2359)
This reduces the struct size from 64 to 32 bytes.
This commit is contained in:
parent
ebbf0fbc08
commit
0d2c8b59fc
11
image.go
11
image.go
@ -32,14 +32,11 @@ import (
|
|||||||
type Image struct {
|
type Image struct {
|
||||||
// addr holds self to check copying.
|
// addr holds self to check copying.
|
||||||
// See strings.Builder for similar examples.
|
// See strings.Builder for similar examples.
|
||||||
addr *Image
|
addr *Image
|
||||||
|
image *ui.Image
|
||||||
image *ui.Image
|
original *Image
|
||||||
|
|
||||||
bounds image.Rectangle
|
|
||||||
original *Image
|
|
||||||
|
|
||||||
setVerticesCache map[[2]int][4]byte
|
setVerticesCache map[[2]int][4]byte
|
||||||
|
bounds image.Rectangle
|
||||||
}
|
}
|
||||||
|
|
||||||
var emptyImage *Image
|
var emptyImage *Image
|
||||||
|
Loading…
Reference in New Issue
Block a user