4. View This class represents the basic building block for user interface components. A View occupies a rectangular area on the screen and is responsible for drawing and event handling. View is the base class for widgets, which are used to create interactive UI components (buttons, text fields, etc.).
11. android.view.Window Abstract base class for a top-level window look and behavior policy. It provides standard UI policies such as a background, title area, default key processing, etc. 它是通常意义上我们理解的应用层面窗口, TopLevelWindow or WindowPolicy 可能是一个更合适的名字
17. ViewRootImpl The top of a view hierarchy, implementing the needed protocol between View and the WindowManager This is for the most part an internal implementation detail WindowManagerImpl
19. Cont. IWindow API back to a client window that the Window Manager uses to inform it of interesting things happening. 回调接口用于接收 WMS 关于窗口的消息 —— 显示 / 隐藏,大小改变,焦点变化等等 除了注册窗口外, ViewRootImpl 还向 WMS (通过 InputQueue )注册了一个 InputHandler 用于接收输入事件 接收到的输入事件会先放在 UI 线程的消息循环中,然后通过 ViewRootImpl 进行分派,在它对应的 View Hierachy 上路由
26. Surface Handle onto a raw buffer that is being managed by the screen compositor. 每个 Window 都有一个 Surface ,由窗口在客户端的代理者 ViewRootImpl 所拥有 Surface 在 ViewRootImpl 第一次渲染 View Hierachy 时创建 ViewRootImpl.performTraversals ViewRootImpl.relayoutWindow IWindowSession.relayout
34. SurfaceView Provides a dedicated drawing surface embedded inside of a view hierarchy. You can control the format of this surface and, if you like, its size; the SurfaceView takes care of placing the surface at the correct location on the screen The surface is Z ordered so that it is behind the window holding its SurfaceView; the SurfaceView punches a hole in its window to allow its surface to be displayed.
36. GLSurfaceView An implementation of SurfaceView that uses the dedicated surface for displaying OpenGL rendering. A GLSurfaceView provides the following features: Manages a surface, which is a special piece of memory that can be composited into the Android view system. Manages an EGL display, which enables OpenGL to render into a surface. Accepts a user-provided Renderer object that does the actual rendering. Renders on a dedicated thread to decouple rendering performance from the UI thread. Supports both on-demand and continuous rendering. Optionally wraps, traces, and/or error-checks the renderer's OpenGL calls.