Skip to content

Conversation

@ryanlntn
Copy link
Contributor

Summary:

This adds support for enabling wide color gamut mode for ReactActivity per the wide gamut color RFC.

Changelog:

[ANDROID] [ADDED] - Add isWideColorGamutEnabled to ReactActivityDelegate

Test Plan:

Update RNTesterActivity.kt to enable wide color gamut:

  class RNTesterActivity : ReactActivity() {
    class RNTesterActivityDelegate(val activity: ReactActivity, mainComponentName: String) :
      // ...  
      override fun getLaunchOptions() =
          if (this::initialProps.isInitialized) initialProps else Bundle()
  
+     override fun isWideColorGamutEnabled() = true
    }

@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: Infinite Red Partner: Infinite Red Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Feb 14, 2024
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,828,327 +6
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,186,792 +0
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 7b00a92
Branch: main

@ryanlntn ryanlntn force-pushed the feat/wide-gamut-color-activity branch from 45dc336 to 3009935 Compare March 15, 2024 10:33
@facebook-github-bot
Copy link
Contributor

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

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Apr 23, 2024
Summary:
This adds support for enabling wide color gamut mode for ReactActivity per the wide gamut color [RFC](react-native-community/discussions-and-proposals#738).

## Changelog:

[ANDROID] [ADDED] - Add isWideColorGamutEnabled to ReactActivityDelegate

Pull Request resolved: facebook#43036

Test Plan:
Update RNTesterActivity.kt to enable wide color gamut:

```diff
  class RNTesterActivity : ReactActivity() {
    class RNTesterActivityDelegate(val activity: ReactActivity, mainComponentName: String) :
      // ...
      override fun getLaunchOptions() =
          if (this::initialProps.isInitialized) initialProps else Bundle()

+     override fun isWideColorGamutEnabled() = true
    }
```

Differential Revision: D55749124

Reviewed By: cortinico

Pulled By: cortinico
cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Apr 23, 2024
Summary:
This adds support for enabling wide color gamut mode for ReactActivity per the wide gamut color [RFC](react-native-community/discussions-and-proposals#738).

## Changelog:

[ANDROID] [ADDED] - Add isWideColorGamutEnabled to ReactActivityDelegate

Pull Request resolved: facebook#43036

Test Plan:
Update RNTesterActivity.kt to enable wide color gamut:

```diff
  class RNTesterActivity : ReactActivity() {
    class RNTesterActivityDelegate(val activity: ReactActivity, mainComponentName: String) :
      // ...
      override fun getLaunchOptions() =
          if (this::initialProps.isInitialized) initialProps else Bundle()

+     override fun isWideColorGamutEnabled() = true
    }
```

Differential Revision: D55749124

Reviewed By: cortinico

Pulled By: cortinico
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 23, 2024
@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in 0a9891a.

kosmydel pushed a commit to kosmydel/react-native that referenced this pull request May 6, 2024
Summary:
This adds support for enabling wide color gamut mode for ReactActivity per the wide gamut color [RFC](react-native-community/discussions-and-proposals#738).

## Changelog:

[ANDROID] [ADDED] - Add isWideColorGamutEnabled to ReactActivityDelegate

Pull Request resolved: facebook#43036

Test Plan:
Update RNTesterActivity.kt to enable wide color gamut:

```diff
  class RNTesterActivity : ReactActivity() {
    class RNTesterActivityDelegate(val activity: ReactActivity, mainComponentName: String) :
      // ...
      override fun getLaunchOptions() =
          if (this::initialProps.isInitialized) initialProps else Bundle()

+     override fun isWideColorGamutEnabled() = true
    }
```

Reviewed By: cortinico

Differential Revision: D55749124

Pulled By: cipolleschi

fbshipit-source-id: 44dd5631e1a2e429c86c01ed8747bbebbc8bdb3b
kosmydel pushed a commit to kosmydel/react-native that referenced this pull request Jun 11, 2024
Summary:
This adds support for enabling wide color gamut mode for ReactActivity per the wide gamut color [RFC](react-native-community/discussions-and-proposals#738).

## Changelog:

[ANDROID] [ADDED] - Add isWideColorGamutEnabled to ReactActivityDelegate

Pull Request resolved: facebook#43036

Test Plan:
Update RNTesterActivity.kt to enable wide color gamut:

```diff
  class RNTesterActivity : ReactActivity() {
    class RNTesterActivityDelegate(val activity: ReactActivity, mainComponentName: String) :
      // ...
      override fun getLaunchOptions() =
          if (this::initialProps.isInitialized) initialProps else Bundle()

+     override fun isWideColorGamutEnabled() = true
    }
```

Reviewed By: cortinico

Differential Revision: D55749124

Pulled By: cipolleschi

fbshipit-source-id: 44dd5631e1a2e429c86c01ed8747bbebbc8bdb3b
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. Merged This PR has been merged. p: Infinite Red Partner: Infinite Red Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants