X Tutup
Skip to content

[BUG] SkiaSharp rendering performance is much lower than native Skia C++ #3552

@mattleibow

Description

@mattleibow

Description

There is a large performance gap between SkiaSharp and equivalent native Skia C++ code. The C++ version achieves around 120 fps while the managed SkiaSharp code achieves less than 10 fps by default, and up to 40 fps with new OpenGL flags. Benchmarks and sample code are available below.

Benchmark repo: https://github.com/wieslawsoltes/FastSkiaSharp
Fork with downgraded Skia (same version as SkiaSharp): https://github.com/mattleibow/FastSkiaSharp/tree/main_119
Discussion thread: https://x.com/wieslawsoltes/status/1984761177520685154

Code

Repository examples and minimal repros:

No standalone code snippet, see full repo above.

Expected Behavior

SkiaSharp rendering performance should be much closer to that of native Skia for equivalent rendering workloads, ideally within 80–90% of the native C++ performance.

Actual Behavior

SkiaSharp rendering is much slower than native Skia, showing frame rates <10 fps in default configuration and around 40 fps with new OpenGL flags, compared to 120 fps for native C++.

Version of SkiaSharp

3.116.0 (Current)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio Code (macOS)

Platform / Operating System

macOS

Platform / Operating System Version

No response

Devices

No response

Relevant Screenshots

Image

Relevant Log Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup