@Override public void postInvalidateOnAnimation(){
  if (mPendingInvalidation)   return;
  long nextDrawTime=mLastDrawTimeMs + MIN_MS_PER_FRAME;
  long delay=Math.max(0,nextDrawTime - System.currentTimeMillis());
  mPendingInvalidation=true;
  postOnAnimationDelayed(mInvalidationRunnable,delay);
}

@ Override public void postInvalidateOnAnimation ( ) { if ( mPendingInvalidation ) return ; long nextDrawTime = mLastDrawTimeMs + MIN_MS_PER_FRAME ; long delay = Math . max ( 0 , nextDrawTime - System . currentTimeMillis ( ) ) ; mPendingInvalidation = true ; postOnAnimationDelayed ( mInvalidationRunnable , delay ) ; }
delay invalidations to be no more than 1 per min_ms_per_frame ; never allow more than one invalidation outstanding .
