Skip to content

Use a smaller sheet in CursorManager.#21557

Merged
PunkPun merged 3 commits into
OpenRA:bleedfrom
RoosterDragon:cursor-sheet
Aug 27, 2024
Merged

Use a smaller sheet in CursorManager.#21557
PunkPun merged 3 commits into
OpenRA:bleedfrom
RoosterDragon:cursor-sheet

Conversation

@RoosterDragon

Copy link
Copy Markdown
Member

Provide an explicit size of 512, smaller than the default 2048. The cursors for all mods still pack onto this single sheet, so we avoid wasting memory on larger sheets.

Sorting the cursors also helps pack them onto the sheets more efficiently.

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the RA one seems quite full

2

I recon it would make sense to add this sheet to the dump sheet command

bleed...PunkPun:OpenRA:Dump-cursors

Disposal seems to be all over the place

@RoosterDragon

Copy link
Copy Markdown
Member Author

the RA one seems quite full

Exposed the size via GraphicSettings, so it's not hardcoded.

I recon it would make sense to add this sheet to the dump sheet command

Seems like a reasonable thing to PR.

Disposal seems to be all over the place

Not sure how it has a Dispose but didn't implement IDisposable - added in.

Comment thread OpenRA.Game/Settings.cs Outdated

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how it has a Dispose but didn't implement IDisposable - added in.

I'm not sure as well. But disposal isn't properly handled. Some things that should be disposed are never disposed within the class as well

Provide an explicit size of 512, smaller than the default 2048. The cursors for all mods still pack onto this single sheet, so we avoid wasting memory on larger sheets.

Sorting the cursors also helps pack them onto the sheets more efficiently.
@RoosterDragon

Copy link
Copy Markdown
Member Author

Not sure how it has a Dispose but didn't implement IDisposable - added in.

I'm not sure as well. But disposal isn't properly handled. Some things that should be disposed are never disposed within the class as well

It looks okay to me. Can you show me what you'd add to the Dispose method?

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All base mods don't overflow into secondary sheets

@PunkPun
PunkPun merged commit dd9aca8 into OpenRA:bleed Aug 27, 2024
@PunkPun

PunkPun commented Aug 27, 2024

Copy link
Copy Markdown
Member

changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants