mono / SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.54k stars 543 forks source link

[BUG] Invalid Clipping on Apple Sillicon #1858

Open danwalmsley opened 3 years ago

danwalmsley commented 3 years ago

Description

Seems to be caused by.. https://bugs.chromium.org/p/skia/issues/detail?id=12164#c5

example of bug can be seen here:

https://github.com/AvaloniaUI/Avalonia/issues/6144

This only happens on apple sillicon gpus, and some nvidia 3000 series GPUs.

It looks like the fix wasnt merged into skia until July so probably we cant fix this until m9x.

Any ideas on a way to work around this?

SkPaint.IsAntiAliased = false does resolve the clipping issue, but at the cost of poor quality rendering.

danwalmsley commented 3 years ago

ok a workaround:

new GRContextOptions { AvoidStencilBuffers = true }