HiJust recently I started learning about SKIA since I have a requirement to do some 2d animated renderings with the intention of benchmarking GPUs.I came across animated samples in SKIA fiddle and I'm not sure how is the animation done.For e.g., In the below fiddle example, I have a few questions,1) I understand that the draw method renders a single frame but how is it getting animated? Are they making multiple draw() calls to animate it?
2) Under the options menu I see a checkbox for animation which I believe is responsible for the animation. So what is the SKIA API that gets triggered in the background which causes the animation?
3) What is the value of the variable frame? Is it always either 0 or 1?
Thank you.--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/b659118e-9af3-406f-91b3-d9822fef049bn%40googlegroups.com.

@Joe, Thanks for your input.I'm trying to implement the same fiddle example via an Android application but it doesn't animate. Can you let me know if I'm doing it the right way?1) From the Android app I make a JNI call passing an Android bitmap (android.graphics.Bitmap) and the frame value (1 to 240).2) On the native side, I have used the draw & other methods from the fiddle example to draw onto the bitmap.3) The 1st & 2nd points happen in a continuous loop with the frame value incrementing from 1 to 240, but I don't see the animation happening. All I see is a static image, even that is not the same as I see in the fiddle example. I've attached a screenshot. Ignore the value (60) that you see in the circle which is supposedly the fps, I used an open-source library to calculate it.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/a8cf51c1-c301-44a9-ba24-e99f469583afn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/63741d2e-3c5a-4775-b73f-15cbcbac58c4n%40googlegroups.com.