1 #pragma once 2 #ifdef RCT_NEW_ARCH_ENABLED 3 4 #include <react/renderer/core/PropsParserContext.h> 5 #include <react/renderer/uimanager/UIManager.h> 6 7 #include <memory> 8 #include <set> 9 10 #include "NewestShadowNodesRegistry.h" 11 12 using namespace facebook; 13 using namespace react; 14 15 namespace reanimated { 16 17 class ShadowTreeCloner { 18 public: 19 ShadowTreeCloner( 20 std::shared_ptr<NewestShadowNodesRegistry> newestShadowNodesRegistry, 21 std::shared_ptr<UIManager> uiManager, 22 SurfaceId surfaceId); 23 24 ~ShadowTreeCloner(); 25 26 ShadowNode::Unshared cloneWithNewProps( 27 const ShadowNode::Shared &oldRootNode, 28 const ShadowNodeFamily &family, 29 RawProps &&rawProps); 30 31 void updateYogaChildren(); 32 33 private: 34 std::shared_ptr<NewestShadowNodesRegistry> newestShadowNodesRegistry_; 35 PropsParserContext propsParserContext_; 36 std::set<ShadowNode *> yogaChildrenUpdates_; 37 }; 38 39 } // namespace reanimated 40 41 #endif // RCT_NEW_ARCH_ENABLED 42