Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void SurfaceManager::startSurface(
const std::string& moduleName,
const folly::dynamic& props,
const LayoutConstraints& layoutConstraints,
const LayoutContext& layoutContext) const noexcept {
const LayoutContext& layoutContext) noexcept {
{
std::unique_lock lock(mutex_);
auto surfaceHandler = SurfaceHandler{moduleName, surfaceId};
Expand All @@ -44,7 +44,7 @@ void SurfaceManager::startSurface(
});
}

void SurfaceManager::stopSurface(SurfaceId surfaceId) const noexcept {
void SurfaceManager::stopSurface(SurfaceId surfaceId) noexcept {
visit(surfaceId, [&](const SurfaceHandler& surfaceHandler) {
surfaceHandler.stop();
scheduler_.unregisterSurface(surfaceHandler);
Expand All @@ -58,7 +58,7 @@ void SurfaceManager::stopSurface(SurfaceId surfaceId) const noexcept {
}
}

void SurfaceManager::stopAllSurfaces() const noexcept {
void SurfaceManager::stopAllSurfaces() noexcept {
std::unordered_set<SurfaceId> surfaceIds;
{
std::shared_lock lock(mutex_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class SurfaceManager final {
const std::string& moduleName,
const folly::dynamic& props,
const LayoutConstraints& layoutConstraints = {},
const LayoutContext& layoutContext = {}) const noexcept;
const LayoutContext& layoutContext = {}) noexcept;

void stopSurface(SurfaceId surfaceId) const noexcept;
void stopSurface(SurfaceId surfaceId) noexcept;

void stopAllSurfaces() const noexcept;
void stopAllSurfaces() noexcept;

Size measureSurface(
SurfaceId surfaceId,
Expand All @@ -63,7 +63,7 @@ class SurfaceManager final {

const Scheduler& scheduler_;
mutable std::shared_mutex mutex_; // Protects `registry_`.
mutable std::unordered_map<SurfaceId, SurfaceHandler> registry_{};
std::unordered_map<SurfaceId, SurfaceHandler> registry_{};
};

} // namespace facebook::react