-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abstract underlying Color implementation
Summary: On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: D47873465 fbshipit-source-id: 8715b3061f4280e118fb6e39971d604137003d07
- Loading branch information
1 parent
4721561
commit 205ae72
Showing
4 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...mmon/react/renderer/graphics/platform/android/react/renderer/graphics/HostPlatformColor.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* 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 | ||
|
||
namespace facebook::react { | ||
|
||
using Color = int32_t; | ||
|
||
} // namespace facebook::react |
14 changes: 14 additions & 0 deletions
14
...ctCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/HostPlatformColor.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* 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 | ||
|
||
namespace facebook::react { | ||
|
||
using Color = int32_t; | ||
|
||
} // namespace facebook::react |
14 changes: 14 additions & 0 deletions
14
...ctCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* 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 | ||
|
||
namespace facebook::react { | ||
|
||
using Color = int32_t; | ||
|
||
} // namespace facebook::react |