Skip to content

Commit

Permalink
fix: Enable HW Accel over RDP for Skia Desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Apr 5, 2024
1 parent 7e6f395 commit cc2438c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
16 changes: 15 additions & 1 deletion doc/articles/features/using-skia-desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,23 @@ If you want to upgrade **SkiaSharp** to a later version, you'll need to specify
</ItemGroup>
```

## Windows Specifics

### RDP Hardware Acceleration

The Uno Platform Skia Desktop runtime on Windows uses a WPF shell internally. By default, Uno Platform enables RDP hardware acceleration in order to get good performance, yet this feature is disabled by default in standard WPF apps with .NET 8.

If you're having issues with the Windows support for Skia Desktop over RDP, add the following to your project:

```xml
<ItemGroup>
<RuntimeHostConfigurationOption Include="Switch.System.Windows.Media.EnableHardwareAccelerationInRdp" Value="false" />
</ItemGroup>
```

## X11 Specifics

When running using X11 Wayland compatibility, DPI scaling cannot be determined in a reliable way. In order to specify the scaling to be used by Uno Platform, set the `UNO_DISPLAY_SCALE_OVERRIDE` environment variable. The default value is `1.0`.
When running using X11 Wayland compatibility (e.g. recent Ubuntu releases), DPI scaling cannot be determined in a reliable way. In order to specify the scaling to be used by Uno Platform, set the `UNO_DISPLAY_SCALE_OVERRIDE` environment variable. The default value is `1.0`.

The X11 support uses DBus for various interactions with the system, such as file selection. Make sure that dbus installed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@
<_UnoProjectSystemPackageReference Include="Uno.WinUI.Skia.MacOS" ProjectSystem="true" />
<_UnoProjectSystemPackageReference Include="Uno.WinUI.Skia.Wpf" ProjectSystem="true" />
<_UnoProjectSystemPackageReference Include="Uno.WinUI.Skia.X11" ProjectSystem="true" />

<!-- Enable WPF Hardware accelerarion over RDP, only if not specified by the project -->
<RuntimeHostConfigurationOption
Include="Switch.System.Windows.Media.EnableHardwareAccelerationInRdp"
Value="true"
Exclude="@(RuntimeHostConfigurationOption)" />
</ItemGroup>
</Project>

0 comments on commit cc2438c

Please sign in to comment.