1 Linux Drive FrameBuffer
At the kernel level, the system screen is described using a hardware device called a framebuffer, and user-space applications can manipulate the hardware device through the device file/dev/fb0 or/dev/graphics/fb0. In fact, the framebuffer itself is not really a hardware, it's just an abstract representation of the graphics card, but we can indirectly manipulate the graphics memory and other registers in the video card by visiting the frame buffer.
2 Hardware Abstraction Layer (HAL) module Gralloc
In order to draw a specified picture on the screen, we need to:
1. Assign a graphics buffer that matches the screen size
2. Register (map) The allocated graphics buffers to the address space of the current process to
3. The contents of the picture to be drawn are written into the registered graphics buffer and rendered (copied) to the system frame buffer.
To achieve the above three operations, we also need to:
1. Load the Gralloc module
2. Open the GRALLOC device and FB device in the Gralloc module
wherein, the GRALLOC device is responsible for allocating the graphics buffer, the Gralloc module is responsible for registering the graphics buffer, and the FB device is responsible for rendering the graphics buffer
3 Surfaceflinger Service is responsible for drawing the Android app UI
This is to learn Loro notes, salute to Lao Luo.
Android System Display Frame