ebiten/internal/restorable
Hajime Hoshi 151dfffad6 internal/restorable: simplify canDetectContextLostExplicitly
This constant was set with some wrong assumptions:

 1. On Android, recovering was needed.
 2. On iOS, OpenGL ES was used when
    a. The architecture was 386 or amd64 == an emulator is used
    b. The build tag ebitengl was not specified
    c. gomobile-build was used
 3. On browsers, recovering was needed.

1., 2b, and 2c are correct.

2a. is not correct: Now emulators are available on all the
architectures with both Metal and OpenGL.

3. is not correct: Ebiten no longer recovers the contest lost.

Now, Ebiten can detect a context lost explicitly when

 1. On Android
 2. On iOS and on gomobile-build
    (When gomobile-build is used, OpenGL should always be used)

Based on this fact, this change changes the constant to a variable,
and fixes the logic to set the variable.
2022-03-23 03:01:59 +09:00
..
doc.go restorable: Add comments 2017-09-15 00:24:18 +09:00
image.go internal/graphicscommand: compile shaders lazily 2022-03-21 21:09:02 +09:00
images_test.go internal/restorable: add a new parameter specifying a mask for ReplacePixels 2022-03-21 03:08:58 +09:00
images.go internal/restorable: simplify canDetectContextLostExplicitly 2022-03-23 03:01:59 +09:00
rect.go internal/restorable: add a new parameter specifying a mask for ReplacePixels 2022-03-21 03:08:58 +09:00
shader_test.go internal/graphicscommand: compile shaders lazily 2022-03-21 21:09:02 +09:00
shader.go internal/graphicscommand: compile shaders lazily 2022-03-21 21:09:02 +09:00