mirror of
https://github.com/status-im/react-native.git
synced 2025-02-14 18:36:35 +00:00
Revert D4716024: [yoga] Avoid transfering cached layout information to java
Differential Revision: D4716024 fbshipit-source-id: 7276b4bbf072aa444c5ae9fd1a3d62ea87a0cec1
This commit is contained in:
parent
60142adc72
commit
b956c111d8
@ -24,12 +24,6 @@ static void YGTransferLayoutDirection(YGNodeRef node, alias_ref<jobject> javaNod
|
||||
}
|
||||
|
||||
static void YGTransferLayoutOutputsRecursive(YGNodeRef root) {
|
||||
// If the node is using a cached layout it means we have already
|
||||
// transfered it to java.
|
||||
if (YGNodeIsUsingCachedLayout(root)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (auto obj = YGNodeJobject(root)->lockLocal()) {
|
||||
static auto widthField = obj->getClass()->getField<jfloat>("mWidth");
|
||||
static auto heightField = obj->getClass()->getField<jfloat>("mHeight");
|
||||
|
@ -459,18 +459,6 @@ void YGNodeCopyStyle(const YGNodeRef dstNode, const YGNodeRef srcNode) {
|
||||
}
|
||||
}
|
||||
|
||||
static int YGNodeRootGenerationCount(const YGNodeRef node) {
|
||||
if (node->parent) {
|
||||
return YGNodeRootGenerationCount(node->parent);
|
||||
} else {
|
||||
return node->layout.generationCount;
|
||||
}
|
||||
}
|
||||
|
||||
bool YGNodeIsUsingCachedLayout(const YGNodeRef node) {
|
||||
return node->layout.generationCount != YGNodeRootGenerationCount(node);
|
||||
}
|
||||
|
||||
static inline float YGResolveFlexGrow(const YGNodeRef node) {
|
||||
if (!YGFloatIsUndefined(node->style.flexGrow)) {
|
||||
return node->style.flexGrow;
|
||||
@ -1823,7 +1811,6 @@ static void YGZeroOutLayoutRecursivly(const YGNodeRef node) {
|
||||
node->layout.cachedLayout.widthMeasureMode = YGMeasureModeExactly;
|
||||
node->layout.cachedLayout.computedWidth = 0;
|
||||
node->layout.cachedLayout.computedHeight = 0;
|
||||
node->layout.generationCount = gCurrentGenerationCount;
|
||||
const uint32_t childCount = YGNodeGetChildCount(node);
|
||||
for (uint32_t i = 0; i < childCount; i++) {
|
||||
const YGNodeRef child = YGNodeListGet(node->children, i);
|
||||
|
@ -218,8 +218,6 @@ YG_NODE_LAYOUT_EDGE_PROPERTY(float, Margin);
|
||||
YG_NODE_LAYOUT_EDGE_PROPERTY(float, Border);
|
||||
YG_NODE_LAYOUT_EDGE_PROPERTY(float, Padding);
|
||||
|
||||
bool YGNodeIsUsingCachedLayout(const YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void YGSetLogger(YGLogger logger);
|
||||
WIN_EXPORT void YGLog(YGLogLevel level, const char *message, ...);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user