-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Impeller] make sampler use string_view instead of std::string. #56821
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
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. |
Note: this change caused the clangd server to highlight a lurking bug - we forgot to pass the sampler descriptor to the vertices w/ texture path. |
@@ -786,6 +786,7 @@ void Canvas::DrawVertices(const std::shared_ptr<VerticesGeometry>& vertices, | |||
contents->SetEffectTransform(effect_transform); | |||
contents->SetTexture(texture); | |||
contents->SetTileMode(x_tile_mode, y_tile_mode); | |||
contents->SetSamplerDescriptor(sampler_descriptor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for whatever reason, with this change clangd highlighted that sampler_descriptor
was unused, revealing this bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked through the codebase to make sure that we aren't creating a SamplerDescriptor with a dynamically allocated string. I didn't see one, lgtm!
…159527) flutter/engine@da71729...b9474a9 2024-11-27 chris@bracken.jp Reland: iOS: Migrate PlatformViewsController to Objective-C (flutter/engine#56828) 2024-11-27 jonahwilliams@google.com [Impeller] make sampler use string_view instead of std::string. (flutter/engine#56821) 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 zra@google.com 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
…ter/engine#56821) I believe these are always const strings anyway, so remove the copy associated with using std::string.
I believe these are always const strings anyway, so remove the copy associated with using std::string.