Upgrade to Pro — share decks privately, control downloads, hide ads and more …

introduction to Choreographer

introduction to Choreographer

introduction to Choreographer

Daichi Furiya (Wasabeef)

September 11, 2015
Tweet

More Decks by Daichi Furiya (Wasabeef)

Other Decks in Programming

Transcript

  1. $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.”
  2. 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); } }