oxyplot skiasharp port

DavidDunscombeDavidDunscombe GBMember ✭✭

Heres a port of oxyplot to use skiasharp as a renderer.


The android port has both bitmap based and opengl based plotview, not worked out how to do iOS opengl with skiasharp as of yet.

For android the performance boost for using skiasharp over the native canvas is significant, which is surprising given that skia is basically the android rendering layer - I guess the c# -> jni -> java -> c++ interop layers add up!

For iOS i found the skiasharp based renderer slightly slower, so its probably best to use the existing renderer.


  • mattleibowmattleibow ZAXamarin Team Xamurai

    @DavidDunscombe this looks good so far. I have also been doing some work that may help. I have created a set of platform views and layers for both software and GL backends. Let me know if it is useful or not, or whether something can be done to improve... See: https://github.com/mono/SkiaSharp/issues/148

  • DavidDunscombeDavidDunscombe GBMember ✭✭

    Thanks I've updated the iOS plotview with a GL version based on skia sharp views code. I did notice some odd behaviour with cliprect & drawing text with the GL variant of skia on iOS, it would not undo the clip (using save/restore) - it was reproducible but i'm not entirely sure on the reason why. For the time being I've removed the clipping from the oxyplot renderer when drawing text. The opengl skia is quick!, faster than iOS native drawing, especially when large number of lines are being drawn, although it does become unstable when you start to hit 100k+ lines.

    One other alternative to using skias opengl might be to use the bitmap based method but use a CVOpenGLESTextureCache to render the pixel data rather the create a new CGImage every frame as on the none opengl skia view.

  • mattleibowmattleibow ZAXamarin Team Xamurai

    @DavidDunscombe It has been some time, but have you checked out the new bits for SkiaSharp? http://forums.xamarin.com/discussion/80325/announcing-skiasharp-v1-54-1-and-skiasharp-views

    Basically, hardware-accelerated views that can be used as a UI control. There is even a set for Xamarin.Forms

Sign In or Register to comment.