Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added wide gamut colors to offscreen buffers #39482

Merged
merged 2 commits into from Feb 15, 2023

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Feb 8, 2023

issue: flutter/flutter#117182
integration test: flutter/flutter#120131

I spent some time trying to make BGR10_XR work but I couldn't figure it out, so I punted on it for now. Getting smaller textures is more important for now.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 13, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 13, 2023
@flutter flutter deleted a comment from auto-submit bot Feb 13, 2023
@flutter flutter deleted a comment from auto-submit bot Feb 13, 2023
@gaaclarke gaaclarke marked this pull request as ready for review February 13, 2023 22:48
@gaaclarke gaaclarke requested a review from bdero February 13, 2023 22:52
@@ -86,6 +92,8 @@ constexpr MTLPixelFormat ToMTLPixelFormat(PixelFormat format) {
return SafeMTLPixelFormatBGR10_XR_sRGB();
case PixelFormat::kB10G10R10XR:
return SafeMTLPixelFormatBGR10_XR();
case PixelFormat::kB10G10R10A10XR:
return SafeMTLPixelFormatBGRA10_XR();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add reverse conversion to ToMTLBlendFactor below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reverse for this is in FromMTLPixelFormat. I think that's what you were thinking, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yup, disregard

@@ -138,6 +138,7 @@ constexpr vk::Format ToVKImageFormat(PixelFormat format) {
switch (format) {
case PixelFormat::kUnknown:
case PixelFormat::kB10G10R10XR:
case PixelFormat::kB10G10R10A10XR:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add reverse conversion to ToPixelFormat below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no reverse for this yet since it's mapped to vk::Format::eUndefined. I don't think this format will ever be used with vulkan as far as I know.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 15, 2023
@auto-submit auto-submit bot merged commit a8b3d1a into flutter:main Feb 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 15, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 15, 2023
…120821)

* b59787f40 Roll Skia from cd19d680b078 to 21627ff455d0 (2 revisions) (flutter/engine#39650)

* 9af56b3ee [macOS] Set textfield autofill type (flutter/engine#39632)

* a8b3d1af5 Added wide gamut colors to offscreen buffers (flutter/engine#39482)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-android platform-ios
Projects
None yet
2 participants