Skip to content

Commit 53325bb

Browse files
committed
Try with props reverting mechanism
1 parent 8bd9207 commit 53325bb

File tree

6 files changed

+0
-25
lines changed

6 files changed

+0
-25
lines changed

packages/react-native-reanimated/Common/cpp/reanimated/CSS/core/CSSTransition.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <string>
66
#include <unordered_set>
77
#include <utility>
8-
#include <vector>
98

109
namespace reanimated::css {
1110

packages/react-native-reanimated/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ void UpdatesRegistry::setInUpdatesRegistry(
6767
const std::shared_ptr<const ShadowNode> &shadowNode,
6868
const folly::dynamic &props) {
6969
const auto tag = shadowNode->getTag();
70-
#ifdef ANDROID
7170
updatePropsToRevert(tag, &props);
72-
#endif
7371
updatesRegistry_[tag] = std::make_pair(shadowNode, props);
7472
}
7573

@@ -82,9 +80,7 @@ folly::dynamic UpdatesRegistry::getUpdatesFromRegistry(const Tag tag) const {
8280
}
8381

8482
void UpdatesRegistry::removeFromUpdatesRegistry(const Tag tag) {
85-
#ifdef ANDROID
8683
updatePropsToRevert(tag);
87-
#endif
8884
updatesRegistry_.erase(tag);
8985
}
9086

@@ -101,8 +97,6 @@ void UpdatesRegistry::flushUpdatesToRegistry(const UpdatesBatch &updatesBatch) {
10197
}
10298
}
10399

104-
#ifdef ANDROID
105-
106100
bool UpdatesRegistry::hasPropsToRevert() const {
107101
return !propsToRevertMap_.empty();
108102
}
@@ -155,6 +149,4 @@ void UpdatesRegistry::updatePropsToRevert(const Tag tag, const folly::dynamic *n
155149
}
156150
}
157151

158-
#endif
159-
160152
} // namespace reanimated

packages/react-native-reanimated/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ using namespace react;
2020
using UpdatesBatch = std::vector<std::pair<std::shared_ptr<const ShadowNode>, folly::dynamic>>;
2121
using RegistryMap = std::unordered_map<Tag, std::pair<std::shared_ptr<const ShadowNode>, folly::dynamic>>;
2222

23-
#ifdef ANDROID
2423
struct PropsToRevert {
2524
std::shared_ptr<const ShadowNode> shadowNode;
2625
std::unordered_set<std::string> props;
2726
};
2827

2928
using PropsToRevertMap = std::unordered_map<Tag, PropsToRevert>;
30-
#endif
3129

3230
class UpdatesRegistry {
3331
public:
@@ -39,10 +37,8 @@ class UpdatesRegistry {
3937
folly::dynamic get(Tag tag) const;
4038
virtual void remove(Tag tag) = 0;
4139

42-
#ifdef ANDROID
4340
bool hasPropsToRevert() const;
4441
void collectPropsToRevert(PropsToRevertMap &propsToRevertMap);
45-
#endif
4642

4743
void flushUpdates(UpdatesBatch &updatesBatch);
4844
void collectProps(PropsMap &propsMap);
@@ -60,12 +56,9 @@ class UpdatesRegistry {
6056
UpdatesBatch updatesBatch_;
6157

6258
void flushUpdatesToRegistry(const UpdatesBatch &updatesBatch);
63-
64-
#ifdef ANDROID
6559
PropsToRevertMap propsToRevertMap_;
6660

6761
void updatePropsToRevert(Tag tag, const folly::dynamic *newProps = nullptr);
68-
#endif
6962
};
7063

7164
} // namespace reanimated

packages/react-native-reanimated/Common/cpp/reanimated/Fabric/updates/UpdatesRegistryManager.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ PropsMap UpdatesRegistryManager::collectProps() {
8484
return propsMap;
8585
}
8686

87-
#ifdef ANDROID
88-
8987
bool UpdatesRegistryManager::hasPropsToRevert() {
9088
for (auto &registry : registries_) {
9189
if (registry->hasPropsToRevert()) {
@@ -156,6 +154,4 @@ void UpdatesRegistryManager::clearPropsToRevert(const SurfaceId surfaceId) {
156154
}
157155
}
158156

159-
#endif
160-
161157
} // namespace reanimated

packages/react-native-reanimated/Common/cpp/reanimated/Fabric/updates/UpdatesRegistryManager.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ class UpdatesRegistryManager {
3838
void handleNodeRemovals(const RootShadowNode &rootShadowNode);
3939
PropsMap collectProps();
4040

41-
#ifdef ANDROID
4241
bool hasPropsToRevert();
4342
void collectPropsToRevertBySurface(std::unordered_map<SurfaceId, PropsMap> &propsMapBySurface);
4443
void clearPropsToRevert(SurfaceId surfaceId);
45-
#endif
4644

4745
private:
4846
using RemovableShadowNodes = std::unordered_map<Tag, std::shared_ptr<const ShadowNode>>;
@@ -54,12 +52,10 @@ class UpdatesRegistryManager {
5452
std::vector<std::shared_ptr<UpdatesRegistry>> registries_;
5553
const std::shared_ptr<StaticPropsRegistry> staticPropsRegistry_;
5654

57-
#ifdef ANDROID
5855
PropsToRevertMap propsToRevertMap_;
5956

6057
static void
6158
addToPropsMap(PropsMap &propsMap, const std::shared_ptr<const ShadowNode> &shadowNode, const folly::dynamic &props);
62-
#endif
6359
};
6460

6561
} // namespace reanimated

packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#include <memory>
77
#include <string>
8-
#include <vector>
98

109
using namespace facebook;
1110
using namespace react;

0 commit comments

Comments
 (0)