Android Interface Display Process analysis

Source: Internet
Author: User

The Android system provides a series of drawing rendering APIs that support 2D drawings and 3D drawings, so it's important to understand how these APIs work. The most common use for app developers is that canvas and Opengl,canvas focus on 2D, while OpenGL is all-rounder. The canvas's drawing operations are eventually converted through Openglrender, converted to OpenGL-supported actions, and rendered by the GPU, meaning that the canvas is also working through the OpenGL library.

Regardless of which API you use, these actions will eventually render to your surface. Surface represents the producer, responsible for the production of Bufferqueue, and it is opposite to the Surfaceflinger as a consumer.

The following diagram describes the workflow of the main parts.

Image Stream Producers images producer: Any component that generates graphics buffer, including but not limited to CANVAS,OPENGL, multimedia services, video decoders. Image stream Consumers images consumer: This image stream consumer generally refers to surfaceflinger system services, Surfaceflinger is responsible for organizing visual surface, and modifying display, Only Surfaceflinger can modify display. OpenGL ES apps such as camera programs, Carmera can also consume image streams. Window Manager is responsible for Window,window manager in the management system, implemented by surface support, and window manager launches metadata to Surfaceflinger. Hardware Composer is used to showcase the hardware abstraction layer of the subsystem, Surfaceflinger can help OpenGL and the GPU do the work of having a clear, combined data, so that the work of GPU and OpenGL can be reduced, which will save resources and power. Surfaceflinger work or use OpenGL ES, which is equivalent to the OpenGL ES client. Gralloc graphics memory allocator to draw the ram generator

Android Interface Display Process analysis

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.