You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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.
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?
The text was updated successfully, but these errors were encountered: