Skip to content

Commit

Permalink
fix: use local scheduler for thread-safe (#44565)
Browse files Browse the repository at this point in the history
Summary:
`getScheduler()` is intended for thread-safe

## Changelog:

[Android][FIXED] - local scheduler for thread-safe

Pull Request resolved: #44565

Test Plan: none

Reviewed By: fabriziocucci

Differential Revision: D57326255

Pulled By: javache

fbshipit-source-id: fa3a1df0f2653d5c286fdb537e0d44ab6fd1ed54
  • Loading branch information
Sunbreak authored and facebook-github-bot committed May 14, 2024
1 parent 2cc3ba1 commit 7dd91d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void Binding::setPixelDensity(float pointScaleFactor) {
}

void Binding::driveCxxAnimations() {
scheduler_->animationTick();
getScheduler()->animationTick();
}

void Binding::reportMount(SurfaceId surfaceId) {
Expand Down Expand Up @@ -189,7 +189,7 @@ void Binding::startSurfaceWithConstraints(
isRTL ? LayoutDirection::RightToLeft : LayoutDirection::LeftToRight;

auto surfaceHandler = SurfaceHandler{moduleName->toStdString(), surfaceId};
surfaceHandler.setContextContainer(scheduler_->getContextContainer());
surfaceHandler.setContextContainer(scheduler->getContextContainer());
surfaceHandler.setProps(initialProps->consume());
surfaceHandler.constraintLayout(constraints, context);

Expand Down

0 comments on commit 7dd91d3

Please sign in to comment.