From 9e2ec4d3dde3c4c4f6cb64073f83f03c91be0002 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 2 Dec 2021 07:52:35 -0800 Subject: [PATCH] Make UIManager::animationTick const Summary: changelog: [internal] UIManager::animationTick is thread safe. Let's make it obvious by marking the method const. Reviewed By: javache Differential Revision: D32669102 fbshipit-source-id: 49e35d0f0a5c5d1b03baa1cbf9cdece082909e85 --- ReactCommon/react/renderer/uimanager/UIManager.cpp | 2 +- ReactCommon/react/renderer/uimanager/UIManager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactCommon/react/renderer/uimanager/UIManager.cpp b/ReactCommon/react/renderer/uimanager/UIManager.cpp index c52286aa3b9..3ff165dd5f4 100644 --- a/ReactCommon/react/renderer/uimanager/UIManager.cpp +++ b/ReactCommon/react/renderer/uimanager/UIManager.cpp @@ -446,7 +446,7 @@ void UIManager::stopSurfaceForAnimationDelegate(SurfaceId surfaceId) const { } } -void UIManager::animationTick() { +void UIManager::animationTick() const { if (animationDelegate_ != nullptr && animationDelegate_->shouldAnimateFrame()) { shadowTreeRegistry_.enumerate([](ShadowTree const &shadowTree) { diff --git a/ReactCommon/react/renderer/uimanager/UIManager.h b/ReactCommon/react/renderer/uimanager/UIManager.h index e24434cc9bc..f5c8f0c21c7 100644 --- a/ReactCommon/react/renderer/uimanager/UIManager.h +++ b/ReactCommon/react/renderer/uimanager/UIManager.h @@ -62,7 +62,7 @@ class UIManager final : public ShadowTreeDelegate { */ void stopSurfaceForAnimationDelegate(SurfaceId surfaceId) const; - void animationTick(); + void animationTick() const; /* * Provides access to a UIManagerBindging.