mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Fabric: SharedColor for Android
Summary: @public On Android, a color can be represented as 32 bits integer, so there is no need to instantiate complex color objects and then pass them as shared pointers. Hense instead of using shared_ptr, we use a simple wrapper class which provides a pointer-like interface. Reviewed By: mdvacca Differential Revision: D8742014 fbshipit-source-id: 14109b61fd84a34989538a15bc6fe4e2a8ce83a6
This commit is contained in:
committed by
Facebook Github Bot
parent
50a481d23a
commit
2d1fabbab2
@@ -31,8 +31,8 @@ public:
|
||||
#pragma mark - Fields
|
||||
|
||||
// Color
|
||||
SharedColor foregroundColor {nullptr};
|
||||
SharedColor backgroundColor {nullptr};
|
||||
SharedColor foregroundColor {};
|
||||
SharedColor backgroundColor {};
|
||||
Float opacity {std::numeric_limits<Float>::quiet_NaN()};
|
||||
|
||||
// Font
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
folly::Optional<WritingDirection> baseWritingDirection {};
|
||||
|
||||
// Decoration
|
||||
SharedColor textDecorationColor {nullptr};
|
||||
SharedColor textDecorationColor {};
|
||||
folly::Optional<TextDecorationLineType> textDecorationLineType {};
|
||||
folly::Optional<TextDecorationLineStyle> textDecorationLineStyle {};
|
||||
folly::Optional<TextDecorationLinePattern> textDecorationLinePattern {};
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
// TODO: Use `Point` type instead of `Size` for `textShadowOffset` attribute.
|
||||
folly::Optional<Size> textShadowOffset {};
|
||||
Float textShadowRadius {std::numeric_limits<Float>::quiet_NaN()};
|
||||
SharedColor textShadowColor {nullptr};
|
||||
SharedColor textShadowColor {};
|
||||
|
||||
// Special
|
||||
folly::Optional<bool> isHighlighted {};
|
||||
|
||||
Reference in New Issue
Block a user