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

Don't redraw Path on colour invalidation #6276

Merged
merged 1 commit into from
May 3, 2024

Conversation

EVAST9919
Copy link
Contributor

Partially addresses ppy/osu#21495

Helps in reducing lag on complex (aspire/generated) sliders during fadein/out by not redrawing the slider on colour/alpha change. Note that this won't improve things on position and other geometry changes.
This probably can be applied to all the buffered containers, but I could't think of a good way to generalize that without just copying the same code into BufferedContainer.

Map: https://osu.ppy.sh/beatmapsets/1746664#osu/3572698
master:
https://streamable.com/hhuou2
pr:
https://streamable.com/iv4k0o

@bdach
Copy link
Collaborator

bdach commented May 3, 2024

So as far as I can tell this appears valid. I was sorta worried this could maybe break blending because of

// The path should not receive the true colour to avoid colour doubling when the frame-buffer is rendered to the back-buffer.
public override DrawColourInfo DrawColourInfo => new DrawColourInfo(Color4.White, base.DrawColourInfo.Blending);

but it appears to be fine. That said this is not super obvious to me so I'd probably appreciate a second pair of eyes.

@bdach bdach requested a review from smoogipoo May 3, 2024 08:23
@smoogipoo smoogipoo merged commit c1cfbc5 into ppy:master May 3, 2024
17 of 19 checks passed
@EVAST9919 EVAST9919 deleted the path-colour-invalidation branch May 3, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants