0

When I use Choreographer I was thinking that it's will fire the doFrame every 16 ms to synch with the vSynch. But seam it's not the case when I look the log :

04-04 01:02:13.430: I/doFrame(5348): 83955391747085
04-04 01:02:13.443: I/doFrame(5348): 83955405796564
04-04 01:02:13.451: I/doFrame(5348): 83955413367397
04-04 01:02:13.461: I/doFrame(5348): 83955421952814
04-04 01:02:13.468: I/doFrame(5348): 83955430145522
04-04 01:02:13.474: I/doFrame(5348): 83955438113751
04-04 01:02:13.497: I/doFrame(5348): 83955460370652
04-04 01:02:13.515: I/doFrame(5348): 83955477302114
04-04 01:02:13.532: I/doFrame(5348): 83955494233669
04-04 01:02:13.549: I/doFrame(5348): 83955511161610

As you can see their is much less than 16ms between each call to doframe. So now I don't understand how Choreographer work :( What exactly mean calling Choreographer.postFrameCallback ? how it's possible that it's can be only 7ms between 2 doFrame event ?

zeus
  • 12,173
  • 9
  • 63
  • 184
  • 1
    Just FYI: [Drawn out: How Android renders (Google I/O '18)](https://youtu.be/zdQRIYOST64) – Morrison Chang Apr 03 '21 at 23:26
  • @MorrisonChang thanks, i see this but it's not explain why my choregrapher doframe is called with 7 ms interval instead of 16 ms :( – zeus Apr 03 '21 at 23:36
  • Are you testing on emulator or device (which may have display greater than 60Hz) – Morrison Chang Apr 03 '21 at 23:46
  • no, on a true mobile phone. but I notice also that the value of doFrame frameTimeNanos is always espaced of around 16 ms so i don't understand what this mean :( – zeus Apr 03 '21 at 23:50

0 Answers0