Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Reland: Framework wide color (#54415) (#54737) #54905

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Aug 30, 2024

This PR was reverted because it required customer testing updates.

issue: flutter/flutter#127855
integration test: #54415

This does the preliminary work for implementing wide gamut colors in the Flutter framework. Here are the following changes: 1) colors now specify a colorspace with which they are to be interpreted 1) colors now store their components as floats to accommodate bit depths more than 8

The storage of this Color class is weird with float/int storage but that is a temporary solution to support a smooth transition. Here is the plan for landing this: 1) Land this PR

  1. Wait for it to roll into the Framework
  2. Land Switched CupertinoDynamicColor to implements Color flutter#153938 which will make CupertinoDynamicColor implement Color 1) Land another engine PR that rips out the int storage: Removes the int storage from Color #54714

Here are follow up PRs:

  1. Changes DlColor to support wide gamut colors #54473 - changes DlColor so the wide gamut colors are rendered 1) Hooks up framework wide gamut to engine wide gamut #54567 - Hooks up these changes to take advantage of wide DlColor 1) Adds wide gamut framework test flutter#153319 - the integration test for the framework repo

There are some things that have been left as follow up PRs since they are technically breaking: 1) The math on lerp hasn't been updated to take advantage of the higher bit depth 1) operator== hasn't been updated to take advantage of the higher bit depth 1) hashCode hasn't been updated to take advantage of the higher bit depth 1) alphaBlend hasn't been updated to take advantage of the higher bit depth 1) toString hasn't been updated to take advantage of the higher bit depth

Reland 2 notes

This was reverted because it changes the math on _lerpDouble. While those changes were mathematcially equivalent, they had different behaviors when working with non-numbers which created unexpected changes. The change has been reverted and a test added.

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 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.

[This PR](flutter#54415) was reverted because it requires a manual roll into the framework.

issue: flutter/flutter#127855
integration test: flutter#54415

This does the preliminary work for implementing wide gamut colors in the Flutter framework. Here are the following changes: 1) colors now specify a colorspace with which they are to be interpreted 1) colors now store their components as floats to accommodate bit depths more than 8

The storage of this Color class is weird with float/int storage but that is a temporary solution to support a smooth transition. Here is the plan for landing this:
1) Land this PR
1) Wait for it to roll into the Framework
1) Land flutter/flutter#153938 which will make CupertinoDynamicColor implement Color
1) Land another engine PR that rips out the int storage: flutter#54714

Here are follow up PRs:
1) flutter#54473 - changes DlColor so the wide gamut colors are rendered
1) flutter#54567 - Hooks up these changes to take advantage of wide DlColor
1) flutter/flutter#153319 - the integration test for the framework repo

There are some things that have been left as follow up PRs since they are technically breaking:
1) The math on `lerp` hasn't been updated to take advantage of the higher bit depth
1) `operator==` hasn't been updated to take advantage of the higher bit depth
1) `hashCode` hasn't been updated to take advantage of the higher bit depth
1) `alphaBlend` hasn't been updated to take advantage of the higher bit depth
1) `toString` hasn't been updated to take advantage of the higher bit depth
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Aug 30, 2024
@gaaclarke gaaclarke marked this pull request as ready for review August 30, 2024 16:34
@gaaclarke
Copy link
Member Author

@jonahwilliams I got the fix, a comment and a test added. That change to lerp wasn't required in the end. It was needed in a previous iteration and I kept it since it was less ops.

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 30, 2024
@gaaclarke gaaclarke merged commit eff1b76 into flutter:main Aug 30, 2024
34 checks passed
auto-submit bot pushed a commit that referenced this pull request Aug 30, 2024
relands #54567
depends on #54905

This was reverted because the PR that it depends on was reverted.  There is nothing to be addressed here.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 30, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 30, 2024
…154435)

flutter/engine@94487cc...eff1b76

2024-08-30 [email protected] Reland: Framework wide color (#54415) (#54737) (flutter/engine#54905)
2024-08-30 [email protected] Roll Skia from f3811180e7df to 2727e4e5d7ec (3 revisions) (flutter/engine#54904)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#154435)

flutter/engine@94487cc...eff1b76

2024-08-30 [email protected] Reland: Framework wide color (flutter#54415) (flutter#54737) (flutter/engine#54905)
2024-08-30 [email protected] Roll Skia from f3811180e7df to 2727e4e5d7ec (3 revisions) (flutter/engine#54904)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants