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/1372276/

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:

  • 10.x.x/release
    • Open a VFX
    • Keep dragging around a context
    • => Error message in the console
  • 10.x.x/vfx/vfx-systemborder-dpi-fix
    • Open VFX
    • Keep dragging around a context
    • => No error message in the console

reapazor and others added 6 commits October 26, 2021 17:22
# Conflicts:
#	com.unity.visualeffectgraph/Editor/Utils/VFXSystemBorder.cs
Depending on DPI setting the bounds rect could be instable and vary of less than a pixel (especially visible with DPI set at 125%)
@julienamsellem julienamsellem changed the base branch from master to 10.x.x/release October 26, 2021 15:56
@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)

HDRP
/jobDefinition/.yamato%2Fall-hdrp.yml%23PR_HDRP_trunk
With changes to HDRP packages, you should also run
/jobDefinition/.yamato%2Fall-lightmapping.yml%23PR_Lightmapping_trunk

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.

@julienamsellem julienamsellem requested review from a team and PaulDemeulenaere October 26, 2021 15:57
@julienamsellem julienamsellem marked this pull request as ready for review October 26, 2021 15:57
@github-actions github-actions bot added the vfx label Oct 26, 2021
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

{
class VFXSystemBorderFactory : UxmlFactory<VFXSystemBorder>
{}
{ }
Copy link
Contributor

Choose a reason for hiding this comment

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

Unexpected change but probably comes from formatting 🤔

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