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
247
247
248
248
Defaults to false (use hardware acceleration where available).
249
249
250
+ > [ !NOTE]
251
+ > Windows on ARM devices default to using software rendering to workaround a
252
+ > known Avalonia issue: < https://github.com/AvaloniaUI/Avalonia/issues/10405 >
253
+
250
254
** Also see: [ GCM_GUI_SOFTWARE_RENDERING] [ gcm-gui-software-rendering ] **
251
255
252
256
---
Original file line number Diff line number Diff line change @@ -294,6 +294,10 @@ export GCM_GUI_SOFTWARE_RENDERING=1
294
294
295
295
Defaults to false (use hardware acceleration where available).
296
296
297
+ > [ !NOTE]
298
+ > Windows on ARM devices default to using software rendering to workaround a
299
+ > known Avalonia issue: < https://github.com/AvaloniaUI/Avalonia/issues/10405 >
300
+
297
301
** Also see: [ credential.guiSoftwareRendering] [ credential-guisoftwarerendering ] **
298
302
299
303
---
Original file line number Diff line number Diff line change @@ -53,6 +53,22 @@ public static bool IsDevBox()
53
53
#endif
54
54
}
55
55
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
+
56
72
public static bool IsWindowsBrokerSupported ( )
57
73
{
58
74
if ( ! IsWindows ( ) )
Original file line number Diff line number Diff line change @@ -568,10 +568,15 @@ public bool UseSoftwareRendering
568
568
{
569
569
get
570
570
{
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
+
571
576
return TryGetSetting ( KnownEnvars . GcmGuiSoftwareRendering ,
572
577
KnownGitCfg . Credential . SectionName ,
573
578
KnownGitCfg . Credential . GuiSoftwareRendering ,
574
- out string str ) && str . ToBooleanyOrDefault ( false ) ;
579
+ out string str ) && str . ToBooleanyOrDefault ( defaultValue ) ;
575
580
}
576
581
}
577
582
You can’t perform that action at this time.
0 commit comments