Pass MountingCoordinator by value instead of reference

Summary:
changelog: [internal]

Passing MountingCoordinator argument by value instead of reference. Using reference does not make sense since we eventually take ownership of shared_ptr anyway. This better communicates the intent.

Reviewed By: christophpurrer

Differential Revision: D43082955

fbshipit-source-id: 29e20abb9824c10a5f0d5e0ba1049ff6d67cee98
This commit is contained in:
Samuel Susla
2023-02-08 15:48:17 -08:00
committed by Facebook GitHub Bot
parent bc766ec7f8
commit 2e3f55aced
16 changed files with 24 additions and 29 deletions
@@ -484,14 +484,14 @@ std::shared_ptr<FabricMountingManager> Binding::verifyMountingManager(
}
void Binding::schedulerDidFinishTransaction(
MountingCoordinator::Shared const &mountingCoordinator) {
MountingCoordinator::Shared mountingCoordinator) {
auto mountingManager =
verifyMountingManager("Binding::schedulerDidFinishTransaction");
if (!mountingManager) {
return;
}
mountingManager->executeMount(mountingCoordinator);
mountingManager->executeMount(std::move(mountingCoordinator));
}
void Binding::schedulerDidRequestPreliminaryViewAllocation(
@@ -94,7 +94,7 @@ class Binding : public jni::HybridClass<Binding>,
void unregisterSurface(SurfaceHandlerBinding *surfaceHandler);
void schedulerDidFinishTransaction(
MountingCoordinator::Shared const &mountingCoordinator) override;
MountingCoordinator::Shared mountingCoordinator) override;
void schedulerDidRequestPreliminaryViewAllocation(
const SurfaceId surfaceId,
@@ -263,7 +263,7 @@ local_ref<jobject> FabricMountingManager::getProps(
}
void FabricMountingManager::executeMount(
MountingCoordinator::Shared const &mountingCoordinator) {
MountingCoordinator::Shared mountingCoordinator) {
std::lock_guard<std::recursive_mutex> lock(commitMutex_);
SystraceSection s(
@@ -41,7 +41,7 @@ class FabricMountingManager final {
void preallocateShadowView(SurfaceId surfaceId, ShadowView const &shadowView);
void executeMount(MountingCoordinator::Shared const &mountingCoordinator);
void executeMount(MountingCoordinator::Shared mountingCoordinator);
void dispatchCommand(
ShadowView const &shadowView,