graphics: Remove GraphicsContext.Invalidated

This commit is contained in:
Hajime Hoshi 2019-04-07 10:08:08 +09:00
parent 3cb9d18fc4
commit b579bd7fd0
2 changed files with 0 additions and 11 deletions

View File

@ -45,19 +45,10 @@ type graphicsContext struct {
screenHeight int
screenScale float64
initialized bool
invalidated bool // browser only
offsetX float64
offsetY float64
}
func (c *graphicsContext) Invalidate() {
// Note that this is called only on browsers so far.
// TODO: On mobiles, this function is not called and instead IsTexture is called
// to detect if the context is lost. This is simple but might not work on some platforms.
// Should Invalidate be called explicitly?
c.invalidated = true
}
func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale float64) {
c.screenScale = screenScale
@ -180,6 +171,5 @@ func (c *graphicsContext) restoreIfNeeded() error {
if err := shareable.Restore(); err != nil {
return err
}
c.invalidated = false
return nil
}

View File

@ -21,7 +21,6 @@ import (
type GraphicsContext interface {
SetSize(width, height int, scale float64)
Update(afterFrameUpdate func()) error
Invalidate()
}
// RegularTermination represents a regular termination.