Skip to content

Conversation

@zeyap
Copy link
Contributor

@zeyap zeyap commented Jul 16, 2024

Summary:

Changelog:

the new functions I introduced in #45365 to read color channel value, like alphaFromColor, will return float between 0~255 on iOS and 8bit unsigned ints on other platforms, because of different platform implementation. However that way we cannot assume consistent return value across platforms, which kind of contradicts with RN's cross platform design.

so here I make alphaFromColor in Color.h (the cross platform method) to always return uint8_t, while still allow alphaFromHostPlatformColor to return different result

[Internal] [Fixed] -

Differential Revision: D59826142

Summary:
## Changelog

the new functions I introduced in facebook#45365 to read color channel value, like `alphaFromColor`, will return float between 0~255 on iOS and 8bit unsigned ints on other platforms, because of different platform implementation. However that way we cannot assume consistent return value across platforms, which kind of contradicts with RN's cross platform design.

so here I make `alphaFromColor` in Color.h (the cross platform method) to always return uint8_t, while still allow `alphaFromHostPlatformColor` to return different result

Differential Revision: D59826142
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 16, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59826142

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 21,370,005 -3
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 24,565,839 -11
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: c085180
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 16, 2024
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a6f5e5a.

@github-actions
Copy link

This pull request was successfully merged by @zeyap in a6f5e5a

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants