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