introduction to Choreographer

introduction to Choreographer

introduction to Choreographer

6dd0483f1353a4a359e92633cfd65c64?s=128

Daichi Furiya (Wasabeef)

September 11, 2015
Tweet

Transcript

  1. $IPSFPHSBQIFS 8BTBCFFG

  2. "CPVU.F @wasabeef_jp CyberAgent, Inc.

  3. Choreographer IUUQEBODFXPSLTOFUJOTQJSBUJPODIPSFPHSBQIFST

  4. $IPSFPHSBQIFS “The choreographer receives timing pulses (such as vertical synchronization)

    from the display subsystem then schedules work to occur as part of rendering the next display frame.”
  5. 'SBNF3BUF

  6. 'SBNF3BUF “ϑϨʔϜϨʔτ͸ɺಈըʹ͓͍ͯɺ୯Ґ࣌ؒ͋ ͨΓʹॲཧͤ͞ΔϑϨʔϜ਺ʢ੩ࢭը૾਺ɺί Ϛ਺ʣͰ͋Δɻ௨ৗɺ1ඵ͋ͨΓͷ਺஋Ͱද͠ɺ fpsʢӳ: frames per secondʹϑϨʔϜຖ ඵʣͱ͍͏୯ҐͰද͢ɻ”

  7. IUUQTUXJUUFSDPN.D'VOLZQBOUTTUBUVT

  8. 60fps: 16.666666667/ms 40fps: 33.333333333/ms 15fps: 66.666666667/ms

  9. 74ZOD

  10. IUUQCJUMZ&2RKL

  11. None
  12. )PXUPVTF

  13. class Metronome implements Choreographer.FrameCallback { private Choreographer choreographer; public Metronome()

    { choreographer = Choreographer.getInstance(); } public void start() { choreographer.postFrameCallback(this); } public void stop() { choreographer.removeFrameCallback(this); } @Override public void doFrame(long frameTimeNanos) { Timber.i(“Callback frameTimeNanos” + frameTimeNanos); choreographer.postFrameCallback(this); } }
  14. $IPSFPHSBQIFS$PNQBU JOGBDFCPPLSFCPVOE

  15. None
  16. IUUQTXXXqJDLSDPNQIPUPTUFUTVL

  17. IUUQTHJUIVCDPNXBTBCFFG5BLU

  18. EFQFOEFODJFT\ DPNQJMFKQXBTBCFFGUBLU  ^  5BLUTUPDL UIJT QMBZ 

  19. 5IBOLT