mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Merge pull request #27632 from EVAST9919/editor-tick-display
Improve editor performance with many timeline ticks present
This commit is contained in:
commit
01d5a46f3e
@ -7,6 +7,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Caching;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
@ -18,6 +19,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
{
|
||||
public partial class TimelineTickDisplay : TimelinePart<PointVisualisation>
|
||||
{
|
||||
// With current implementation every tick in the sub-tree should be visible, no need to check whether they are masked away.
|
||||
public override bool UpdateSubTreeMasking(Drawable source, RectangleF maskingBounds) => false;
|
||||
|
||||
[Resolved]
|
||||
private EditorBeatmap beatmap { get; set; } = null!;
|
||||
|
||||
@ -165,7 +169,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
|
||||
// save a few drawables beyond the currently used for edge cases.
|
||||
while (drawableIndex < Math.Min(usedDrawables + 16, Count))
|
||||
Children[drawableIndex++].Hide();
|
||||
Children[drawableIndex++].Alpha = 0;
|
||||
|
||||
// expire any excess
|
||||
while (drawableIndex < Count)
|
||||
@ -182,7 +186,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
point = Children[drawableIndex];
|
||||
|
||||
drawableIndex++;
|
||||
point.Show();
|
||||
point.Alpha = 1;
|
||||
|
||||
return point;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user