restorable: Add comments

This commit is contained in:
Hajime Hoshi 2017-09-15 00:39:49 +09:00
parent 80940f9070
commit 2881d3fc4c

View File

@ -93,6 +93,8 @@ func NewImage(width, height int, filter opengl.Filter, volatile bool) *Image {
}
// NewImageFromImage creates an image with source image.
//
// width/height might be different from source's size.
func NewImageFromImage(source *image.RGBA, width, height int, filter opengl.Filter) *Image {
w2, h2 := math.NextPowerOf2Int(width), math.NextPowerOf2Int(height)
p := make([]uint8, 4*w2*h2)