Skip to content

Conversation

julienamsellem
Copy link
Contributor

@julienamsellem julienamsellem commented Oct 26, 2021

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:

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

@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

VFX
/jobDefinition/.yamato%252Fall-vfx.yml%2523PR_VFX_2021.2

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@github-actions github-actions bot added the vfx label Oct 26, 2021
@julienamsellem julienamsellem requested review from a team and PaulDemeulenaere October 26, 2021 13:46
@julienamsellem julienamsellem marked this pull request as ready for review October 26, 2021 13:48
@VitaVFX VitaVFX requested review from VitaVFX and removed request for a team October 27, 2021 04:07
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 merged commit e8de9ff into 2021.2/staging Nov 4, 2021
@julienamsellem julienamsellem deleted the 2021.2/vfx/vfx-systemborder-dpi-fix branch November 4, 2021 11:14
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.

4 participants