mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
Many operations do not pass refs to Write. Similarly adding
...interface{} requires constructing a slice, which is slow.
This cuts about 100ns from RRect and Border benchmark.
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@ func (i ImageOp) Add(o *op.Ops) {
|
||||
}.Add(o)
|
||||
return
|
||||
}
|
||||
data := o.Write(opconst.TypeImageLen, i.src, i.handle)
|
||||
data := o.Write2(opconst.TypeImageLen, i.src, i.handle)
|
||||
data[0] = byte(opconst.TypeImage)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user