graphics: Rename s/ensure/resolveStale/

This commit is contained in:
Hajime Hoshi 2016-07-27 22:49:23 +09:00
parent 9b6b5372ef
commit 4ad5c65efe
3 changed files with 4 additions and 4 deletions

View File

@ -140,7 +140,7 @@ func (c *graphicsContext) UpdateAndDraw(context *opengl.Context, updateCount int
if err := c.initializeIfNeeded(context); err != nil { if err := c.initializeIfNeeded(context); err != nil {
return err return err
} }
if err := theImagesForRestoring.ensurePixels(context); err != nil { if err := theImagesForRestoring.resolveStalePixels(context); err != nil {
return err return err
} }
for i := 0; i < updateCount; i++ { for i := 0; i < updateCount; i++ {

View File

@ -63,11 +63,11 @@ func (i *images) remove(img *Image) {
runtime.SetFinalizer(img, nil) runtime.SetFinalizer(img, nil)
} }
func (i *images) ensurePixels(context *opengl.Context) error { func (i *images) resolveStalePixels(context *opengl.Context) error {
i.m.Lock() i.m.Lock()
defer i.m.Unlock() defer i.m.Unlock()
for img := range i.images { for img := range i.images {
if err := img.ensurePixels(context); err != nil { if err := img.resolveStalePixels(context); err != nil {
return err return err
} }
} }

View File

@ -185,7 +185,7 @@ func (i *imageImpl) At(x, y int, context *opengl.Context) color.Color {
return clr return clr
} }
func (i *imageImpl) ensurePixels(context *opengl.Context) error { func (i *imageImpl) resolveStalePixels(context *opengl.Context) error {
i.m.Lock() i.m.Lock()
defer i.m.Unlock() defer i.m.Unlock()
if i.disposed { if i.disposed {