/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
private/react-native-fantom/tester/src/render/RenderOutput.h
44 строки
1 KB
Zeya Peng
Cache result when RenderOutput::render() is called (#53112)
08 авг 2025, 20:54
08 авг 2025, 20:54
5517c04
Код
Авторство
О чём код?
/* * 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 <folly/json.h> #include <react/renderer/attributedstring/AttributedString.h> #include <react/renderer/mounting/stubs/StubViewTree.h> #include "RenderFormatOptions.h" namespace facebook::react { class RenderOutput { public: std::string render( const StubViewTree& tree, const RenderFormatOptions& options); void markMutated(SurfaceId surfaceId) { treesMutated_.insert(surfaceId); } private: folly::dynamic renderView( const StubView& view, const RenderFormatOptions& options); #if RN_DEBUG_STRING_CONVERTIBLE folly::dynamic renderProps(const SharedDebugStringConvertibleList& propsList); #endif folly::dynamic renderAttributedString( const Tag& selfTag, const AttributedString& string); std::unordered_map<Tag, folly::dynamic> renderedViews_{}; // If true, the next call to render() will re-render the entire tree. std::unordered_set<SurfaceId> treesMutated_{}; }; } // namespace facebook::react