graphicscontext: Rename createFramebufferIfNeeded -> ensureFramebuffer

This commit is contained in:
Hajime Hoshi 2018-11-01 03:42:30 +09:00
parent 61c2331ac4
commit 3a8ddd6279
2 changed files with 3 additions and 3 deletions

View File

@ -230,7 +230,7 @@ func (c *drawImageCommand) String() string {
// Exec executes the drawImageCommand.
func (c *drawImageCommand) Exec(indexOffsetInBytes int) error {
f, err := c.dst.createFramebufferIfNeeded()
f, err := c.dst.ensureFramebuffer()
if err != nil {
return err
}
@ -343,7 +343,7 @@ type pixelsCommand struct {
// Exec executes a pixelsCommand.
func (c *pixelsCommand) Exec(indexOffsetInBytes int) error {
f, err := c.img.createFramebufferIfNeeded()
f, err := c.img.ensureFramebuffer()
if err != nil {
return err
}

View File

@ -121,7 +121,7 @@ func (i *Image) IsInvalidated() bool {
return !opengl.GetContext().IsTexture(i.texture)
}
func (i *Image) createFramebufferIfNeeded() (*framebuffer, error) {
func (i *Image) ensureFramebuffer() (*framebuffer, error) {
if i.framebuffer != nil {
return i.framebuffer, nil
}