Skip to content

Use uint32_t as internal Color representation#53507

Closed
javache wants to merge 2 commits into
react:mainfrom
javache:export-D81230050
Closed

Use uint32_t as internal Color representation#53507
javache wants to merge 2 commits into
react:mainfrom
javache:export-D81230050

Conversation

@javache

@javache javache commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

Summary:
We need this to be an unsigned value everywhere but all the API's and interfaces described this a signed number. While this doesn't make a difference in practice, it's better to explicit.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D81230050

Summary:

Casting directly from double to int loses precision. Instead, match the (accidental) behaviour of the folly version, which always access the value as an int64_t first.

```
double value = 4294967040
(int)value = 2147483647 (overflow)
(int)(int64_t)value = -256 (signed version of 4294967040)
```

Changelog: [General][Fixed] Casting rawValue to int was incorrectly truncating

Reviewed By: zeyap, sammy-SC

Differential Revision: D81228983
Summary:
We need this to be an unsigned value everywhere but all the API's and interfaces described this a signed number. While this doesn't make a difference in practice, it's better to explicit.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D81230050
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 28, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 29, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in a44c5a0.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @javache in a44c5a0

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