1.1.1 Surfacecomposerclient
Figure 11?28 Each application corresponds to a client in the Surfaceflinger
Surfaceflinger runs in the systemserver system process, applications that require a UI interface to communicate across processes through the binder service. In the study of audio system, each audiotrack can find a corresponding track implementation in Audioflinger. This design approach also applies to display systems where any program with a UI interface is available in Surfaceflinger and has only one client instance.
The class name of the client does not fully express its meaning, because in many other parts of the Android system you can find classes with the same name. The interface between applications and Surfaceflinger is the Isurfacecomposerclient,client parent class is bnsurfacecomposerclient, which is the local-side implementation of this interface.
/*frameworks/native/include/gui/isurfacecomposerclient.h*/
Class Isurfacecomposerclient:public IInterface
{ ...
Virtual Sp<isurface>createsurface (surface_data_t* data, const string8& name, Displayiddisplay,
uint32_t w,uint32_t H, pixelformat format, uint32_t flags) = 0;
Virtual status_t destroysurface (surfaceid sid) = 0;
};