mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
internal/graphicscommand: add comments
This commit is contained in:
parent
ce25583438
commit
ae9781cd53
@ -29,6 +29,7 @@ func temporaryBytesSize(size int) int {
|
||||
}
|
||||
|
||||
// alloc allocates the pixels and returns it.
|
||||
//
|
||||
// Be careful that the returned pixels might not be zero-cleared.
|
||||
func (t *temporaryBytes) alloc(size int) []byte {
|
||||
if len(t.pixels) < t.pos+size {
|
||||
@ -66,6 +67,9 @@ func (t *temporaryBytes) reset() {
|
||||
t.pos = 0
|
||||
}
|
||||
|
||||
// AllocBytes allocates bytes from the cache.
|
||||
//
|
||||
// Be careful that the returned pixels might not be zero-cleared.
|
||||
func AllocBytes(size int) []byte {
|
||||
return currentCommandQueue().temporaryBytes.alloc(size)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user