Commit Graph

524 Commits

Author SHA1 Message Date
Hajime Hoshi
d733308eb1 Revert "internal/restorable: integrate Image.WritePixels into internal/atlas"
This reverts commit 6cc8150185.

Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
104cc18477 Revert "internal/restorable: integrate Image.Extend into internal/atlas"
This reverts commit 6151fd313f.

Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
54c117b0de Revert "internal/restorable: integrate Image functions into internal/atlas"
This reverts commit 59896e4447.

Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
5a5feb0401 Revert "internal/restorable: remove Image"
This reverts commit 812cd494de.

Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
0b01aeea16 Revert "internal/restorable: integrate the implementation into internal/atlas"
This reverts commit c404b448aa.

Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
c404b448aa internal/restorable: integrate the implementation into internal/atlas
Closes #805
2024-01-13 19:59:57 +09:00
Hajime Hoshi
812cd494de internal/restorable: remove Image
Updates #805
2024-01-13 19:33:04 +09:00
Hajime Hoshi
59896e4447 internal/restorable: integrate Image functions into internal/atlas
Updates #805
2024-01-13 19:27:14 +09:00
Hajime Hoshi
6151fd313f internal/restorable: integrate Image.Extend into internal/atlas
Updates #805
2024-01-13 19:15:47 +09:00
Hajime Hoshi
6cc8150185 internal/restorable: integrate Image.WritePixels into internal/atlas
Updates #805
2024-01-13 19:05:19 +09:00
Hajime Hoshi
3ee905bc4d internal/restorable: integrate Image.DrawTriangles into internal/atlas
Updates #805
2024-01-13 18:52:06 +09:00
Hajime Hoshi
bfa2c460a2 internal/restorable: integrate Shader.Dispose into internal/atlas
Updates #805
2024-01-13 18:40:31 +09:00
Hajime Hoshi
81e1104613 internal/restorable: refactoring
Updates #805
2024-01-13 18:19:48 +09:00
Hajime Hoshi
e804f9e58c internal/restorable: integrate ReadPixels into internal/atlas
Updates #805
2024-01-13 18:19:43 +09:00
Hajime Hoshi
c5d0ec3de7 internal/restorable: integrate some functions into internal/atlas
Updates #805
2024-01-13 18:05:42 +09:00
Hajime Hoshi
21ef462c37 internal/restorable: remove ImageType
Updates #805
2024-01-13 18:03:39 +09:00
Hajime Hoshi
3651d73e0b internal/atlas: move some functions in internal/restorable to internal/atlas
Updates #805
2024-01-13 14:05:24 +09:00
Hajime Hoshi
f610cb5724 internal/restorable: move SwapBuffers to internal/atlas
Updates #805
2024-01-09 04:55:26 +09:00
Hajime Hoshi
7c9266d8b6 internal/restorable: move DumpImages to internal/atlas
Updates #805
2024-01-09 04:50:22 +09:00
Hajime Hoshi
8c2d4e1408 internal/restorable: remove ImageTypeRestorable
Updates #805
2024-01-09 03:35:32 +09:00
Hajime Hoshi
4f3e00ec3a internal/restorable: remove unnecessary functions and variables around shaders
Updates #805
2024-01-09 03:23:13 +09:00
Hajime Hoshi
8169253a57 internal/restorable: remove unused functions and variables
Updates #805
2024-01-09 02:56:15 +09:00
Hajime Hoshi
f3206721a3 internal/restorable: remove alwaysReadPixelsFromGPU
Updates #805
2024-01-09 02:43:09 +09:00
Hajime Hoshi
afe3f7a8ff internal/restorable: remove drawTrianglesHistoryItem
Updates #805
2024-01-09 02:40:27 +09:00
Hajime Hoshi
48e3c766f7 internal/graphicsdriver: remove Image.IsInvalidated
Updates #805
2024-01-09 00:30:21 +09:00
Hajime Hoshi
c08a2193a9 internal/restorable: remove the case when the restoring is needed
Updates #805
2024-01-09 00:20:35 +09:00
Hajime Hoshi
771e5685f8 internal/graphicsdriver: remove NeedsRestoring()
Updates #805
2024-01-08 23:27:28 +09:00
Hajime Hoshi
a30f075896 cmd/ebitenmobile: use setPreserveEGLContextOnPause(true)
setPreserveEGLContextOnPause(true) suppresses context losts, and
basically we will no longer need our restoring logic.

