zioinfo-mail/app/node_modules/react-native/ReactCommon/react/renderer/scheduler/SurfaceManager.h
DESKTOP-TKLFCPR\ython 11c670f2a0 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스)
- Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포
- 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 10:09:17 +09:00

67 lines
1.9 KiB
C++

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <mutex>
#include <shared_mutex>
#include <unordered_map>
#include <react/renderer/core/LayoutConstraints.h>
#include <react/renderer/mounting/MountingCoordinator.h>
#include <react/renderer/scheduler/SurfaceHandler.h>
namespace facebook::react {
/*
* `SurfaceManager` allows controlling React Native Surfaces via
* `SurfaceHandler` without using `SurfaceHandler` directly. `SurfaceManager`
* maintains a registry of `SurfaceHandler`s and allows to reference to them via
* a `SurfaceId`.
* The is supposed to be used during the transition period only.
*/
class SurfaceManager final {
public:
explicit SurfaceManager(const Scheduler& scheduler) noexcept;
#pragma mark - Surface Management
void startSurface(
SurfaceId surfaceId,
const std::string& moduleName,
const folly::dynamic& props,
const LayoutConstraints& layoutConstraints = {},
const LayoutContext& layoutContext = {}) const noexcept;
void stopSurface(SurfaceId surfaceId) const noexcept;
Size measureSurface(
SurfaceId surfaceId,
const LayoutConstraints& layoutConstraints,
const LayoutContext& layoutContext) const noexcept;
void constraintSurfaceLayout(
SurfaceId surfaceId,
const LayoutConstraints& layoutConstraints,
const LayoutContext& layoutContext) const noexcept;
MountingCoordinator::Shared findMountingCoordinator(
SurfaceId surfaceId) const noexcept;
private:
void visit(
SurfaceId surfaceId,
const std::function<void(SurfaceHandler const& surfaceHandler)>& callback)
const noexcept;
const Scheduler& scheduler_;
mutable std::shared_mutex mutex_; // Protects `registry_`.
mutable std::unordered_map<SurfaceId, SurfaceHandler> registry_{};
};
} // namespace facebook::react