react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[Android] Update HostPlatformColor to support color longs

Open ryanlntn opened this issue 1 year ago • 6 comments

Summary:

This adds support for color longs to HostPlatformColor per the wide gamut color RFC.

Changelog:

[ANDROID] [ADDED] - Update HostPlatformColor to support color longs

Test Plan:

This requires changes from https://github.com/facebook/react-native/pull/43030 to build and will only break text color until those components are updated to support color long values as well. Will update with a link to that PR soon.

ryanlntn avatar Feb 22 '24 21:02 ryanlntn

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Apr 04 '24 15:04 facebook-github-bot

Could we document what the magic numbers are doing? Maybe pull them out into constants?

NickGerleman avatar Apr 17 '24 18:04 NickGerleman

Could we document what the magic numbers are doing? Maybe pull them out into constants?

@NickGerleman I pulled out the color space and component ratios definitions into constants. Should I do similar with the bit masks/shifts? I can't decide what's more readable.

ryanlntn avatar Apr 17 '24 20:04 ryanlntn

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,394,073 +32
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,767,695 +13
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: fe9942a19d65d30c1127af207cf7777465cb257e Branch: main

analysis-bot avatar Apr 17 '24 21:04 analysis-bot

The shifts seem reasonably readable to me

NickGerleman avatar Apr 18 '24 23:04 NickGerleman

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Apr 22 '24 09:04 facebook-github-bot