Android GUI system Surfaceflinger (7) Typical drawing process for applications

Source: Internet
Author: User
Tags file size

Typical drawing process for 1.1.1 applications

We know that Bufferqueue has up to 32 bufferslot, so what is the purpose of this design? One possible reason is to improve graphics rendering speed. Because if there are only two buffers, imagine that when the output efficiency of the application producer is greater than the processing speed of the consumer, it will soon dequeue the buffer and be in the waiting state, causing unnecessary trouble. Of course, in fact, 32 is only the largest capacity, the specific values can be set, we can combine the following Projectbutter section to understand.

We've learned the inner workings of bufferqueue in the previous section, so how does the application fit in?

The key to solving this puzzle is to understand how the application is performing the drawing process, which is also the focus of our narrative in this section. But everyone should have a heart to prepare, the application does not directly use Bufferqueue. As with many other parts of the Android system, "layers of parcels" exist here as well, so we have to try to grasp the focus and, with a certain measure, to find the answer to the problem in many complex relationships more quickly.

For the above reasons, we select the system animation of the application, to analyze the entire graphics drawing process. It is worth mentioning that the implementation of this boot animation conforms to the first of the two improved graphics systems mentioned earlier, that is, applications and Surfaceflinger use OpenGL ES to complete the UI display, but because it is a C + + program, So there is no need for upper Glsurfaceview support.

When an Android device is powered on, it will normally display up to 4 different boot screens, respectively:

L Boot-loader

This is obviously the first scene to appear. Because Boot-loader is only responsible for the loading and start-up of the system's subsequent modules, and requires a small file size, so generally we only let it show a static picture

L Kernel

After entering the kernel, the same will be shown on the physical screen. Like Boot-loader, it's just a static picture by default

• Android (2)

Android is the last stage of system startup and the most time-consuming one. Its boot screen can be static text description, static picture, can also be dynamic picture. Usually the first is a text or a static picture (if the picture does not exist under the specified path, the text is displayed.) There is a lot of information on this, we can check it out, we do not make too many accounts here, the other is animation, as shown in the following picture:

Figure 11?14 Original Ecological Android system in the boot animation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.