Hajime Hoshi
840c4d24df
graphicsutil: Accept matrix parameters directly for performance
2018-06-19 00:19:32 +09:00
Hajime Hoshi
a3c754d2cc
graphics: Restrict QuadVertices to allow only power of 2 sizes
...
Now QuadVertices can skip calculating power of 2 values.
2018-06-17 23:05:19 +09:00
Hajime Hoshi
ac24a8382f
graphicsutil: Extract matrix applying for performance
2018-06-17 19:45:09 +09:00
Hajime Hoshi
95561bbf6b
affine: Use float32 values for GeoM
...
float32 was slow on GopherJS, but not slow on Wasm.
2018-06-17 15:38:10 +09:00
Hajime Hoshi
4c2fc30311
graphicsutil: Don't allow nil GeoM
2018-06-17 01:48:56 +09:00
Hajime Hoshi
b4ace53596
affine: Remove GeoM to avoid GeoM allocations on the heap
2018-06-17 00:59:50 +09:00
Hajime Hoshi
a90b7efdf4
shareable: Refactoring
2018-06-11 01:02:25 +09:00
Hajime Hoshi
3ee76ffd8e
graphicsutil: Move vertices.go to graphicsutil
2018-06-10 23:08:22 +09:00
Hajime Hoshi
9745ccee47
restorable: Make (*Image).DrawImage accept vertices and indices
2018-06-10 22:59:00 +09:00
Hajime Hoshi
92631e64ed
Remove internal/sync
...
nosync package for GopherJS is problematic since nosync's mutex
assumes that Lock call is never duplicated, which is not true in
actual applications.
See also #603 .
2018-05-09 23:41:08 +09:00
Hajime Hoshi
03dcd94884
shareable: Bug fix: Don't mark disposed when the image becomes not shared
2018-05-03 11:49:55 +09:00
Hajime Hoshi
ea1444ea7e
shareable: Add checks at operations for disposed images
2018-04-30 03:34:35 +09:00
Hajime Hoshi
9df977dff8
shareable: Add 'disposed' state instead of 'allocated' state
2018-04-30 03:30:10 +09:00
Hajime Hoshi
1f1847c259
shareable: Remove println
2018-04-29 19:10:36 +09:00
Hajime Hoshi
9c408dce7c
shareable: Lazy allocation ( #592 )
...
Clear is called when an image becomes a render target, and it
looks like Clear causes the memory spikes.
Before this change, when an image is created, shared region on a GL
texture is allocated. After that, the image's region is copied to
non-shared region when the image becomes a rendering target.
After this change, an image is not allocated on a GL texture first,
and allocated only when it is necessary. Then, Clear calls can be
avoided as much as possible.
2018-04-29 18:51:51 +09:00
Hajime Hoshi
45afb6db67
Reland: restorable: Merge Clear to ReplacePixel
2018-04-29 13:40:18 +09:00
Hajime Hoshi
613f384cb5
graphics: Add EBITEN_DUMP_IMAGES_KEY
...
Fixes #589
2018-04-28 22:08:20 +09:00
Hajime Hoshi
dff492955d
shareable: Reset finalizer in any cases
2018-04-26 01:51:57 +09:00
Hajime Hoshi
1cf4f30541
Revert "restorable: Merge Clear to ReplacePixels"
...
This reverts commit fb641d88cd
.
Reason: When restoring the image where ReplacePixels is called,
dummyImage might not be restored since there is no record of
relationships between this image and dummyImage. Now pixels is not
nil when reverting by chance, but this would cause problems in the
future.
2018-04-25 22:31:48 +09:00
Hajime Hoshi
fb641d88cd
restorable: Merge Clear to ReplacePixels
...
This can avoid unnecessary stale images that requires loading
pixels from GPU.
2018-04-25 01:30:57 +09:00
Hajime Hoshi
070c8ec737
shareable: Rename variables
2018-04-09 02:18:46 +09:00
Hajime Hoshi
7b5ad46e49
shareable: NewImage* now returns a cleared image
2018-04-06 02:08:12 +09:00
Hajime Hoshi
1a335032a2
shareable: Bug fix: backend's restorable image must be disposed
2018-04-06 01:12:08 +09:00
Hajime Hoshi
8ff79c970a
shareable: Use defer for tests
2018-04-05 12:02:08 +09:00
Hajime Hoshi
24e20306f2
restorable: Move 'putting random-colored dot' to restorable
2018-04-05 11:18:28 +09:00
Hajime Hoshi
810dc33b4a
shareable: Fix comments
2018-04-05 02:41:50 +09:00
Hajime Hoshi
15dcd5764d
shareable: Add shareable_test
2018-04-05 02:35:30 +09:00
Hajime Hoshi
6680b4f8d5
shareable: Bug fix: wrong source image rect in ensureNotShared
2018-04-05 01:07:36 +09:00
Hajime Hoshi
92e5bc31dc
shareable: Refactoring
2018-04-05 00:40:35 +09:00
Hajime Hoshi
e14c05b0fe
shareable: Add comments
2018-03-26 00:13:26 +09:00
Hajime Hoshi
97ce612785
Refactoring: Don't access restorable package directly from ebiten package
2018-03-25 23:37:32 +09:00
Hajime Hoshi
ce8b9283a1
Re^2-land: shareable: Implement extending shareable texture again
2018-03-25 22:41:15 +09:00
Hajime Hoshi
b15fb523a8
shareable: Rename variables
2018-03-24 04:27:10 +09:00
Hajime Hoshi
b92bc6f21c
Revert "shareable: Implement extending shareable texture again"
...
This reverts commit b474946619
.
Reason: #567
2018-03-24 04:23:00 +09:00
Hajime Hoshi
aaa603dd08
Revert "Revert "shareable: Avoid unneeded extending images""
...
This reverts commit 96b9f09058
.
Fixes #561
2018-03-20 02:15:49 +09:00
Hajime Hoshi
3e929de08a
shareable: Revert extending images
...
Fixes #562
2018-03-20 02:14:04 +09:00
Hajime Hoshi
d421648e57
shareable: Bug fix: workaround to fix #562 by disabling extending
2018-03-19 03:26:31 +09:00
Hajime Hoshi
96b9f09058
Revert "shareable: Avoid unneeded extending images"
...
This reverts commit ce4e00ff79
.
Reason: #560
2018-03-19 02:28:17 +09:00
Hajime Hoshi
ce4e00ff79
shareable: Avoid unneeded extending images
2018-03-17 17:41:36 +09:00
Hajime Hoshi
e7925a12bd
shareable: Refactoring
2018-03-16 01:21:33 +09:00
Hajime Hoshi
b474946619
shareable: Implement extending shareable texture again
...
Related to #509
2018-03-11 01:36:47 +09:00
Hajime Hoshi
c37dd9d961
packing: Add Extend
2018-03-11 01:13:53 +09:00
Hajime Hoshi
48408cba11
shareable: Bug fix: Protect critical sections
2018-03-11 00:38:49 +09:00
Hajime Hoshi
c411ca492f
shareable: Set finalizers
2018-03-11 00:07:32 +09:00
Hajime Hoshi
a2d6ae7eee
shareable: Rename ImagePart -> Image
2018-03-11 00:05:06 +09:00
Hajime Hoshi
6c6b25647a
shareable: Rename Image -> backend
2018-03-11 00:02:23 +09:00
Hajime Hoshi
df3960a97c
Add internal/shareable
2018-03-10 23:59:26 +09:00