Commit Graph

35 Commits

Author SHA1 Message Date
Mykhailo Lohachov
012fe52b6f
internal/atlas: use bit manipulation for function power of 2 -like functions (#2915)
Closes #2914
2024-02-25 02:06:52 +09:00
Hajime Hoshi
d906dc3a21 internal/packing: rename a function 2024-01-13 17:42:51 +09:00
Hajime Hoshi
82c7436be5 internal/packing: refactoring: use image.Rectangle 2023-04-27 23:45:57 +09:00
Hajime Hoshi
ce71c31a27 internal/packing: refactoring: remove a redundant check of sizes 2023-04-09 01:13:44 +09:00
divVerent
574925cf7a
packing: remove redundant canAlloc checking and alloc allocating. (#2629)
By removing redundant work done in canAlloc and just calling alloc right away,
this removes 35% contribution to AAAAXY loading CPU time on the profile on
https://user-images.githubusercontent.com/251568/230496805-c5e32c19-9258-49c8-800b-a3f0bc3b072d.svg,
or - as measured via stopwatch - brings loading time on Moto G7 Play from
17.22s to 14.94s after already applying #2627.

This should be safe as there is no case in which alloc succeeds and the
allocated region isn't used; also, there is no case in which alloc mutates the
tree when it doesn't actually succeed (comment added in one place to justify
this).

Closes #2628
2023-04-08 22:03:16 +09:00
Hajime Hoshi
707a44e367 internal/packing: fix the comment 2023-02-28 21:45:58 +09:00
Hajime Hoshi
6b957063d4 internal/packing: bug fix: node's links were not synced correctly
Closes #2584
2023-02-28 20:31:39 +09:00
Hajime Hoshi
0720ec2251 internal/packing: allow initialization with a rectangle size
Updates #2327
2023-02-23 00:45:42 +09:00
Pierre Curto
4de807cc44
all: fix typos (#2558)
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-01-28 19:06:38 +09:00
Hajime Hoshi
bb1021a549 internal/atlas: ensure the given sizes must be power of 2
Updates #2519
2023-01-02 19:17:27 +09:00
Hajime Hoshi
b4d8519f97 internal/packing: remove unused functions 2023-01-02 18:21:21 +09:00
Hajime Hoshi
4ae84c2232 internal/packing: bug fix: wrong logic for extending a page
Before this fix, 0-sized node could be created when extending the
page.

Updates #2327
2022-11-12 17:42:17 +09:00
Hajime Hoshi
c72fd7ffcf internal/packing: enable non-square page size
Closes #2327
2022-11-11 23:11:05 +09:00
Hajime Hoshi
fde964312c internal/packing: reland: refactoring
This change basically relands these commits:

 * e08078d84a
 * 8fa36cc7ef

but with a fix internal/restorable not to create too many images.

Updates #2327
2022-11-11 21:55:11 +09:00
Hajime Hoshi
f593725bf9 Revert "internal/packing: refactoring"
This reverts these commits

* 8fa36cc7ef.
* e08078d84a

Reason: test failures

Updates #2327
2022-11-11 19:35:13 +09:00
Hajime Hoshi
e08078d84a internal/packing: refactoring
Now pages are automatically extended by Alloc.

Updates #2327
2022-11-11 19:12:23 +09:00
Hajime Hoshi
b6bc683991 packing: Bug fix: Extend could create a too big page
Closes #1454
2020-12-31 17:33:27 +09:00
zamadatix
c4dfc69c81 Typo Corrections from https://goreportcard.com/ (#1042)
Correct typo found by https://goreportcard.com/
2020-01-01 23:59:56 +09:00
Hajime Hoshi
95d3561a3a packing: Better panic message 2019-11-18 00:27:34 +09:00
Hajime Hoshi
63f9ac2ccc packing: Add Rollback/CommitExntension
This enables to dry-run to extend pages without cloning.

Fixes #990
2019-11-18 00:23:13 +09:00
Hajime Hoshi
61839506d8 packing: Add an extending count at Extend 2019-11-17 23:39:16 +09:00
Hajime Hoshi
7a399c1b82 shareable: Update page sizes dynamically
Also, all the images cannot use the shareable backends before the
game starts, but it is expected that read-only images will use
shareable backends later.

Fixes #879
2019-06-22 23:05:28 +09:00
Hajime Hoshi
a3eddeb50f Improve panic messages 2019-02-06 23:43:03 -10:00
Hajime Hoshi
c15348f939 packing: Improve panic messages 2018-07-22 05:29:02 +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
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
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
1583cd0f7b packing: Enable to specify max size of a page 2018-03-10 20:53:20 +09:00
Hajime Hoshi
9c72671232 Revert "packing: Add Extend"
This reverts commit 1dd32066d2.

Reason: #542
2018-03-09 16:02:57 +09:00
Hajime Hoshi
86be32dfb5 packing: Add comments 2018-03-08 00:18:28 +09:00
Hajime Hoshi
1dd32066d2 packing: Add Extend 2018-03-08 00:14:51 +09:00
Hajime Hoshi
951568e403 packing: Refactoring 2018-03-06 02:52:36 +09:00
Hajime Hoshi
7e70d5ca69 Rename bsp -> packing 2018-03-06 00:38:56 +09:00