Updates #805
2024-01-08 20:13:13 +09:00
Hajime Hoshi
4895ae7f93 internal/graphicsdriver/opengl: refactoring: move some functions from internal/ui
Updates #2714
2023-12-23 22:30:13 +09:00
Hajime Hoshi
4e93efa5ac internal/graphicsdriver: reland: add FillRule and replace boolean values with this
Updates #2782
2023-11-04 19:09:50 +09:00
Hajime Hoshi
f695df5924 Revert "internal/graphicsdriver: add FillRule and replace boolean values with this"
This reverts commit 38cf964a3b.

Reason: build failure on Windows
2023-11-04 19:02:40 +09:00
Hajime Hoshi
38cf964a3b internal/graphicsdriver: add FillRule and replace boolean values with this
Updates #2782
2023-11-04 18:57:31 +09:00
Hajime Hoshi
f2544a1bd9 internal/graphicsdriver: use []uint32 instead of []uint16 for indices
Updates #2612
2023-11-04 04:39:17 +09:00
Hajime Hoshi
b94c3fa9bb internal/atlas: split EndFrame into EndFrame and SwapBuffers
This enables to do something asynchronously while executing SwapBuffers
in a different goroutine.

This is a preparation for HandleInput.

Updates #1704
2023-10-24 00:22:04 +09:00
Hajime Hoshi
27fd10595b internal/ui: refactoring: reduce global functions and prefer Get() 2023-10-15 03:40:48 +09:00
Hajime Hoshi
f269b61903 internal/atlas: introduce a managed byte slice pool
A managed byte slice from the new byte slice pool has a function
to release and put it back to the pool explicitly, and this doesn't
rely on GCs.

Updates #1681
Closes #2804
2023-10-09 20:32:32 +09:00
Hajime Hoshi
2405b7e825 internal/restorable: remove unnecessary copying
After 6e5361c328, WritePixels can
expect that the given pixel byte slice is always new, and now can
be assumed immutable. Do not copy the slice for restoring.

Actually, these copying were introduced at 38ce46328a
in order to reuse the same slice regions.
2023-10-09 01:17:43 +09:00
Hajime Hoshi
cc8cf688f4 internal/restorable: use clearImage to avoid allocations 2023-10-08 23:59:31 +09:00
Hajime Hoshi
4ca3fa5e57
internal/graphicsdriver: replace Region with image.Rectangle (#2791)
Closes #2790
2023-09-28 14:29:55 +09:00
Hajime Hoshi
20ef839e03 all: rename arguments in Fragment
Updates #2767
2023-09-21 01:35:57 +09:00
Hajime Hoshi
d9757138a7 internal/restorable: use clearImage to clear a region
This is an improvement for https://github.com/hajimehoshi/ebiten/issues/2676#issuecomment-1650325027

Updates #2676
2023-08-31 23:32:54 +09:00
Hajime Hoshi
e082ea73dc internal/restorable: reuse empty byte slices for ClearPixels
This is an improvement for https://github.com/hajimehoshi/ebiten/issues/2676#issuecomment-1650325027

Updates #2676
2023-08-31 23:02:40 +09:00
Hajime Hoshi
534370f7b1 internal/graphics: enable to specify regions for each source image
This is a preparation to specify different sizes of source images.

Updates #1870
2023-08-27 21:15:01 +09:00
Hajime Hoshi
e270dea460 internal/graphicsdriver: use []PixelsArgs for ReadPixels
Closes #2592
2023-08-17 03:06:48 +09:00
Hajime Hoshi
63df6168d9 internal/shader: use plural forms for Kage compiler directives
This change renames

```
//kage:unit texel
//kage:unit pixel
```

to

```
//kage:unit texels
//kage:unit pixels
```

.

Closes #2717
2023-08-01 11:41:38 +09:00
Hajime Hoshi
3869e2e4f6 internal/ui: refactoring: integrate the render thread usages into internal/graphicscommand
Updates #2664
2023-07-30 03:50:49 +09:00
Hajime Hoshi
8de08295e9 internal/restorable: refactoring 2023-05-26 01:44:13 +09:00
Hajime Hoshi
0f4066e7ac internal/restorable: remove clearIfOverlapped
We found clearIfOverlapped could be a heavy task in some actual applications.
Instead of clearing existing data in the pixels records, add a new record
with a nil slice which indicates a cleared region.
2023-05-25 21:26:53 +09:00
Hajime Hoshi
47f19da710 internal/restorable: early return for an empty rectangle 2023-05-25 19:17:22 +09:00
Hajime Hoshi
20edb04e5e internal/restorable: refactoring: add EndFrame 2023-05-08 01:09:25 +09:00