Skip to content

Commit ee1f7cb

Browse files
committed
chore: Start preparing animation dependencies
1 parent 4f219d3 commit ee1f7cb

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

src/SamplesApp/UITests.Shared/UITests.Shared.projitems

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5553,6 +5553,7 @@
55535553
<Compile Include="$(MSBuildThisFileDirectory)Microsoft_UI_Xaml_Controls\AnimatedIconTests\AnimatedIconPage.xaml.cs">
55545554
<DependentUpon>AnimatedIconPage.xaml</DependentUpon>
55555555
</Compile>
5556+
<Compile Include="$(MSBuildThisFileDirectory)Microsoft_UI_Xaml_Controls\AnimatedVisualPlayer\Checkmark.cs" />
55565557
<Compile Include="$(MSBuildThisFileDirectory)Microsoft_UI_Xaml_Controls\BreadcrumbTests\BreadcrumbBarPage.xaml.cs">
55575558
<DependentUpon>BreadcrumbBarPage.xaml</DependentUpon>
55585559
</Compile>

src/Uno.UI.Composition/Composition/Compositor.cs

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,41 @@ public Compositor()
2828
// See https://github.com/dotnet/runtime/blob/c52fd37cc835a13bcfa9a64fdfe7520809a75345/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Stopwatch.cs#L157
2929
public long TimestampInTicks => unchecked((long)(Stopwatch.GetTimestamp() * s_tickFrequency));
3030

31+
/// <summary>
32+
/// Creates an instance of AnimationController.
33+
/// </summary>
34+
/// <returns>The created AnimationController object.</returns>
35+
public AnimationController CreateAnimationController() => new(this);
36+
37+
/// <summary>
38+
/// Creates an instance of CompositionColorBrush.
39+
/// </summary>
40+
/// <returns>Returns the created CompositionColorBrush object.</returns>
41+
public CompositionColorBrush CreateColorBrush() => new(this);
42+
43+
/// <summary>
44+
/// Creates an instance of CompositionColorBrush using the specified color.
45+
/// </summary>
46+
/// <param name="color">The color for the brush to use.</param>
47+
/// <returns>Returns the created CompositionColorBrush object.</returns>
48+
public CompositionColorBrush CreateColorBrush(Color color) => new(this)
49+
{
50+
Color = color
51+
};
52+
3153
internal static Compositor GetSharedCompositor() => _sharedCompositorLazy.Value;
3254

3355
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3456
internal static CompositionEasingFunction GetDefaultEasingFunction() => _defaultEasingFunction.Value;
3557

36-
public ContainerVisual CreateContainerVisual()
37-
=> new ContainerVisual(this);
58+
59+
public ContainerVisual CreateContainerVisual() => new(this);
3860

3961
public SpriteVisual CreateSpriteVisual()
4062
=> new SpriteVisual(this);
4163

42-
public CompositionColorBrush CreateColorBrush()
43-
=> new CompositionColorBrush(this);
4464

45-
public CompositionColorBrush CreateColorBrush(Color color)
46-
=> new CompositionColorBrush(this)
47-
{
48-
Color = color
49-
};
65+
5066

5167
public ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation()
5268
=> new ScalarKeyFrameAnimation(this);

src/Uno.UI.Composition/Generated/3.0.0.0/Microsoft.UI.Composition/Compositor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public static float MinGlobalPlaybackRate
173173
#endif
174174
// Skipping already declared method Microsoft.UI.Composition.Compositor.CreateRadialGradientBrush()
175175
// Skipping already declared method Microsoft.UI.Composition.Compositor.CreateVisualSurface()
176-
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
176+
#if false
177177
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
178178
public global::Microsoft.UI.Composition.AnimationController CreateAnimationController()
179179
{

0 commit comments

Comments
 (0)