mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
all: apply suggestions from staticcheck.io
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -265,7 +265,6 @@ type clipState struct {
|
||||
path []byte
|
||||
pathKey ops.Key
|
||||
intersect f32.Rectangle
|
||||
push bool
|
||||
|
||||
clipKey
|
||||
}
|
||||
@@ -308,11 +307,6 @@ type encoder struct {
|
||||
ntrans int
|
||||
}
|
||||
|
||||
type encodeState struct {
|
||||
trans f32.Affine2D
|
||||
clip f32.Rectangle
|
||||
}
|
||||
|
||||
// sizedBuffer holds a GPU buffer, or its equivalent CPU memory.
|
||||
type sizedBuffer struct {
|
||||
size int
|
||||
@@ -1612,13 +1606,6 @@ func (e *encoder) numElements() int {
|
||||
return len(e.scene)
|
||||
}
|
||||
|
||||
func (e *encoder) append(e2 encoder) {
|
||||
e.scene = append(e.scene, e2.scene...)
|
||||
e.npath += e2.npath
|
||||
e.npathseg += e2.npathseg
|
||||
e.ntrans += e2.ntrans
|
||||
}
|
||||
|
||||
func (e *encoder) transform(m f32.Affine2D) {
|
||||
e.scene = append(e.scene, scene.Transform(m))
|
||||
e.ntrans++
|
||||
@@ -1666,11 +1653,6 @@ func (e *encoder) line(start, end f32.Point) {
|
||||
e.npathseg++
|
||||
}
|
||||
|
||||
func (e *encoder) quad(start, ctrl, end f32.Point) {
|
||||
e.scene = append(e.scene, scene.Quad(start, ctrl, end))
|
||||
e.npathseg++
|
||||
}
|
||||
|
||||
func (c *collector) reset() {
|
||||
c.prevFrame, c.frame = c.frame, c.prevFrame
|
||||
c.profile = false
|
||||
|
||||
Reference in New Issue
Block a user