SKGLView much darker than SKCanvasView with identical drawing code

MudMud USMember ✭✭
edited September 2017 in SkiaSharp

Crosspost from Xamarin.Forms:

My app's main screen is rendered in a SKCanvasView. The colors accurately reflect the values I specified in code. Swapping SKGLView in for SKCanvasView, changing nothing else in the code, results in 60% darker output.

    <!--<skia:SKCanvasView PaintSurface="OnCanvasViewPaintSurface" />-->
    <skia:SKGLView PaintSurface="OnCanvasViewPaintSurface" />

Does anyone know why this happening and how do I fix it?


  • mattleibowmattleibow ZAXamarin Team Xamurai

    I don't think I have ever noticed this... Can you attach a small sample that shows this happening so I can have a look?

  • mattleibowmattleibow ZAXamarin Team Xamurai

    I think I found the solution to the issue - it appears to be the style:

  • MudMud USMember ✭✭

    So, armed with this solution, and having successfully tested in an iPad Air 2, I shipped a version of my application using SKGLView. I immediately got bug reports from users complaining that the screen turned white and the app hung. Only one user mentioned his phone (iPhone 6S 64GB iOS 11) so I'm not sure which devices are selected, but I immediately switched SKGVView to SKCanvasView and pushed out an update, and this fixed the issue for everyone.

    I haven't had time to investigate further (been on a business trip), but just a word of warning: be sure to test on as many devices as possible if you decide to use SKGLView.

  • mattleibowmattleibow ZAXamarin Team Xamurai

    @Mud, that is not good news. Do you have any crash reports or more details? I really want to be able to resolve this.

Sign In or Register to comment.