Skip to main content

SkiaOptions Class

Definition​

Namespace:Avalonia
Assembly:Avalonia.Skia
Package:Avalonia.Skia

Options for Skia rendering subsystem.

public class SkiaOptions

Inheritance: object -> SkiaOptions

Constructors​

NameDescription
SkiaOptionsNo summary available.

SkiaOptions Constructor​

public SkiaOptions()

Properties​

NameDescription
MaxGpuResourceSizeBytesThe maximum number of bytes for video memory to store textures and resources.
UseOpacitySaveLayerUse Skia's SaveLayer API to handling opacity.
UseStencilBuffersGets whether stencil buffers can be used for various draw operations, improving clipping performance. Enabling them lets Skia pick multisample-based path rendering, which quantizes edge coverage and visibly degrades anti-aliasing of vector geometry, so they are disabled unless explicitly requested.

MaxGpuResourceSizeBytes Property​

The maximum number of bytes for video memory to store textures and resources.

public Nullable<long> MaxGpuResourceSizeBytes { get; set; }

Remarks​

This is set by default to the recommended value for Avalonia. Setting this to null will give you the default Skia value.

UseOpacitySaveLayer Property​

Use Skia's SaveLayer API to handling opacity.

public bool UseOpacitySaveLayer { get; set; }

Remarks​

Enabling this might have performance implications.

UseStencilBuffers Property​

Gets whether stencil buffers can be used for various draw operations, improving clipping performance. Enabling them lets Skia pick multisample-based path rendering, which quantizes edge coverage and visibly degrades anti-aliasing of vector geometry, so they are disabled unless explicitly requested.

public Nullable<bool> UseStencilBuffers { get; set; }