Expose rootTag / surfaceId as part of schedulerDidRequestPreliminaryViewAllocation method
Summary: This diff exposes rootTag as part of SchedulerDelegate.schedulerDidRequestPreliminaryViewAllocation(). This will be necessary to be able to pool views per Surface in Android Reviewed By: shergin Differential Revision: D12875656 fbshipit-source-id: d2a8c1f9bcc6b14c17b34bf59085da44ae3c3416
This commit is contained in:
Родитель
95b21b4828
Коммит
2b01da073c
|
@ -27,7 +27,7 @@ public:
|
|||
[scheduler.delegate schedulerDidFinishTransaction:mutations rootTag:rootTag];
|
||||
}
|
||||
|
||||
void schedulerDidRequestPreliminaryViewAllocation(ComponentName componentName) override {
|
||||
void schedulerDidRequestPreliminaryViewAllocation(SurfaceId surfaceId, ComponentName componentName) override {
|
||||
RCTScheduler *scheduler = (__bridge RCTScheduler *)scheduler_;
|
||||
[scheduler.delegate schedulerDidRequestPreliminaryViewAllocationWithComponentName:RCTNSStringFromString(componentName, NSASCIIStringEncoding)];
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ void Scheduler::uiManagerDidCreateShadowNode(
|
|||
const SharedShadowNode &shadowNode) {
|
||||
if (delegate_) {
|
||||
delegate_->schedulerDidRequestPreliminaryViewAllocation(
|
||||
shadowNode->getComponentName());
|
||||
shadowNode->getRootTag(), shadowNode->getComponentName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ class SchedulerDelegate {
|
|||
* Called right after a new ShadowNode was created.
|
||||
*/
|
||||
virtual void schedulerDidRequestPreliminaryViewAllocation(
|
||||
SurfaceId surfaceId,
|
||||
ComponentName componentName) = 0;
|
||||
|
||||
virtual ~SchedulerDelegate() noexcept = default;
|
||||
|
|
Загрузка…
Ссылка в новой задаче