相关阅读:矢山代码阅读器
如果你此时的问题是Choreographer.postCallback这个函数是干什么的?请阅读:从vsync到ondraw
android.view.View.invalidate:::
android.view.View.invalidate::boolean:
android.view.View.invalidateInternal::int,int,int,int,boolean,boolean:
android.view.ViewParent.invalidateChild::View,Rect:
// recursion start
android.view.ViewGroup.invalidateChild::View,Rect:
android.view.ViewParent.invalidateChildInParent::int[],Rect:
// recursin end
android.view.ViewRootImpl.invalidateChildInParent::int[],Rect:
android.view.ViewRootImpl.invalidate:::
android.view.ViewRootImpl.scheduleTraversals:::
android.view.Choreographer.postCallback::int,Runnable,Object:
结合从vsync到ondraw就能解释invalidate函数为什么能触发onDraw了。