1. 程式人生 > >View重新整理過程Java-JNI

View重新整理過程Java-JNI

View重新整理過程

這裡只討論Java<->JNI之間的重新整理,僅限CPU部分。GPU和Display部分需要看C++原始碼,暫時忽略

  • View
    • invalidate()
    • requestFocus()
  • ViewParent
    • invalidateChild()
  • ViewGroup
    • invalidateChildInParent()
  • ViewRootImpl
    • invalidate()
    • invalidateRectOnScreen()
  • ViewRootImpl
    • scheduleTraversals()
  • Choreographer
    • postCallback(Choreographer.CALLBACK_TRAVERSAL, mTraversalRunnable, null);
    • scheduleFrameLocked(now);
    • scheduleVsyncLocked()
  • FrameDisplayEventReceiver
    • scheduleVsync()
    • nativeScheduleVsync(mReceiverPtr);
  • android_view_DisplayEventReceiver
    • nativeScheduleVsync()
    • reveiver->scheduleVsync()
  • DisplayEventReceiver
    • dispatchVsync
  • Choreographer.FrameDisplayEventReceiver
    • onVsync
  • Choreographer.FrameHandler
    • handleCallback
  • Choreographer.FrameDisplayEventReceiver
    • run
  • Choreographer
    • doFrame(System.nanoTime(), 0);