@@ -69,13 +69,14 @@ static std::shared_ptr<ShadowNode> progressState(const ShadowNode& shadowNode) {
69
69
}
70
70
71
71
return shadowNode.clone ({
72
- ShadowNodeFragment::propsPlaceholder (),
73
- areChildrenChanged
72
+ . props = ShadowNodeFragment::propsPlaceholder (),
73
+ . children = areChildrenChanged
74
74
? std::make_shared<
75
75
const std::vector<std::shared_ptr<const ShadowNode>>>(
76
76
std::move (newChildren))
77
77
: ShadowNodeFragment::childrenPlaceholder (),
78
- isStateChanged ? newState : ShadowNodeFragment::statePlaceholder (),
78
+ .state =
79
+ isStateChanged ? newState : ShadowNodeFragment::statePlaceholder (),
79
80
});
80
81
}
81
82
@@ -158,13 +159,14 @@ static std::shared_ptr<ShadowNode> progressState(
158
159
}
159
160
160
161
return shadowNode.clone ({
161
- ShadowNodeFragment::propsPlaceholder (),
162
- areChildrenChanged
162
+ . props = ShadowNodeFragment::propsPlaceholder (),
163
+ . children = areChildrenChanged
163
164
? std::make_shared<
164
165
const std::vector<std::shared_ptr<const ShadowNode>>>(
165
166
std::move (newChildren))
166
167
: ShadowNodeFragment::childrenPlaceholder (),
167
- isStateChanged ? newState : ShadowNodeFragment::statePlaceholder (),
168
+ .state =
169
+ isStateChanged ? newState : ShadowNodeFragment::statePlaceholder (),
168
170
});
169
171
}
170
172
@@ -177,7 +179,9 @@ ShadowTree::ShadowTree(
177
179
: surfaceId_(surfaceId), delegate_(delegate) {
178
180
static RootComponentDescriptor globalRootComponentDescriptor (
179
181
ComponentDescriptorParameters{
180
- EventDispatcher::Shared{}, nullptr , nullptr });
182
+ .eventDispatcher = EventDispatcher::Shared{},
183
+ .contextContainer = nullptr ,
184
+ .flavor = nullptr });
181
185
182
186
const auto props = std::make_shared<const RootProps>(
183
187
PropsParserContext{surfaceId, contextContainer},
@@ -186,17 +190,19 @@ ShadowTree::ShadowTree(
186
190
layoutContext);
187
191
188
192
auto family = globalRootComponentDescriptor.createFamily (
189
- {surfaceId, surfaceId, nullptr });
193
+ {. tag = surfaceId, . surfaceId = surfaceId, . instanceHandle = nullptr });
190
194
191
195
auto rootShadowNode = std::static_pointer_cast<const RootShadowNode>(
192
196
globalRootComponentDescriptor.createShadowNode (
193
197
ShadowNodeFragment{
194
- /* .props = */ props,
198
+ /* .props = */ . props = props,
195
199
},
196
200
family));
197
201
198
202
currentRevision_ = ShadowTreeRevision{
199
- rootShadowNode, INITIAL_REVISION, TransactionTelemetry{}};
203
+ .rootShadowNode = rootShadowNode,
204
+ .number = INITIAL_REVISION,
205
+ .telemetry = TransactionTelemetry{}};
200
206
201
207
mountingCoordinator_ =
202
208
std::make_shared<const MountingCoordinator>(currentRevision_);
@@ -354,7 +360,9 @@ CommitStatus ShadowTree::tryCommit(
354
360
newRootShadowNode->sealRecursive ();
355
361
356
362
newRevision = ShadowTreeRevision{
357
- std::move (newRootShadowNode), newRevisionNumber, telemetry};
363
+ .rootShadowNode = std::move (newRootShadowNode),
364
+ .number = newRevisionNumber,
365
+ .telemetry = telemetry};
358
366
359
367
currentRevision_ = newRevision;
360
368
}
@@ -387,8 +395,9 @@ void ShadowTree::commitEmptyTree() const {
387
395
return std::make_shared<RootShadowNode>(
388
396
oldRootShadowNode,
389
397
ShadowNodeFragment{
390
- /* .props = */ ShadowNodeFragment::propsPlaceholder (),
391
- /* .children = */ ShadowNode::emptySharedShadowNodeSharedList (),
398
+ /* .props = */ .props = ShadowNodeFragment::propsPlaceholder (),
399
+ /* .children = */ .children =
400
+ ShadowNode::emptySharedShadowNodeSharedList (),
392
401
});
393
402
},
394
403
{/* default commit options */ });
0 commit comments