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

Add new DecouplingClock and obsolete DecoupleableInterpolatingFramedClock #6001

Merged
merged 44 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ba7f229
Make `InterpolatingFramedClock`'s sources non-null
peppy Sep 20, 2023
39497f3
Update `TestSceneClock` to mark game-wide clock with a name
peppy Sep 20, 2023
8044cbb
Add basic implementation of `DecouplingFramedClock`
peppy Sep 20, 2023
f9b3a22
Complete implementation of `DecouplingFramedClock` for pass-through mode
peppy Sep 20, 2023
37cd19b
Fix rate/running states not being updated immediately
peppy Sep 20, 2023
6fbd71a
Update tests to test new class
peppy Sep 20, 2023
2a592dc
And now that the old tests are updated, let's rewrite them all
peppy Sep 20, 2023
888e506
Add basic setup for decoupling
peppy Sep 20, 2023
be3b859
Don't require a framed source
peppy Sep 20, 2023
984923f
Make `DecouplingFramedClock`... not a framed clock
peppy Sep 20, 2023
8051828
Add more testability to visual clocks test scene
peppy Sep 20, 2023
17511bc
Fix decoupling edge cases
peppy Sep 20, 2023
fceec3b
Add xmldoc to class
peppy Sep 20, 2023
f6837fc
Mark `DecoupleableInterpolatingFramedClock` as obsolete
peppy Sep 21, 2023
6330038
Seal new decoupling implementation to avoid any future funny-business
peppy Sep 21, 2023
5b4775f
Ensure `DecoupleableInterpolatingFramedClock` can still work correctl…
peppy Sep 21, 2023
4dea285
Fix `Seek` target not transferring correctly when seek succeeds on so…
peppy Sep 21, 2023
eedd1bd
Fix `DecouplingClock.Start` incorrect resetting negative time to zero
peppy Sep 22, 2023
38bf125
Fix potentially incorrect `isRunning` state after source change via `…
peppy Sep 22, 2023
aebf28e
Fix underlying clock not being `Stop`ped when entering a decoupled state
peppy Sep 22, 2023
1db323d
Refactor `IsRunning` to hopefully be easier to follow
peppy Sep 22, 2023
7d45977
Add note about not being a framed clock
peppy Sep 22, 2023
28a5ca9
Update all basic assumption tests to test in both coupled modes
peppy Sep 22, 2023
51eccf4
Add test to show seeking source clock when decoupling can go awry
peppy Sep 22, 2023
142d2c9
Change `InterpolatingFramedClock`'s ctor to require a framed source
peppy Sep 22, 2023
d8b3ebd
Fix `TestSceneClocks` failing and not making much sense
peppy Sep 22, 2023
c7d68bd
Add elapsed millisecond display to clocks test scene
peppy Sep 22, 2023
0fe7147
Reset `currentTime` on `Reset` for good measure (and add test coverage)
peppy Sep 22, 2023
4458110
Convert `DecouplingClock` to be a framed clock implementation
peppy Sep 22, 2023
eb7eb63
Add more documentation, tidy up `ProcessFrame` and reorder members
peppy Sep 22, 2023
6651bae
Fix incorrect reference time handling
peppy Sep 22, 2023
4bebf98
Remove note about test coverage (added in 6651bae1)
peppy Sep 22, 2023
de5683c
Remove outdated remark on frameless implementation and mention change…
peppy Sep 22, 2023
57aa762
Add xmldoc notes on seek and zero handling
peppy Sep 22, 2023
b68dcec
Add test coverage of source clock stopping when entering decoupled
peppy Sep 22, 2023
597c3c7
Improve and split out range limited stopwatch clock
peppy Sep 22, 2023
c7a92d2
Add basic testing of zero boundary playback
peppy Sep 22, 2023
1350e56
Change `IsRunning` to only update state on `ProcessFrame` call
peppy Sep 25, 2023
28d159e
Add test coverage of playback over end boundary
peppy Sep 25, 2023
98f832f
Add test coverage of paused seek beyond source length
peppy Sep 25, 2023
da86faa
Add more correct test coverage of `ChangeSource` post-time and fix ac…
peppy Sep 25, 2023
60ce8c7
Fix intermittent test failure due to `<10000` condition not guarantee…
peppy Sep 26, 2023
83a505c
Add explanatory comments for not handling right-side boundary cross w…
bdach Sep 26, 2023
f595aed
Merge branch 'master' into decoupled-un-fuck
bdach Sep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace osu.Framework.Tests.Clocks
{
[TestFixture]
public class DecoupleableClockTest
public class DecoupleableInterpolatingFramedClockTest
{
private TestClockWithRange source = null!;
private TestDecoupleableClock decoupleable = null!;
Expand Down Expand Up @@ -440,7 +440,9 @@ public void TestStoppingAfterStartingBySourcePreservesState()
Assert.AreEqual(source.CurrentTime, decoupleable.CurrentTime, decoupleable.AllowableErrorMilliseconds, "Decoupled should match source time.");
}

#pragma warning disable CS0618
private class TestDecoupleableClock : DecoupleableInterpolatingFramedClock
#pragma warning restore CS0618
{
public double? CustomAllowableErrorMilliseconds { get; set; }

Expand Down
Loading