-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Revert "Fix up relevant CA1416 warnings - Set 3 (#26751)" #30421
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
Conversation
|
/backport to release/9.0.1xx-sr8 |
|
Started backporting to release/9.0.1xx-sr8: https://github.com/dotnet/maui/actions/runs/16054981429 |
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.
Pull Request Overview
This PR reverts the previous CA1416 fix set, restoring the old image-scaling method and removing the FontImage UI tests.
- Reverted
ScaleImageimplementation fromUIGraphicsImageRendererback toUIGraphics.BeginImageContextstyle - Removed
FontImageUITestfrom both Shared.Tests and HostApp projects
Reviewed Changes
Copilot reviewed 3 out of 7 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Graphics/src/Graphics/Platforms/iOS/UIImageExtensions.cs | Restored legacy BeginImageContext scaling method |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/FontImageUITest.cs | Deleted shared UI test for FontImage |
| src/Controls/tests/TestCases.HostApp/Issues/FontImageUITest.cs | Deleted HostApp UI page for FontImage test |
Comments suppressed due to low confidence (2)
| target.Dispose(); | ||
| } | ||
| }); | ||
| UIGraphics.BeginImageContext(size); |
Copilot
AI
Jul 3, 2025
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.
Using UIGraphics.BeginImageContext without specifying options may produce images at the wrong scale (non-retina) and is less efficient. Consider using UIGraphicsBeginImageContextWithOptions(size, opaque: false, scale: UIScreen.MainScreen.Scale) or reinstating UIGraphicsImageRenderer to ensure correct scaling and performance.
| UIGraphics.BeginImageContext(size); | |
| UIGraphics.BeginImageContextWithOptions(size, false, UIScreen.MainScreen.Scale); |
Copilot uses AI. Check for mistakes.
|
/rebase |
This reverts commit 636bd12. # Conflicts: # src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyFontImage.png # src/Core/src/Hosting/LifecycleEvents/AppHostBuilderExtensions.iOS.cs # src/Graphics/src/Graphics/Platforms/iOS/UIImageExtensions.cs
673b948 to
bb23bd1
Compare
|
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Issues Fixed
Fixes #30426
Fixes #30350