1.1 Surfaceflinger
Starting from this section, we formally cut into Surfaceflinger's analysis. In order to maintain the continuity of the presentation, some of the content may have been covered in the previous chapters, and the details will be expanded to include further explanations.
The content is organized as follows:
L First introduce the new features introduced by Android 4.1 (Project Butter), it is necessary to understand this project, and it can be said that Surfaceflinger a large part of the content is around it
L Surfaceflinger start-up process and working mode
The relationship between Surfaceflinger and Bufferqueue and applications
L Surfaceflinger Processing of vsync signal (emphasis)
1.1.1 Projectbutter
Why is it called "Butter plan"? The goal of this project is to improve one of the most common Android flaws that users complain about-the UI response speed--google hopes that the new program will allow the Android system to get rid of the "lag" in UI interactions and be "smooth" like butter. Google announced the plan at the I/O Conference in 2012 and officially implemented the implementation mechanism in Android 4.1.
There are two important components in butter, namely, VSync and triple buffering. Here are the reasons to introduce them separately.
Readers who like to play games or watch movies may have encountered this situation:
Some game scenes seem to be "pieced together" by several scenes.
The film is incoherent, as if it were "torn apart".
This description is somewhat abstract, and we refer to a graph on the Widipedia to see the actual effect:
Figure 11?20 Screen Tearing instance
Quote from Http://en.wikipedia.org/wiki/File:Tearing_%28simulated%29.jpg