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

Conversation

@gaaclarke
Copy link
Member

fixes flutter/flutter#141903

The golden tests were generating images in the wrong colorspace which left things brighter than they should have been. This fixes that issue.

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.

@gaaclarke
Copy link
Member Author

gaaclarke commented Jan 22, 2024

After this patch Vulkan and Metal more closely match:

metal

impeller_Play_AiksTest_CanRenderRadialGradientWithDitheringEnabled_Metal

vulkan

impeller_Play_AiksTest_CanRenderRadialGradientWithDitheringEnabled_Vulkan

@gaaclarke gaaclarke force-pushed the metal-golden-colorspace branch from 715f609 to 84849f6 Compare January 22, 2024 18:46
Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

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

LGTM, though I'm not familiar enough with Metal to confirm the Ref management aspects.

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #49941 at sha 84849f6

@gaaclarke
Copy link
Member Author

I haven't heard anything from @mdebbar yet on the golden issues. I'll rebase to see if the next run works.

@gaaclarke gaaclarke force-pushed the metal-golden-colorspace branch from 84849f6 to 542afef Compare January 22, 2024 21:15
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #49941 at sha 542afef

@flar
Copy link
Contributor

flar commented Jan 22, 2024

I looked at some of the tests that I wrote that always looked a little faded in the goldens and they now look much more like I was expecting.


CIImage* ciImage = [[CIImage alloc] initWithMTLTexture:metal_texture
options:@{}];
CGColorSpaceRef color_space = CGColorSpaceCreateDeviceRGB();
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than create a device dependent color space which might vary over time as we change our CI hardware, should we perhaps create a standardized color space such as with one of these constants?

https://developer.apple.com/documentation/coregraphics/cgcolorspace/1408871-srgb

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if that would be appropriate. It may be more appropriate that the colorspace matches the device one since that's what the texture will reflect? I'd rather keep this similar to vulkan and as written. If it ever breaks, we'll know quickly.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the machines in the CI lab are homogenous then it might not cause problems now, but if we ever go through a transition with different types of machines that happen to disagree on their native colorspace we might have some headaches at that time.

@gaaclarke gaaclarke requested a review from flar January 22, 2024 22:30
@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 22, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Jan 22, 2024

auto label is removed for flutter/engine/49941, due to This PR has not met approval requirements for merging. Changes were requested by {flar}, please make the needed changes and resubmit this PR.
The PR author is a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 22, 2024
Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

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

Approving with caveat described in the comments

@gaaclarke gaaclarke merged commit cc52c56 into flutter:main Jan 22, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 23, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 23, 2024
…142023)

flutter/engine@d3dbd42...df6b15d

2024-01-22 [email protected] [Impeller] dont emulate command buffers for compute on Metal/Vulkan. (flutter/engine#49922)
2024-01-22 [email protected] [Impeller] fixed colorspace for metal screenshots (flutter/engine#49941)
2024-01-22 [email protected] [Impeller] remove frame counter that was unused in Vulkan allocator. (flutter/engine#49913)
2024-01-22 [email protected] [Impeller] Create the golden test screenshotter after setting the Vulkan ICD environment variable (flutter/engine#49948)
2024-01-22 [email protected] [Windows] Rename and move EGL types (flutter/engine#49900)
2024-01-22 [email protected] Roll Skia from fa5f2461554f to 58973cca0edd (2 revisions) (flutter/engine#49947)

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.

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[Impeller]impeller_Play_AiksTest_CanRenderRadialGradientWithDitheringEnabled differs between metal and vulkan

2 participants