forked from ppy/osu-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into InputKey-Character
- Loading branch information
Showing
182 changed files
with
4,022 additions
and
1,108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2021 ppy Pty Ltd <[email protected]>. | ||
Copyright (c) 2024 ppy Pty Ltd <[email protected]>. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using BenchmarkDotNet.Attributes; | ||
using osu.Framework.Bindables; | ||
|
||
namespace osu.Framework.Benchmarks | ||
{ | ||
[MemoryDiagnoser] | ||
public class BenchmarkBindableNumber | ||
{ | ||
private readonly BindableInt bindableNoPrecision = new BindableInt(); | ||
private readonly BindableInt bindableWithPrecision = new BindableInt { Precision = 5 }; | ||
|
||
[Benchmark] | ||
public void SetValueNoPrecision() | ||
{ | ||
for (int i = 0; i < 1000; i++) | ||
bindableNoPrecision.Value = i; | ||
} | ||
|
||
[Benchmark] | ||
public void SetValueWithPrecision() | ||
{ | ||
for (int i = 0; i < 1000; i++) | ||
bindableWithPrecision.Value = i; | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
osu.Framework.Benchmarks/BenchmarkPiecewiseLinearToBezier.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Collections.Generic; | ||
using BenchmarkDotNet.Attributes; | ||
using osu.Framework.Utils; | ||
using osuTK; | ||
|
||
namespace osu.Framework.Benchmarks | ||
{ | ||
public class BenchmarkPiecewiseLinearToBezier : BenchmarkTest | ||
{ | ||
private Vector2[] inputPath = null!; | ||
|
||
[Params(5, 25)] | ||
public int NumControlPoints; | ||
|
||
[Params(5, 200)] | ||
public int NumTestPoints; | ||
|
||
[Params(0, 100, 200)] | ||
public int MaxIterations; | ||
|
||
public override void SetUp() | ||
{ | ||
base.SetUp(); | ||
|
||
Vector2[] points = new Vector2[5]; | ||
points[0] = new Vector2(50, 250); | ||
points[1] = new Vector2(150, 230); | ||
points[2] = new Vector2(100, 150); | ||
points[3] = new Vector2(200, 80); | ||
points[4] = new Vector2(250, 50); | ||
inputPath = PathApproximator.LagrangePolynomialToPiecewiseLinear(points).ToArray(); | ||
} | ||
|
||
[Benchmark] | ||
public List<Vector2> PiecewiseLinearToBezier() | ||
{ | ||
return PathApproximator.PiecewiseLinearToBezier(inputPath, NumControlPoints, NumTestPoints, MaxIterations); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+148 KB
(100%)
osu.Framework.NativeLibs/runtimes/linux-x64/native/libavcodec.so
Binary file not shown.
Binary file modified
BIN
+28.3 KB
(110%)
osu.Framework.NativeLibs/runtimes/linux-x64/native/libavformat.so
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/linux-x64/native/libavutil.so
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/linux-x64/native/libswscale.so
Binary file not shown.
Binary file modified
BIN
+273 KB
(100%)
osu.Framework.NativeLibs/runtimes/osx/native/libavcodec.58.dylib
Binary file not shown.
Binary file modified
BIN
+65.1 KB
(110%)
osu.Framework.NativeLibs/runtimes/osx/native/libavformat.58.dylib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/osx/native/libavutil.56.dylib
Binary file not shown.
Binary file modified
BIN
-32 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/osx/native/libswscale.5.dylib
Binary file not shown.
Binary file modified
BIN
+131 KB
(100%)
osu.Framework.NativeLibs/runtimes/win-arm64/native/avcodec-58.dll
Binary file not shown.
Binary file modified
BIN
+32 KB
(110%)
osu.Framework.NativeLibs/runtimes/win-arm64/native/avformat-58.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/win-arm64/native/avutil-56.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/win-arm64/native/swscale-5.dll
Binary file not shown.
Binary file modified
BIN
+152 KB
(100%)
osu.Framework.NativeLibs/runtimes/win-x64/native/avcodec-58.dll
Binary file not shown.
Binary file modified
BIN
+37.5 KB
(110%)
osu.Framework.NativeLibs/runtimes/win-x64/native/avformat-58.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/win-x64/native/avutil-56.dll
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+512 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/win-x64/native/swscale-5.dll
Binary file not shown.
Binary file modified
BIN
+156 KB
(100%)
osu.Framework.NativeLibs/runtimes/win-x86/native/avcodec-58.dll
Binary file not shown.
Binary file modified
BIN
+39.5 KB
(110%)
osu.Framework.NativeLibs/runtimes/win-x86/native/avformat-58.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/win-x86/native/avutil-56.dll
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
osu.Framework.NativeLibs/runtimes/win-x86/native/swscale-5.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.