graphics: Rename restorePixels -> restore

This commit is contained in:
Hajime Hoshi 2016-07-05 03:01:32 +09:00
parent 7e296b1aae
commit 793aad2681
3 changed files with 4 additions and 4 deletions

View File

@ -162,7 +162,7 @@ func (c *graphicsContext) restore(context *opengl.Context) error {
if err := graphics.Reset(context); err != nil { if err := graphics.Reset(context); err != nil {
return err return err
} }
if err := theImagesForRestoring.restorePixels(context); err != nil { if err := theImagesForRestoring.restore(context); err != nil {
return err return err
} }
return nil return nil

View File

@ -60,7 +60,7 @@ func (i *images) savePixels(context *opengl.Context) error {
return nil return nil
} }
func (i *images) restorePixels(context *opengl.Context) error { func (i *images) restore(context *opengl.Context) error {
i.m.Lock() i.m.Lock()
defer i.m.Unlock() defer i.m.Unlock()
// Dispose all images first because framebuffer/texture numbers can be reused. // Dispose all images first because framebuffer/texture numbers can be reused.
@ -75,7 +75,7 @@ func (i *images) restorePixels(context *opengl.Context) error {
} }
} }
for img := range i.images { for img := range i.images {
if err := img.restorePixels(); err != nil { if err := img.restore(); err != nil {
return err return err
} }
} }

View File

@ -193,7 +193,7 @@ func (i *imageImpl) savePixels(context *opengl.Context) error {
return nil return nil
} }
func (i *imageImpl) restorePixels() error { func (i *imageImpl) restore() error {
i.m.Lock() i.m.Lock()
defer i.m.Unlock() defer i.m.Unlock()
if i.disposed { if i.disposed {