8000 Make GlyphLayout's GlyphRun acquisition overrideable by LobbyDivinus · Pull Request #7588 · libgdx/libgdx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make GlyphLayout's GlyphRun acquisition overrideable #7588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LobbyDivinus
Copy link

This PR basically serves as a solution to #7582 by allowing the user to implement custom pooling mechanic that could for example allow for thread safe use

This PR basically serves as a solution to libgdx#7582 by allowing the user to implement custom pooling mechanic that could for example allow for thread safe use
@Berstanio
Copy link
Contributor

This PR basically serves as a solution to #7582 by allowing the user to implement custom pooling mechanic that could for example allow for thread safe use

Just as a note, you can achieve similar already by calling Pools#set on startup.

@LobbyDivinus
Copy link
Author

True, that can be used to implement a thread safe pool for glyph runs. I don't think it can fix the access to static colorStack for fonts that use formatting though.

@Berstanio
Copy link
Contributor
Berstanio commented Mar 18, 2025

I don't think it can fix the access to static colorStack for fonts that use formatting though.

Thats true. From what I can see, it should be okay to just move the colorStack creation into the method (as it's not called per frame) or pool it. But others might know more about it.

Regarding the thread safe pool, I'm honestly in favor of making the standard libGDX pool thread safe. Having static methods not be thread-safe, especially such universal ones, seems like a big footgun to me.

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.

2 participants
0