Clean up code around the painting loop#10917
Merged
JeremyKuhne merged 2 commits intodotnet:mainfrom Feb 21, 2024
Merged
Conversation
Various cleanup with painting. - Add a SuspendLayoutScope to simplify scoping and validation - Don't update layout for the parent if you don't change size (SetBoundsCore) - Fix remaining info messages in Control - Don't paint transparent background twice in PaintBackground - Cache checking image transparency in PaintBackground - Suppress all relevant warnings in NotSupported.cs to avoid the 10000 warnings that pop when you accidentally open it Stops caching high contrast setting. By caching and starting the SystemEvents window this was causing a nested paint on the main form during startup if you you had a background image. The call is not so expensive to need creating a window look for changes. This also moves a few bitmap related APIs to Core to allow for Direct2D related scenarios.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #10917 +/- ##
===================================================
+ Coverage 73.14861% 73.15202% +0.00340%
===================================================
Files 3087 3090 +3
Lines 633673 633582 -91
Branches 47397 47395 -2
===================================================
- Hits 463523 463478 -45
+ Misses 166636 166584 -52
- Partials 3514 3520 +6
Flags with carried forward coverage won't be shown. Click here to find out more. |
KlausLoeffelmann
pushed a commit
to KlausLoeffelmann/winforms
that referenced
this pull request
Mar 5, 2024
Various cleanup with painting. - Add a SuspendLayoutScope to simplify scoping and validation - Don't update layout for the parent if you don't change size (SetBoundsCore) - Fix remaining info messages in Control - Don't paint transparent background twice in PaintBackground - Cache checking image transparency in PaintBackground - Suppress all relevant warnings in NotSupported.cs to avoid the 10000 warnings that pop when you accidentally open it Stops caching high contrast setting. By caching and starting the SystemEvents window this was causing a nested paint on the main form during startup if you you had a background image. The call is not so expensive to need creating a window look for changes. This also moves a few bitmap related APIs to Core to allow for Direct2D related scenarios.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Various cleanup with painting.
Stops caching high contrast setting. By caching and starting the SystemEvents window this was causing a nested paint on the main form during startup if you you had a background image. The call is not so expensive to need creating a window look for changes.
This also moves a few bitmap related APIs to Core to allow for Direct2D related scenarios.
Microsoft Reviewers: Open in CodeFlow