code: func (i *Image) IsInvalidated() (bool, error) {
  	// FlushCommands is required because c.offscreen.impl might not have an actual texture.
  	graphicscommand.FlushCommands()
  	if !IsRestoringEnabled() {
  		return false, nil
  	}
  
  	return i.image.IsInvalidated(), nil
  }
docs: // IsInvalidated returns a boolean value indicating whether the image is invalidated.
  //
  // If an image is invalidated, GL context is lost and all the images should be restored asap.