|
5 | 5 | * LICENSE file in the root directory of this source tree. |
6 | 6 | */ |
7 | 7 |
|
8 | | -#include <react/renderer/graphics/fromRawValueShared.h> |
9 | | - |
10 | 8 | #include <react/debug/react_native_expect.h> |
11 | 9 | #include <react/featureflags/ReactNativeFeatureFlags.h> |
| 10 | +#include <react/renderer/core/RawValue.h> |
12 | 11 | #include <react/renderer/css/CSSColor.h> |
13 | 12 | #include <react/renderer/css/CSSValueParser.h> |
| 13 | +#include <react/renderer/graphics/Color.h> |
14 | 14 | #include <react/renderer/graphics/PlatformColorParser.h> |
| 15 | +#include <react/utils/ContextContainer.h> |
15 | 16 |
|
16 | 17 | namespace facebook::react { |
17 | 18 |
|
| 19 | +SharedColor parsePlatformColor( |
| 20 | + const ContextContainer& contextContainer, |
| 21 | + int32_t surfaceId, |
| 22 | + const RawValue& value); |
| 23 | + |
| 24 | +namespace { |
| 25 | + |
| 26 | +using ParsePlatformColor = |
| 27 | + SharedColor (*)(const ContextContainer&, int32_t, const RawValue&); |
| 28 | + |
18 | 29 | void fromRawValueShared( |
19 | 30 | const ContextContainer& contextContainer, |
20 | 31 | int32_t surfaceId, |
21 | 32 | const RawValue& value, |
22 | 33 | SharedColor& result, |
23 | | - parsePlatformColorFn parsePlatformColor) { |
| 34 | + ParsePlatformColor parsePlatformColor) { |
24 | 35 | ColorComponents colorComponents = { |
25 | 36 | .red = 0, .green = 0, .blue = 0, .alpha = 0}; |
26 | 37 |
|
@@ -76,6 +87,8 @@ void fromRawValueShared( |
76 | 87 | } |
77 | 88 | } |
78 | 89 |
|
| 90 | +} // namespace |
| 91 | + |
79 | 92 | void fromRawValue( |
80 | 93 | const ContextContainer& contextContainer, |
81 | 94 | int32_t surfaceId, |
|
0 commit comments