Skip to content
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

Reduce container nesting inside PathControlPointPiece #28205

Merged
merged 1 commit into from
May 19, 2024

Conversation

EVAST9919
Copy link
Contributor

@EVAST9919 EVAST9919 commented May 18, 2024

Another step towards resolving #21495.
Can potentially be improved further by making a custom circle drawable which isn't a CircularContainer with a Box inside. Though at this point we are already limited by the draw thread, so next step would probably be adding a BufferedContainer to the mix.
Or better yet use a texture to draw circles to avoid masking overhead and only override ReceivePositionalInputAt. It's would be possible to use CircularProgress, but with too many circles there's an overhead of switching between uniform buffers (which is even bigger than pushing/popping masking info at least for me).

master pr
osu_2024-05-18_23-35-16 osu_2024-05-18_23-32-01

@EVAST9919
Copy link
Contributor Author

So now I have a way to draw circles without masking or uniform buffers, which improves performance by a lot:

this pr this pr + fast circles
331830752-8c7f98ec-55c6-4b21-8bf2-39e04b583923 osu_2024-05-19_01-58-43

Framework branch: https://github.com/ppy/osu-framework/compare/master...EVAST9919:hacky-circle?expand=1
Let me know if it's something worth a pr.

Comment on lines +196 to +197
Colour = colour;
Scale = new Vector2(hitObject.Scale);
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Generally the reason we add the nested container in the first place is to isolate things like colour/scale from acting on this. It avoids cases where a drawable changes these values, but then they are changed from outside and overwrite the internal values.

Because this is a very local usage I'm willing to let this slide but keep this in mind for more generic cases.

@peppy peppy merged commit 9c559d9 into ppy:master May 19, 2024
11 of 17 checks passed
@EVAST9919 EVAST9919 deleted the control-point-nesting branch May 19, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants