Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UWP platform does not behave the same as iOS and Android #459

Closed
scastria opened this issue Mar 2, 2018 · 4 comments
Closed

UWP platform does not behave the same as iOS and Android #459

scastria opened this issue Mar 2, 2018 · 4 comments

Comments

@scastria
Copy link

scastria commented Mar 2, 2018

I have a sample SkiaSharp app located on GitHub: https://github.com/scastria/SkiaDemo1

If I run the Layer Performance sample on Android and iOS, it works as expected. I can pinch and pan anywhere and when I click the reset toolbar button, it animates back to the Identity matrix.

However, if I run the same Layer Performance sample on UWP, it does not work correctly. Whenever I click the reset toolbar button, it animates but the very last paint of the canvas is wrong and shows an incorrect result. If you click anywhere on the screen, it causes the color of the text to change which invalidates the surface 1 more time which then draws correctly.

It seems the code inside the Commit part of the Animation does not run correctly on UWP only. Any ideas?

@scastria
Copy link
Author

scastria commented Jul 3, 2018

Any update on this?

@scastria
Copy link
Author

Anybody I can pay to have this fixed?

@scastria
Copy link
Author

I was finally able to understand what was going on. For some reason on the UWP platform, the Animation commit which does an InvalidateSurface causes 2 calls to the paint canvas method. My code was not expecting that which revealed a bug in my code where I forgot to set a matrix back to Identity. I have since fixed and updated that in the GitHub repo mentioned above. So there may not be a bug in SkiaSharp on UWP, but perhaps in the Xamarin.Forms animation engine??

In any case, someone needs to investigate why on UWP, the animation commit call to InvalidateSurface causes 2 calls to the paint canvas method.

@mattleibow
Copy link
Contributor

Closing this issue as this was a Xamarin.Forms bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants