Skip to content

Commit

Permalink
Implement feature AnimatedVisualPlayer (#130)
Browse files Browse the repository at this point in the history
* merge AnimatedVisualPlayer change from winui_rs5 to master in GitHub.

Merged PR 2627158: AnimatedVisualPlayer: Fix bug that AnimatedVisualPlayer does not accept hit-testing for pointer event handler

The change is set a transparent background for AnimatedVisualPlayer(looks like UIElement, Element content panel in real) in ::OnLoaded. Element content panel has visual tree underneath for rendering. And a xaml element background child under this panel for hit-testing.

Related work items: #19685745

merge PR 2638219: AnimatedVisualPlayer: Fix IsPlaying not working issue

Merged PR 2644493: fix keyframe crossing bounds scenario issue

This issue is caused by in-correct split crossing bounds key frame animation into two. when [fromKeyframe...toKeyframe] range is defined as [0.35...0], it is supposed to have two key frame animations, one is [0.35...1], another one is nothing. However, we have another one [1+10e-7, 0]. clearly 1 + 10e-7 is greater than 1 and crash the app.

The fix is to check [fromKeyframe...toKeyframe] range value, when fromKeyframe > toKeyframe, but toKeyframe == 0, then simply correct toKeyframe to 1 to avoid additional key frame animation.

Also, when fromKeyframe == 1, then simply correct fromKeyframe to 0 to save additional key frame animation as well.

Related work items: #19757860

merge PR 2665041: [Lottie][Ship-Blocker] fix reverse negative playbackrate animation not working bug.

merge PR 2670894: [Lottie][Ship-Blocker]Adding missing AVP bug fix test in WinUI

correct some configuration or namespace missing issues.

delete unrelated files.

use codegen for dependency properties in AnimatedVisualPlayer.

Removed experimental flags for AVP and abandoned other duplicate PR. Set the expected default values for dependency properties initialization in *idl file of AVP. Added build support for UseInsiderSDK. Added/corrected telemetry instrumenting code.

Added callback registration macro for dependency properties in .idl if necessary. Automated test has being run and passed for AVP accessibility tests.

* add AnimatedVisualPlayer and its test items into solution. massaging more using USE_INTERNAL_SDK, auto test running AVP passed in nebula VM.

* restore to USE_INSIDER_SDK because of upgrading to SDK 18312

* upgrade RunTests/Build SDK version to insider SDK 18312.

* Replace USE_INSIDER_SDK with USE_INTERNAL_SDK for CommandBarFlyout related. Correct Win2D 1.23.0 with Win2D 1.22.0 in WUXTestApp solution.

* Removed Win2D.uwp package reference by updating LOttieLogo.cs. Removed redundante header includes in AnimatedVisualPlayer.h

* Add CompositionObject into Windows.UI.Composition namesapce in XamlMetadataProviderWindowsCodeGen.tt

* remove Windows.Foundation.Metadata direction in AnimatedVisualPlayerTests.cs for windows build.

* remove AVP from windows build.

* remove AVP from windows build in XamlMetadataProviderGenerated.tt

* add os version check in AVP::UpdateContent to avoid source instantiation in RS1|2|3 where RS4 API ICompositor5 QI failed and crash taef test app.

* remove hack of commenting out return null for OS check in TryCreateAnimatedVisual

* More agressively to turn off USE_INSIDER_SDK to USE_INTERNAL_SDK to avoid atlas test failures in RS3_desktop test run.

* fix merge conflicts. in TreeViewAutomationPeers.idl

* more massaging from USE_INSIDER_SDK to USE_INTERNAL_SDK to maks ATLAS test run happy in RS3.

* Keep USE_INSIDER_SDK consistent with recent master. USE_INTERNAL_SDK for commandbarflyout and slider/buttonInteraction test to filter them out.

* switch all USE_INSIDER_SDK|UseInsiderSDK code to USE_INTERNAL_SDK|UseInternalSDK except AVP

* work around to fix rs3 xbf issue with SDK 18312. turn USE_INSIDER_SDK to USE_INTERNAL_SDK for razzle.

* Rmove Any CPU configurations from MUXControls.sln

* switch some USE_INSTERNAL_SDK to USE_INSIDE_SDK. xbf work around for RS4 and RS5.

* Resolve this pointer captured in m_batch; fix source revoker issue; other issue; add prefxied.
  • Loading branch information
improbabilityphysics authored Jan 31, 2019
1 parent a4a0e2a commit 4b48ecf
Show file tree
Hide file tree
Showing 48 changed files with 7,971 additions and 38 deletions.
8 changes: 8 additions & 0 deletions Build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ if "%1" == "/UseInsiderSDK" (
shift
goto :MoreArguments
)
if "%1" == "/UseInternalSDK" (
REM echo UseInternalSDK
set USEINTERNALSDK=1
shift
goto :MoreArguments
)
if "%1" == "/project" (
set PROJECTPATH=%~2
shift
Expand Down Expand Up @@ -110,6 +116,7 @@ set EXTRAMSBUILDPARAMS=
if "%BUILDLEANMUXFORTHESTOREAPP%" == "1" ( set EXTRAMSBUILDPARAMS=/p:BuildLeanMuxForTheStoreApp=true )
if "%MUXFINAL%" == "1" ( set EXTRAMSBUILDPARAMS=/p:MUXFinalRelease=true )
if "%USEINSIDERSDK%" == "1" ( set EXTRAMSBUILDPARAMS=/p:UseInsiderSDK=true )
if "%USEINTERNALSDK%" == "1" ( set EXTRAMSBUILDPARAMS=/p:UseInternalSDK=true )

REM Need an explicit full path to MSBuild.exe or it will fall back to 14.0 for some reason
set MSBUILDPATH=%VSINSTALLDIR%\MSBuild\15.0\Bin\MSBuild.exe
Expand Down Expand Up @@ -165,6 +172,7 @@ echo Options:
echo /leanmux - build lean mux for the store
echo /muxfinal - build "final" bits which have the winmd stripped of experimental types
echo /UseInsiderSDK - build using insider SDK
echo /UseInternalSDK - build using internal SDK
echo /project ^<path^> - builds a specific project
echo.

Expand Down
18 changes: 18 additions & 0 deletions MUXControls.sln
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IXMPTestApp", "test\IXMPTes
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IXMPTestApp.TAEF", "test\IXMPTestApp\TAEF\IXMPTestApp.TAEF.csproj", "{74F24BC4-794D-4CB2-8420-80FF7FDACFE9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AnimatedVisualPlayer", "AnimatedVisualPlayer", "{80CCA53D-4A82-4F9F-A825-4FA3718C2AE0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AnimatedVisualPlayer", "dev\AnimatedVisualPlayer\AnimatedVisualPlayer.vcxitems", "{B39300D2-4510-44EA-AA7B-EDA9118F830E}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "AnimatedVisualPlayer_InteractionTests", "dev\AnimatedVisualPlayer\InteractionTests\AnimatedVisualPlayer_InteractionTests.shproj", "{CBAACCF6-A27D-40B3-980B-ADF51A2EBB89}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "AnimatedVisualPlayer_TestUI", "dev\AnimatedVisualPlayer\TestUI\AnimatedVisualPlayer_TestUI.shproj", "{DBEC0BE4-BA3F-41C9-A303-AF98201BE6DC}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
dev\ParallaxView\TestUI\ParallaxView_TestUI.projitems*{00c52fd5-42fd-33b4-84a0-795c9b5a014d}*SharedItemsImports = 13
Expand Down Expand Up @@ -676,6 +684,7 @@ Global
dev\ColorPicker\InteractionTests\ColorPicker_InteractionTests.projitems*{a4d2fae8-e7fc-4100-91ff-2202fac91c70}*SharedItemsImports = 13
dev\CommonStyles\TestUI\CommonStyles_TestUI.projitems*{a7f6d6c4-a5a9-43eb-930c-b766417a5e5c}*SharedItemsImports = 13
dev\Materials\Acrylic\TestUI\AcrylicBrush_TestUI.projitems*{a800e818-7212-4fd7-ae3a-1dcab539db87}*SharedItemsImports = 13
dev\AnimatedVisualPlayer\AnimatedVisualPlayer.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\Collections\Collections.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\ColorPicker\ColorPicker.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\CommandBarFlyout\CommandBarFlyout.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
Expand Down Expand Up @@ -716,6 +725,7 @@ Global
dev\ScrollBar2\TestUI\ScrollBar2_TestUI.projitems*{b01524d9-32fa-58bc-84a9-49ac965a31ad}*SharedItemsImports = 13
dev\PersonPicture\InteractionTests\PersonPicture_InteractionTests.projitems*{b0c15318-1f57-4914-b860-ebf248841511}*SharedItemsImports = 13
dev\TreeView\TestUI\TreeView_TestUI.projitems*{b2c714dd-9c6b-400c-9cef-13a2d48378bd}*SharedItemsImports = 13
dev\AnimatedVisualPlayer\AnimatedVisualPlayer.vcxitems*{b39300d2-4510-44ea-aa7b-eda9118f830e}*SharedItemsImports = 9
dev\SwipeControl\SwipeControl_APITests\SwipeControl_APITests.projitems*{b75d5d7e-6986-4500-972e-2c10a9b7cc10}*SharedItemsImports = 13
dev\Interactions\SliderInteraction\InteractionTests\SliderInteraction_InteractionTests.projitems*{bbbb0add-4e05-430c-9ffd-08a299fd1b06}*SharedItemsImports = 13
dev\SwipeControl\SwipeControl_TestUI\SwipeControl_TestUI.projitems*{bc75c32b-f63a-4f2d-902c-8142db31a2e7}*SharedItemsImports = 13
Expand All @@ -724,15 +734,18 @@ Global
dev\ScrollViewer\InteractionTests\ScrollViewer_InteractionTests.projitems*{bfaad015-232d-5d2b-b28f-5ef717d3e648}*SharedItemsImports = 13
dev\PullToRefresh\RefreshVisualizer\APITests\RefreshVisualizer_APITests.projitems*{c0d77e37-d2d0-4e37-b6a1-8e6eae28945d}*SharedItemsImports = 13
dev\Interactions\ButtonInteraction\InteractionTests\ButtonInteraction_InteractionTests.projitems*{c332ceaf-68b6-4980-b6f3-b15e350cdce0}*SharedItemsImports = 13
dev\AnimatedVisualPlayer\InteractionTests\AnimatedVisualPlayer_InteractionTests.projitems*{cbaaccf6-a27d-40b3-980b-adf51a2ebb89}*SharedItemsImports = 13
dev\LayoutPanel\APITests\LayoutPanel_APITests.projitems*{cddf46ef-aa2d-4bb3-b33e-98b3dbb3c41b}*SharedItemsImports = 13
dev\Interactions\SliderInteraction\SliderInteraction.vcxitems*{d097a4d5-6b61-424d-99f0-f335eff41665}*SharedItemsImports = 9
dev\MenuFlyout\MenuFlyout.vcxitems*{d5c2b2a0-50af-4ace-939d-17d1ed79fd6f}*SharedItemsImports = 9
dev\IconSource\APITests\IconSource_APITests.projitems*{d73627e9-564c-4a72-a12d-f6c82f17ad0d}*SharedItemsImports = 13
dev\DropDownButton\InteractionTests\DropDownButton_InteractionTests.projitems*{d9ac3716-5608-40d0-999f-26f4b544be33}*SharedItemsImports = 13
dev\AnimatedVisualPlayer\TestUI\AnimatedVisualPlayer_TestUI.projitems*{dbec0be4-ba3f-41c9-a303-af98201be6dc}*SharedItemsImports = 13
dev\PullToRefresh\RefreshContainer\TestUI\RefreshContainer_TestUI.projitems*{ddb468e4-7b64-4301-8fcb-1bebbb1e689f}*SharedItemsImports = 13
dev\CommonManaged\CommonManaged.projitems*{de061ed1-947e-487c-81b8-32e92e85b95f}*SharedItemsImports = 13
test\IXMPTestApp\IXMPTestApp.Shared.projitems*{de061ed1-947e-487c-81b8-32e92e85b95f}*SharedItemsImports = 13
dev\TreeView\APITests\TreeView_APITests.projitems*{de885c66-929c-464e-bac4-3e076ec46483}*SharedItemsImports = 13
dev\AnimatedVisualPlayer\TestUI\AnimatedVisualPlayer_TestUI.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\ColorPicker\APITests\ColorPicker_APITests.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\ColorPicker\TestUI\ColorPicker_TestUI.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\CommandBarFlyout\APITests\CommandBarFlyout_APITests.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
Expand Down Expand Up @@ -796,6 +809,7 @@ Global
dev\Materials\Acrylic\InteractionTests\AcrylicBrush_InteractionTests.projitems*{f601284a-00c1-49f9-99b3-70d45585f784}*SharedItemsImports = 13
dev\SplitButton\SplitButton.vcxitems*{faf114dd-af1f-4d9f-a511-354c19912aad}*SharedItemsImports = 9
test\TestAppUtils\TestAppUtils.projitems*{fb0d3053-3135-403f-b542-977f3b781673}*SharedItemsImports = 13
dev\AnimatedVisualPlayer\TestUI\AnimatedVisualPlayer_TestUI.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\ColorPicker\APITests\ColorPicker_APITests.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\ColorPicker\TestUI\ColorPicker_TestUI.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\CommandBarFlyout\APITests\CommandBarFlyout_APITests.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
Expand Down Expand Up @@ -1422,6 +1436,10 @@ Global
{4D8C5D1B-F982-44A1-B744-DD0E51651BF2} = {85F9040A-109D-42FF-9BE3-4CF4181DDEF1}
{FCC396F5-26DD-4CA3-981E-C7BC9FEA4546} = {C9B1268D-8639-424F-8AEC-EF4EC5459184}
{74F24BC4-794D-4CB2-8420-80FF7FDACFE9} = {C9B1268D-8639-424F-8AEC-EF4EC5459184}
{80CCA53D-4A82-4F9F-A825-4FA3718C2AE0} = {67599AD5-51EC-44CB-85CE-B60CD8CBA270}
{B39300D2-4510-44EA-AA7B-EDA9118F830E} = {80CCA53D-4A82-4F9F-A825-4FA3718C2AE0}
{CBAACCF6-A27D-40B3-980B-ADF51A2EBB89} = {80CCA53D-4A82-4F9F-A825-4FA3718C2AE0}
{DBEC0BE4-BA3F-41C9-A303-AF98201BE6DC} = {80CCA53D-4A82-4F9F-A825-4FA3718C2AE0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D93836AB-52D3-4DE2-AE25-23F26F55ECED}
Expand Down
1 change: 1 addition & 0 deletions SdkVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<SDKVersion19H1Insider>10.0.18312.0</SDKVersion19H1Insider>
</PropertyGroup>
<PropertyGroup>
<UseInsiderSDK>true</UseInsiderSDK>
<!-- By default we use the publicly shipped SDK version which is RS5 now -->
<MuxSdkVersion Condition="$(UseInsiderSDK) != 'true'">$(SDKVersionRS5)</MuxSdkVersion>

Expand Down
4 changes: 2 additions & 2 deletions build/AzurePipelinesTemplates/MUX-BuildProject-Steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ steps:
inputs:
targetType: filePath
filePath: build\Install-WindowsSdkISO.ps1
arguments: 17763
displayName: 'Install RS5 SDK (17763)'
arguments: 18312
displayName: 'Install Insider SDK (18312)'

- template: MUX-InstallNuget-Steps.yml

Expand Down
Loading

0 comments on commit 4b48ecf

Please sign in to comment.