File tree Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,10 @@ git config --global credential.guiSoftwareRendering true
247247
248248Defaults to false (use hardware acceleration where available).
249249
250+ > [ !NOTE]
251+ > Windows on ARM devices defaults to using software rendering to work around a
252+ > known Avalonia issue: < https://github.com/AvaloniaUI/Avalonia/issues/10405 >
253+
250254** Also see: [ GCM_GUI_SOFTWARE_RENDERING] [ gcm-gui-software-rendering ] **
251255
252256---
Original file line number Diff line number Diff line change @@ -294,6 +294,10 @@ export GCM_GUI_SOFTWARE_RENDERING=1
294294
295295Defaults to false (use hardware acceleration where available).
296296
297+ > [ !NOTE]
298+ > Windows on ARM devices defaults to using software rendering to work around a
299+ > known Avalonia issue: < https://github.com/AvaloniaUI/Avalonia/issues/10405 >
300+
297301** Also see: [ credential.guiSoftwareRendering] [ credential-guisoftwarerendering ] **
298302
299303---
Original file line number Diff line number Diff line change @@ -53,6 +53,22 @@ public static bool IsDevBox()
5353#endif
5454 }
5555
56+ /// <summary>
57+ /// Returns true if the current process is running on an ARM processor.
58+ /// </summary>
59+ /// <returns>True if ARM(v6,hf) or ARM64, false otherwise</returns>
60+ public static bool IsArm ( )
61+ {
62+ switch ( RuntimeInformation . OSArchitecture )
63+ {
64+ case Architecture . Arm :
65+ case Architecture . Arm64 :
66+ return true ;
67+ default :
68+ return false ;
69+ }
70+ }
71+
5672 public static bool IsWindowsBrokerSupported ( )
5773 {
5874 if ( ! IsWindows ( ) )
Original file line number Diff line number Diff line change @@ -568,10 +568,15 @@ public bool UseSoftwareRendering
568568 {
569569 get
570570 {
571+ // WORKAROUND: Some Windows ARM devices have a graphics driver issue that causes transparent windows
572+ // when using hardware rendering. Until this is fixed, we will default to software rendering on these
573+ // devices. Users can always override this setting back to HW-accelerated rendering if they wish.
574+ bool defaultValue = PlatformUtils . IsWindows ( ) && PlatformUtils . IsArm ( ) ;
575+
571576 return TryGetSetting ( KnownEnvars . GcmGuiSoftwareRendering ,
572577 KnownGitCfg . Credential . SectionName ,
573578 KnownGitCfg . Credential . GuiSoftwareRendering ,
574- out string str ) && str . ToBooleanyOrDefault ( false ) ;
579+ out string str ) ? str . ToBooleanyOrDefault ( defaultValue ) : defaultValue ;
575580 }
576581 }
577582
You can’t perform that action at this time.
0 commit comments