Double Buffering in Android using SKGLView seems to not be working?

NickWhitehurstNickWhitehurst GBMember ✭✭

The attached solution is the minimum to reproduce a problem I am having with Android.

The app draws two white "cards" (of course, more complex in the real app). There is a border between them and basic touch control to swipe left and right between them. I have added a 20ms delay to simulate a long draw time.

In IOS and UWP, the result is two white boxes with a clear blue line between them. The blue line is always the same size.

In Android, the result is two white boxes but the blue line changes in size depending on the speed of the swipe.

The boxes are drawn within the same OnPaintSurface call, so should never be different sizes unless the canvas is being rendered **during **the call. Does this mean that double buffering is not working?

I haven't tried rendering to a bitmap yet because I wanted to check if it is a bug that can be fixed.

BTW, the attached solution is a completely fresh "New Project" and the only additions are the CardView.cs and "Content = new CardView();" in the MainPage constructor in the common library and the reference to the SkiaSharp nugets added as needed.

Finally, this arises from tests on hardware and the android device is the most modern - flagship level from a year ago so there should be no issues with hardware capability.

Sign In or Register to comment.