2021.2/vfx/vfx systemborder dpi fix #6146
Merged
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.
Purpose of this PR
Backport of #5955
https://fogbugz.unity3d.com/f/cases/1372213/
Depending on the DPI of the monitor, and the Windows scaling value (125% is the most common trigger), situations arise where the border/title system around VFX graph blocks constantly dirties itself causing a recursive error from the layout engine. This constant spam degrades the performance of the editor.
This change adds specific checks to resolve scenarios where the internal values have been rounded, but the setting values have not. It also adds protection on the event-based call to do a similar check against the old/new values to avoid additional computation.
Testing status
With a 125% DPI settings on a 4k monitor, I did the following tests: