1. ViewRootImpl :doTraversal()
void doTraversal() {
if (mTraversalScheduled) {
mTraversalScheduled = false;
mHandler.getLooper().removeSyncBarrier(mTraversalBarrier);
if (mProfile) {
Debug.startMethodTracing("ViewAncestor");
}
Trace.traceBegin(Trace.TRACE_TAG_VIEW, "performTraversals");
try {
performTraversals();
} finally {
Trace.traceEnd(Trace.TRACE_TAG_VIEW);
}
if (mProfile) {
Debug.stopMethodTracing();
mProfile = false;
}
}
}
2. ViewRootImpl :performTraversals()
3. ViewRootImpl :performDraw()
4. ViewRootImpl :draw()
5. PhoneWindow$DecorView :draw()
6. ViewGroup :dispatchDraw()
7. ViewGroup :drawChild()
8. View :draw()
9. 延续第 5 ~ 8步 ,遍历绘制