mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
restorable: Fix comments
This commit is contained in:
parent
4ba47eee32
commit
25581b2be8
@ -62,8 +62,7 @@ var dummyImage *Image
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
dummyImage = &Image{
|
dummyImage = &Image{
|
||||||
image: graphicscommand.NewImage(16, 16),
|
image: graphicscommand.NewImage(16, 16),
|
||||||
volatile: false,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,9 +88,8 @@ func NewImage(width, height int, volatile bool) *Image {
|
|||||||
// Note that Dispose is not called automatically.
|
// Note that Dispose is not called automatically.
|
||||||
func NewScreenFramebufferImage(width, height int) *Image {
|
func NewScreenFramebufferImage(width, height int) *Image {
|
||||||
i := &Image{
|
i := &Image{
|
||||||
image: graphicscommand.NewScreenFramebufferImage(width, height),
|
image: graphicscommand.NewScreenFramebufferImage(width, height),
|
||||||
volatile: false,
|
screen: true,
|
||||||
screen: true,
|
|
||||||
}
|
}
|
||||||
theImages.add(i)
|
theImages.add(i)
|
||||||
return i
|
return i
|
||||||
@ -109,7 +107,7 @@ func (i *Image) BasePixelsForTesting() []byte {
|
|||||||
// Pixels returns the image's pixel bytes.
|
// Pixels returns the image's pixel bytes.
|
||||||
//
|
//
|
||||||
// Pixels tries to read pixels from GPU if needed.
|
// Pixels tries to read pixels from GPU if needed.
|
||||||
// It is assured that GPU is not accessed if only the image's ReplacePixels is called.
|
// It is assured that GPU is not accessed if the opration against the image is only ReplacePixels.
|
||||||
func (i *Image) Pixels() []byte {
|
func (i *Image) Pixels() []byte {
|
||||||
i.readPixelsFromGPUIfNeeded()
|
i.readPixelsFromGPUIfNeeded()
|
||||||
return i.basePixels
|
return i.basePixels
|
||||||
|
Loading…
Reference in New Issue
Block a user