mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use default namespace in RNAndroid / imagemanager / conversion (#52751)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52751 The only method use externally is ``` inline MapBuffer serializeImageRequest( const ImageSource& imageSource, const ImageRequestParams& imageRequestParams) { ``` all others can move to a private/anonymous namespace Changelog: [Internal] Reviewed By: rshest Differential Revision: D78709009 fbshipit-source-id: 10c444c34641deddcfc3d2d4e95274f24fd38a4e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bfc10ba90f
commit
52d8660964
+19
-15
@@ -17,6 +17,8 @@
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
namespace {
|
||||
|
||||
inline std::string toString(const ImageResizeMode& value) {
|
||||
switch (value) {
|
||||
case ImageResizeMode::Cover:
|
||||
@@ -34,21 +36,21 @@ inline std::string toString(const ImageResizeMode& value) {
|
||||
}
|
||||
}
|
||||
|
||||
constexpr static MapBuffer::Key IS_KEY_URI = 0;
|
||||
constexpr static MapBuffer::Key IS_KEY_DEFAULT_SRC = 1;
|
||||
constexpr static MapBuffer::Key IS_KEY_RESIZE_MODE = 2;
|
||||
constexpr static MapBuffer::Key IS_KEY_RESIZE_METHOD = 3;
|
||||
constexpr static MapBuffer::Key IS_KEY_BLUR_RADIUS = 4;
|
||||
constexpr static MapBuffer::Key IS_KEY_VIEW_WIDTH = 5;
|
||||
constexpr static MapBuffer::Key IS_KEY_VIEW_HEIGHT = 6;
|
||||
constexpr static MapBuffer::Key IS_KEY_RESIZE_MULTIPLIER = 7;
|
||||
constexpr static MapBuffer::Key IS_KEY_SHOULD_NOTIFY_LOAD_EVENTS = 8;
|
||||
constexpr static MapBuffer::Key IS_KEY_OVERLAY_COLOR = 9;
|
||||
constexpr static MapBuffer::Key IS_KEY_TINT_COLOR = 10;
|
||||
constexpr static MapBuffer::Key IS_KEY_FADE_DURATION = 11;
|
||||
constexpr static MapBuffer::Key IS_KEY_PROGRESSIVE_RENDERING_ENABLED = 12;
|
||||
constexpr static MapBuffer::Key IS_KEY_LOADING_INDICATOR_SRC = 13;
|
||||
constexpr static MapBuffer::Key IS_KEY_ANALYTIC_TAG = 14;
|
||||
constexpr MapBuffer::Key IS_KEY_URI = 0;
|
||||
constexpr MapBuffer::Key IS_KEY_DEFAULT_SRC = 1;
|
||||
constexpr MapBuffer::Key IS_KEY_RESIZE_MODE = 2;
|
||||
constexpr MapBuffer::Key IS_KEY_RESIZE_METHOD = 3;
|
||||
constexpr MapBuffer::Key IS_KEY_BLUR_RADIUS = 4;
|
||||
constexpr MapBuffer::Key IS_KEY_VIEW_WIDTH = 5;
|
||||
constexpr MapBuffer::Key IS_KEY_VIEW_HEIGHT = 6;
|
||||
constexpr MapBuffer::Key IS_KEY_RESIZE_MULTIPLIER = 7;
|
||||
constexpr MapBuffer::Key IS_KEY_SHOULD_NOTIFY_LOAD_EVENTS = 8;
|
||||
constexpr MapBuffer::Key IS_KEY_OVERLAY_COLOR = 9;
|
||||
constexpr MapBuffer::Key IS_KEY_TINT_COLOR = 10;
|
||||
constexpr MapBuffer::Key IS_KEY_FADE_DURATION = 11;
|
||||
constexpr MapBuffer::Key IS_KEY_PROGRESSIVE_RENDERING_ENABLED = 12;
|
||||
constexpr MapBuffer::Key IS_KEY_LOADING_INDICATOR_SRC = 13;
|
||||
constexpr MapBuffer::Key IS_KEY_ANALYTIC_TAG = 14;
|
||||
|
||||
inline void serializeImageSource(
|
||||
MapBufferBuilder& builder,
|
||||
@@ -89,6 +91,8 @@ inline void serializeImageRequestParams(
|
||||
builder.putString(IS_KEY_ANALYTIC_TAG, imageRequestParams.analyticTag);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
inline MapBuffer serializeImageRequest(
|
||||
const ImageSource& imageSource,
|
||||
const ImageRequestParams& imageRequestParams) {
|
||||
|
||||
Reference in New Issue
Block a user