1 Sections in this file describe:
4 - Required platform capabilities
5 - How to build on different platforms
6 - Change the environment during Runtime
7 - Running Testapplications
11 ====================================
12 In the automotive domain, the most HMI systems are using their own window manager implementation.
13 Many applications (e.g. navigation, reversing camera) are implemented standalone and
14 therefore one service is used to composite all applications to the final image on the screen. This Service
15 is also know as LayerManagement.
16 This Component provides a common API and a proof-of-concept implementation for the Layer Management Service.
17 This service should improve the existing vendor-specific layer management implementations
18 which have the following features :
20 * Fixed number of hardware layers
21 * Hardware accelerated compositing
23 * Number of layers not extensible during runtime
24 * Vendor-specific implementation
25 * No standardized interface
27 * No change during runtime possible
29 The IVI Layer Management have the following enhancements :
31 * Well-defined interface
32 * Standardized compositing
33 * Convenient and consistent access to hardware accelerated modules
34 * Separation of HMI and Layer Management
35 * Dynamically Extensions during runtime
36 * Low integration complexity
37 * Reduced dependency on hardware
40 ====================================
41 The IVI Layer Management consist of three subcomponents.
43 The LayerManagementService
45 This is the main component which controls and handles
46 the different layers with its content. Furthermore he
47 will execute the commands which are deployed by the corresponding
48 communicator. The content of the different layers are deployed to the
51 The LayerManagementCommunicator
53 This subcomponent will handle the LayerManagement API messages. Generally
54 a communicator will establish the communication between application and the
55 LayerManagementService. The concept behind the communicator is to abstract
56 the required ipc mechanism on the target platform.
58 The LayerManagementRenderer
60 This subcomponent will handle the rendering of the different layers and its content on the
61 final used target platform. The concept behind the renderer is to abstract
62 the required rendering mechanism on the target platform.
64 Required Platform capabilities
65 ====================================
67 Platform with X11 and OpenGL ES 2.0
70 If you have choosen the X11GLESRenderer as rendering backend, then the following
71 Extensions have to be supported by the TargetPlatform :
75 x-composite : This extension should support redirecting of egl Surfaces to x11 pixmaps too.
81 The following functions should be supported by the vendor specific graphic driver
82 glEGLImageTargetTexture2DOES
85 Furthermore it should be supported to create an egl image from an x11 pixmap.
87 Platform with X11 and OpenGL
90 If you have choosen the GLXRenderer as rendering backend, then the following
91 Extensions have to be supported by the TargetPlatform :
95 x-composite : This extension should support redirecting of egl Surfaces to x11 pixmaps too.
96 x-damage : This extension is required to render surfaces only, if there content has changed.
100 GLX_TEXTURE_FROM_PIXMAP :
101 The following functions should be supported by the vendor specific graphic driver
102 Furthermore it should be supported to create an texture from an x11 pixmap.
105 How to build on different platforms
106 ====================================
108 These conditions need to be met in order to build the LayerManager component:
110 - CMake required (version 2.6 or higher)
112 Building the LayerManager breaks down to the following steps:
114 1. Pull the current codebase from the git repository to your target source directory [referred to as <source-dir>]
116 Example: git clone https://git.genivi.org/srv/git/layer_management
118 This should give you a directory called "layer_management" in your current directory.
120 2. Create a build directory, e.g. IVILayerManagement_build [referred to as <build-dir>]
122 Example: mkdir IVILayerManagement_build
124 3. In <build-dir> Generate build system for your platform using CMake.
125 This step provides some customization options to configure build options.
127 Example: cd <build-dir>
128 cmake <source-dir> [optional_build_options]
130 For a full list of available build options in [optional_build_options] see "Supported Build Options"
136 5. Install LayerManager on local system.
137 Note: This step will require root priviledges on most systems.
139 Example: sudo make install
141 The LayerManager may now be started by calling "LayerManagerService".
146 You need both development packages and libraries for
155 X11 Composite libraries
157 Vendor specific EGL 1.4 Libraries, which are support the EGL_IMAGE_KHR Extension including
158 build an EGL Image from X11Pixmap
159 Vendor specific OpenGL ES 2.0 Libraries, with JIT compiler to support shader which are
160 delivered as source code
165 X11 Composite libraries
170 Supported Build Options
173 - Build configuration:
174 Option: -DCMAKE_BUILD_TYPE=Debug or
175 -DCMAKE_BUILD_TYPE=Release
177 - Build for X11 Desktop with OpenGL / GLX Renderer
178 Option: -DWITH_DESKTOP=ON or
181 - Build for X11 with OpenGL ES 2.0 Renderer
182 Option: -DWITH_X11_GLES=ON or
186 Option: -DWITH_EGL_EXAMPLE=ON or
187 -DWITH_EGL_EXAMPLE=OFF
189 - Build OpenGL / GLX examples
190 Option: -DWITH_GLX_EXAMPLE=ON or
191 -DWITH_GLX_EXAMPLE=OFF
193 - Build Client examples
194 Option: -DWITH_CLIENT_EXAMPLES=ON or
195 -DWITH_CLIENT_EXAMPLES=OFF
197 - Build with copy of textures for target platform which does not support the
198 GLX_TEXTURE_FROM_PIXMAP or EGL_IMAGE_KHR on X11 pixmaps Extensions
199 Option: -DWITH_FORCE_COPY=ON or
200 -DWITH_FORCE_COPY=OFF
202 - Build available tests
203 Option: -DWITH_TESTS=ON or
206 Remark: Test File are currently not upstreamed.
208 - Build for different Platforms
210 You have the choice to use GLXRenderer or X11GLESRenderer.
212 GLXRenderer (X11Renderer.so) which is normaly used for a Desktop, VMWare Image and GMA500 based Headunits
214 cmake <source-dir>/ -DWITH_DESKTOP=ON -DWITH_GLX_EXAMPLE=ON -DWITH_TESTS=OFF -DWITH_EGL_EXAMPLE=OFF -DWITH_X11_GLES=OFF
216 X11GLESRenderer which is used on more embedded device which are supporting EGL and OpenGL ES 2.0
218 cmake <source-dir>/ -DWITH_DESKTOP=OFF -DWITH_GLX_EXAMPLE=OFF -DWITH_TESTS=OFF -DWITH_EGL_EXAMPLE=ON -DWITH_X11_GLES=ON
220 Change the Environment during Runtime
221 =====================================
222 The following environments can be set to change the runtime behaviour.
224 LM_PLUGIN_PATH set the path for the location of communicator and renderer PlugIns
225 default : /usr/lib/layermanager
226 Example : export LM_PLUGIN_PATH= /usr/local/lib/layermanager
228 LM_USE_SESSION_BUS enables the DBUS communication to run on Session bus instead of Systembus
229 default : disabled run on system bus
230 Example : export LM_USE_SESSION_BUS=enable
232 Commandline parameter :
233 LayerManagerService : -w<horizontalresolution> - default 1280
234 -h<verticalresolution> - default 480
235 -c<console debug level> - default 2 (only errors and info)
236 -f<file debug level> - default 0 (disabled) log file location is /tmp/LayerManagerService.log
237 possible debug levels : 0 disabled
240 3 info,errors, warnings
241 4 info,errors, warnings,debug
242 -v shows version of layermanager
244 Running Testapplications
245 =====================================
247 1. Starting the service
251 install prefix is /usr/local
252 no compositing manager is running like openbox xfce metacity, kill these if needed
256 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
257 #> export LM_PLUGIN_PATH=/usr/local/lib/layermanager
258 #> LayerManagerService &
260 2. Running OpenGL / OpenGL ES 2.0 Example Applications
264 install prefix is /usr/local
265 LayerManagerService Running
269 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
271 #> EGLX11ApplicationExample &
273 #> GLX11ApplicationExample &
275 3. Running LayerManagerToolBox
277 The LayerManagerToolbox can be used to change and debug
278 the runtime behaviour of the service.
281 LayerManagerToolBox -? to see the expected parameter
283 Example LayerManagerToolBox --change-surface sid:[0xa],src:[0,0,320,240],dest:[0,0,800,480],o:[1.0],v:[1]
287 install prefix is /usr/local
288 LayerManagerService Running
292 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
293 #> LayerManagerToolbox [options]