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

Media system refactoring #11552

Merged
merged 12 commits into from
May 29, 2023
Merged

Media system refactoring #11552

merged 12 commits into from
May 29, 2023

Conversation

kekekeks
Copy link
Member

General changes:

  • animation/layout/render cycle is now managed from a central location
  • animations are now throttled if animation/layout/render pass takes longer than a frame which previously caused a soft-freeze with input not being processed
  • the public API is trimmed to make sure that we can make other planned changes during the 11.x support cycle

"Changelog":

  • IClock is hidden and is planned to be replaced later
  • Animator classes are hidden and are planned to be refactored later
  • IAnimation members are hidden, it's supposed to be a marker interface for Style.Animations collection now, to start animations manually use Animation.RunAsync
  • Sealed several classes in Avalonia.Animation namespace
  • Spring class is removed from the public API (it wasn't possible to use it directly in a meaningful way anyway)
  • Sealed brushes, transforms, effects and drawings
  • Removed separate dispatcher priorities for Layout and Composition, everything now happens from a central place with Render priority (same as WPF)
    • some private "hook" priorities are added for now, those will be removed later
  • IRenderLoop is hidden and removed from locator
  • IRenderer is hidden (the plan is to remove that concept later)
    • Renderer.Start/Stop exposed as StartRendering/StopRendering on the toplevel (will be on a CompositionTarget/PresentationSource-like type later)
    • Renderer.Diagnistics exposed as RendererDiagnostics (same)
    • Renderer is no longer created by the platform code and is created by TopLevel itself
    • From the user-code hit-testing should be done by VisualExtensions.GetVisual(s)At, which has the same features
    • For unit tests a separate IHitTester interface is added which can be changed for a particular toplevel
  • ILayoutManager is hidden
    • LayoutManager.ExecuteLayoutPass() exposed as TopLevel.UpdateLayout()
  • Custom animators now have a separate base class that only deals with interpolation

Minor improvements:

  • Compositor has a mode that doesn't use DispatcherTimers, useful for unit tests
  • Introduced ScopedTestBase that auto-resets the locator when test is finished

@danwalmsley danwalmsley added this to the 11.0 milestone May 29, 2023
@grokys
Copy link
Member

grokys commented May 29, 2023

Can TransformOperations now be made internal too?

Copy link
Member

@jmacato jmacato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

animation parts lgtm!

@jmacato jmacato enabled auto-merge May 29, 2023 12:29
Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Page transitions seem to have stopped working.

Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TCC working again now. Should fix #11476 I think?

grokys
grokys previously requested changes May 29, 2023
Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spoke too soon: ToggleSwitch now seems to be behaving strangely.

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0035621-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0035629-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@danielmayost
Copy link
Contributor

TCC stop working again

@danwalmsley
Copy link
Member

TCC stop working again

Just tried it here, and its working, you sure you tested the latest commit?

@danielmayost
Copy link
Contributor

danielmayost commented May 29, 2023

Yes sure, It usually skips the animation and only sometimes does the animation, maybe try pressing back and next a few times to reproduce it.

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0035658-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0035674-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0035697-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

auto-merge was automatically disabled May 29, 2023 23:34

Merge queue setting changed

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.

7 participants