mirror of
https://github.com/osukey/osukey.git
synced 2025-05-03 20:57:28 +09:00
Remove cached frame buffer
This commit is contained in:
parent
3e8711ed96
commit
6180d0d620
@ -51,7 +51,8 @@ namespace osu.Game.Screens.Play
|
|||||||
if (value == values) return;
|
if (value == values) return;
|
||||||
|
|
||||||
values = value;
|
values = value;
|
||||||
graphNeedsUpdate = true;
|
scheduledCreate?.Cancel();
|
||||||
|
scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,27 +71,6 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledDelegate scheduledCreate;
|
private ScheduledDelegate scheduledCreate;
|
||||||
|
|
||||||
private bool graphNeedsUpdate;
|
|
||||||
|
|
||||||
private Vector2 previousDrawSize;
|
|
||||||
|
|
||||||
protected override void Update()
|
|
||||||
{
|
|
||||||
base.Update();
|
|
||||||
|
|
||||||
if (graphNeedsUpdate || (values != null && DrawSize != previousDrawSize))
|
|
||||||
{
|
|
||||||
columns?.FadeOut(500, Easing.OutQuint).Expire();
|
|
||||||
|
|
||||||
scheduledCreate?.Cancel();
|
|
||||||
scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500);
|
|
||||||
|
|
||||||
previousDrawSize = DrawSize;
|
|
||||||
graphNeedsUpdate = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private CancellationTokenSource cts;
|
private CancellationTokenSource cts;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -98,7 +78,7 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void RecreateGraph()
|
protected virtual void RecreateGraph()
|
||||||
{
|
{
|
||||||
var newColumns = new BufferedContainer<Column>(cachedFrameBuffer: true)
|
var newColumns = new BufferedContainer<Column>
|
||||||
{
|
{
|
||||||
RedrawOnScale = false,
|
RedrawOnScale = false,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user