Understand the processing procedures of ICS surface and surfaceflinger

Source: Internet
Author: User

First, let's take a look at the isurfacecomposer interface.

Isurfacecomposer defines the basic interface for the client to interact with the server.

The following figure shows the derived class of the isurfacecomposer interface:

------------------------------------------------------------------

Interface isurfacecomposerclient

->
Bnsurfacecomposerclient
->
Implementation class client, located in surfaceflinger. h file

------------------------------------------------------------------
Interface isurfacecomposer
->
Bnsurfacecomposer: A derived class of an isurfacecomposer interface. It provides an interface for the client to call the server function.
->
Implementation class surfaceflinger

The isurfacecomposer class contains the following member functions for establishing contact with surfaceflinger.
/* Create connection with surface flinger, requires
* Access_surface_flinger permission
*/
Virtual sp <isurfacecomposerclient> createconnection () = 0;

------------------------------------------------------------------
1. The surfacecomposerclient class contains the mclient member variable of the isurfacecomposerclient interface.

2. The surfacecontrol class contains the mclient member variable of the surfacecomposerclient type.

3. surfacecomposerclient: createsurface function. The return value type is surfacecontrol.
(1) Call the createsurface function of mclient to create a surface
Mclient-> createsurface is actually the implementation class client of the called interface isurfacecomposerclient
(2) create a surfacecontrol object and manage the surface created in (1)
(3) return the surfacecontrol object created in (2 ).

4. Create a surfacecomposerclient object
The surfacecomposerclient object is created in JNI and the corresponding file is android_view_surface.cpp. The function is surfacesession_init,
Corresponds to the init function in Java surfacesession.

{"Init", "() V", (void *) surfacesession_init },

To be continued ......

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.