mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-16 13:40:16 +08:00
Summary: `ParagraphMeasurementCache` was replaced with templated version of itself. Reviewed By: mdvacca Differential Revision: D14296515 fbshipit-source-id: 29e370f07baf14b25430f85a06f603907aed5563
28 lines
782 B
C++
28 lines
782 B
C++
/**
|
|
* Copyright (c) Facebook, Inc. and its 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 <react/attributedstring/AttributedString.h>
|
|
#include <react/attributedstring/ParagraphAttributes.h>
|
|
#include <react/core/LayoutConstraints.h>
|
|
#include <react/utils/SimpleThreadSafeCache.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
using ParagraphMeasurementCacheKey =
|
|
std::tuple<AttributedString, ParagraphAttributes, LayoutConstraints>;
|
|
using ParagraphMeasurementCacheValue = Size;
|
|
using ParagraphMeasurementCache = SimpleThreadSafeCache<
|
|
ParagraphMeasurementCacheKey,
|
|
ParagraphMeasurementCacheValue,
|
|
256>;
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|