Revert "Fix up relevant CA1416 warnings - Set 3 (#26751)"#30421
Revert "Fix up relevant CA1416 warnings - Set 3 (#26751)"#30421
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.
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); |
There was a problem hiding this comment.
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); |
|
/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