Hajime Hoshi
c077ad70fd
cmd/ebitenmobile: bug fix: graceful shutdown on context lost
...
Closes #3097
2024-09-13 12:06:25 +09:00
Hajime Hoshi
4b1ae72f59
ebiten: add Draw{Image,Triangles}Options.DisableMipmaps
...
Mipmaps could be unexpectedly expensive even when we don't need mipmaps.
In order to improve performance, let's add an option to disable mipmaps.
Closes #3095
2024-09-12 22:40:16 +09:00
Hajime Hoshi
355dd453bd
internal/mipmap: refactoring
2024-09-12 17:36:17 +09:00
Hajime Hoshi
cbecbe2bad
internal/mipmap: refactoring
2024-09-12 15:55:27 +09:00
Hajime Hoshi
6389db14a2
internal/mipmap: reuse internal mipmap images whenever possible
...
Closes #3093
2024-09-12 15:30:31 +09:00
Hajime Hoshi
4bccf9d009
all: use math/rand/v2
2024-09-12 01:17:26 +09:00
Hajime Hoshi
a4bfa6cb15
all: use Go 1.21's min/max builtin functions
2024-09-12 01:01:05 +09:00
Hajime Hoshi
a36f6210c0
all: use Go 1.20 APIs
...
Closes #2746
2024-09-12 00:22:45 +09:00
Hajime Hoshi
c346c1d75b
all: update dependencies and Go version
...
Now some dependencies require Go 1.22, let's update the minimum
supported version.
2024-09-11 23:59:48 +09:00
Hajime Hoshi
df33bc3e27
all: update gomobile
2024-09-11 10:36:34 +09:00
Hajime Hoshi
60883e1a44
text/v2: add comments
2024-09-11 00:22:17 +09:00
Hajime Hoshi
813e3b28af
text/v2: add Metrics.XHeight and Metrics.CapHeight
...
Closes #3082
2024-09-11 00:15:57 +09:00
Hajime Hoshi
26feb26237
audio: add more info for errors
...
Updates ebitengine/oto#93
2024-09-10 12:29:06 +09:00
Hajime Hoshi
df821f0177
ebiten: add a warning about StrictContextRestoration
...
Updates #3089
2024-09-10 01:42:48 +09:00
Hajime Hoshi
e058bb6fd3
all: update go-text
...
Unfortunately this adds a breaking change to (*GoTextFaceSource).UnsafeInternal.
Updates #3082
2024-09-09 23:29:49 +09:00
Hajime Hoshi
15dfb02f9f
ebiten: update the comment for CursorPosition
...
CursorPosition should return a mouse cursor position on browsers
even in mobiles.
Closes #3087
2024-09-09 22:43:40 +09:00
Hajime Hoshi
a786f23e28
cmd/ebitenmobile: add comments
2024-09-09 20:55:03 +09:00
Hajime Hoshi
2a4374e012
cmd/ebitenmobile: remove setStrictContextRestoration from EbitenViewController
2024-09-09 18:05:18 +09:00
Hajime Hoshi
7cc2f8ffcd
cmd/ebitenmobile: add comments
2024-09-09 17:41:17 +09:00
Hajime Hoshi
07d29fa729
cmd/ebitenmobile: bug fix: consider EbitenSurfaceView recreation
...
On Android Emulator (Small Desktop API 32), EbitenRenderer can be
easily recreated by resizing the window. Thus, EbitenRenderer should
not have any flags like strictContextRestoration. Also, the flag
onceSurfaceCreated_ doesn't work there.
2024-09-09 16:42:57 +09:00
Hajime Hoshi
fcef0a7c29
cmd/ebitenmobile: call setPreserveEGLContextOnPause(true) whatever the option is
...
We found that an app freezes for a little while when resuming it.
In order to improve user experience, always use
setPreserveEGLContextOnPause(true) whichever StrictContextRestoration is
true or false.
2024-09-09 15:20:04 +09:00
Hajime Hoshi
6a51e5b003
internal/restorable: optimize WritePixels
...
This adds (*Image).makeStaleIfDependingOnWithRegion to reduce the
possibility of making an image stale.
2024-09-08 22:55:34 +09:00
Hajime Hoshi
af9bd6a282
all: specify src-regions correctly
...
This parameter was not important and actually not used with usual
shaders. However, now this information will be important for the
restorable package optimization later.
There was a performance issue that was caused by srcRegions, but
now this should not happen thanks to FilterUniformVariables.
Updates #1293
2024-09-08 22:24:15 +09:00
Hajime Hoshi
73565034a9
internal/restorable: refactoring
2024-09-08 19:29:41 +09:00
Hajime Hoshi
bbe3cba110
internal/restorable: remove draw-triangles history items at WritePixels
2024-09-08 18:20:40 +09:00
Hajime Hoshi
f32648b144
internal/restorable: skip adding stale regions when the image doesn't need to be restored
2024-09-08 17:51:09 +09:00
Hajime Hoshi
aa8e112414
internal/restorable: restore a stale image at clearing pixels
2024-09-08 17:48:23 +09:00
Hajime Hoshi
26f0479f16
internal/restorable: typo
2024-09-08 17:06:25 +09:00
Hajime Hoshi
9ef9ea0469
internal/restorable: refactoring
2024-09-08 17:03:18 +09:00
Hajime Hoshi
b36160d9e7
internal/restorable: bug fix: make all the images stale correctly
2024-09-08 16:11:57 +09:00
Hajime Hoshi
20f8df7fc1
internal/restorable: refactoring: remove lastTarget
...
This didn't improve performance very much. Rather, this made the code
a little hard to read and could have a potential issue.
2024-09-08 16:08:36 +09:00
Hajime Hoshi
167c3435f7
internal/restorable: refactoring
2024-09-08 16:03:56 +09:00
Hajime Hoshi
d84b030300
ebiten: give HintOverwriteDstRegion when BlendClear is used
2024-09-08 14:57:20 +09:00
Hajime Hoshi
4824dc0360
internal/restorable: resolve a stale state when possible
2024-09-08 14:28:16 +09:00
Hajime Hoshi
30a2817ab5
internal/restorable: add Hint to optimize drawImageHistoryItem size
2024-09-08 12:24:20 +09:00
Hajime Hoshi
29ef2c84ef
internal/atlas: add comments
2024-09-08 11:31:52 +09:00
Hajime Hoshi
4e6fdc6db5
all: update dependencies
2024-09-08 00:11:18 +09:00
Hajime Hoshi
1488e5e685
internal/graphicscommand: add attributes to images
2024-09-07 23:38:16 +09:00
Hajime Hoshi
4fa8265c58
internal: add comments
2024-09-07 23:24:55 +09:00
Hajime Hoshi
46cf09197b
internal/graphicscommand: enable to show shader names
2024-09-07 22:06:41 +09:00
Hajime Hoshi
393437b8be
internal/graphicscommand: imporve blend log
2024-09-07 21:29:50 +09:00
Hajime Hoshi
1b2a2afbfb
internal/restorable: rename restoring -> restoration
2024-09-07 19:09:00 +09:00
Hajime Hoshi
d50a438c07
internal/restorable: optimize removeDuplicatedRegions
...
Updates #2375
Updates #2626
Updates #3083
2024-09-07 19:01:05 +09:00
Hajime Hoshi
35f4884a74
ebiten: add RunGameOptions.StrictContextRestration
...
This reverts commit a30f075896
.
This change adds a new option StrictContextRestration to make the
restoration optional.
Closes #3083
2024-09-07 18:36:04 +09:00
Hajime Hoshi
935e7a6d5d
Revert "internal/restorable: remove the case when the restoring is needed"
...
This reverts commit c08a2193a9
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
5e18f191c1
Revert "internal/restorable: remove drawTrianglesHistoryItem"
...
This reverts commit afe3f7a8ff
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
16d2052836
Revert "internal/restorable: remove alwaysReadPixelsFromGPU"
...
This reverts commit f3206721a3
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
81d35df33b
Revert "internal/restorable: remove unused functions and variables"
...
This reverts commit 8169253a57
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
6453e552f3
Revert "internal/restorable: remove unnecessary functions and variables around shaders"
...
This reverts commit 4f3e00ec3a
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
34639d0028
Revert "internal/restorable: remove ImageTypeRestorable"
...
This reverts commit 8c2d4e1408
.
Updates #3083
2024-09-07 16:54:20 +09:00