Skip to content

2021.1/vfx/vfx systemborder dpi fix #6147

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

Closed

Conversation

julienamsellem
Copy link
Contributor

@julienamsellem julienamsellem commented Oct 26, 2021

Purpose of this PR

Backport of #5955

https://fogbugz.unity3d.com/f/cases/1372275/

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:

  • staging/2021.1
    • Open a VFX
    • Keep dragging around a context
    • => Error message in the console
  • staging/2021.2/2021.1/vfx/vfx-systemborder-dpi-fix
    • Open VFX
    • Keep dragging around a context
    • => No error message in the console

@github-actions github-actions bot added the vfx label Oct 26, 2021
@julienamsellem julienamsellem requested review from PaulDemeulenaere and a team October 26, 2021 14:35
@VitaVFX VitaVFX requested review from VitaVFX and removed request for a team October 27, 2021 04:23
Copy link

@VitaVFX VitaVFX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approving

@julienamsellem julienamsellem marked this pull request as ready for review October 27, 2021 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants