File tree Expand file tree Collapse file tree
packages/react-native/ReactCommon/react/renderer/animated Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,11 +89,13 @@ NativeAnimatedNodesManager::NativeAnimatedNodesManager(
8989 LOG (ERROR )
9090 << " C++ Animated was setup without a way to update UI. Animations will not work." ;
9191 }
92- // shouldn't be initialized here, but it's convenient for now
93- animationBackend_ = std::make_shared<AnimationBackend>(
94- startOnRenderCallback_,
95- stopOnRenderCallback_,
96- directManipulationCallback_);
92+ if (ReactNativeFeatureFlags::useSharedAnimatedBackend ()) {
93+ // shouldn't be initialized here, but it's convenient for now
94+ animationBackend_ = std::make_shared<AnimationBackend>(
95+ startOnRenderCallback_,
96+ stopOnRenderCallback_,
97+ directManipulationCallback_);
98+ }
9799}
98100
99101NativeAnimatedNodesManager::~NativeAnimatedNodesManager () noexcept {
@@ -875,6 +877,9 @@ void NativeAnimatedNodesManager::schedulePropsCommit(
875877}
876878
877879AnimationMutations NativeAnimatedNodesManager::pullAnimationMutations () {
880+ if (!ReactNativeFeatureFlags::useSharedAnimatedBackend ()) {
881+ return {};
882+ }
878883 TraceSection s (
879884 " NativeAnimatedNodesManager::pullAnimations" ,
880885 " numActiveAnimations" ,
You can’t perform that action at this time.
0 commit comments