Android系统 Window的创建过程图解
2020-08-01 14:15:00 8 举报
详细分解了Android 系统中Window的创建过程,包含了Decor的创建和View的渲染过程以及window的创建过程
作者其他创作
大纲/内容
这里是View绘制的开始
7.openSession
15. 返回WindowState对象 win
38. outSurface.copyFrom(mSurfaceControl);
33.relayoutWindow
9.rerun Session
10. setView
SurfaceSession
18.windowAddedLocked
6.getWindowSession
24. createConnection
WindowManagerService
给屏幕添加输入事件
22.new SurfaceComposerClient
android_view_SurfaceSession.cpp
ActiivtyThread
30.TraversalRunnable.run
34.relayout
3.addView()
42.performDraw
26 client
16. openInputChannel
12.addWindow
WindowState
SurfaceComposerClient
2.addView(decor)
WindowManagerGlobal
37. surfaceController.getSurface
32.performTraversals
14. new WindowState
5.new ViewRootImpl
28. scheduleTraversals
disPlayContent表示一块屏幕
13. RootWindowContainer.getDisplayContentOrCreate
1.handeResmueActivity
SurfaceSession可以直接和SurfaceFlinger进行对话
Client.cpp
19.new SurfaceSession
WindowManager
41.performLayout
SurfaceComposerClient.cpp
WindowManagerImpl
35.relayoutWindow
ViewRootImpl
设置获取到有效的Surface内存地址
8. return new Session
25.new Client
40. performMeasure
Session
36.createSurfaceControl
39 setNativeObjectLocked
29 .postCallback( Choreographer.CALLBACK_TRAVERSAL)
11. addToDisplay
31.doTraversal
20.nativeCreate
返回SurfaceComposerClient对象
23. onFirstRef
21.nativeCreate
27. requestLayout
4.addView
SurfaceFlinger_hwc1.cpp
17. attach
0 条评论
下一页