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 with XTHREAD support, switches continous rendering to event based rendering
203 Option: -DWITH_XTHREADS=ON or
206 - Build with INPUT EVENT support, switches input forwarding of events on
207 Option: -DWITH_INPUT_EVENTS=ON or
208 -DWITH_INPUT_EVENTS=OFF
210 - Build available tests
211 Option: -DWITH_TESTS=ON or
214 Remark: Test File are currently not upstreamed.
216 - Build for different Platforms
218 You have the choice to use GLXRenderer or X11GLESRenderer.
220 GLXRenderer (X11Renderer.so) which is normaly used for a Desktop, VMWare Image and GMA500 based Headunits
222 cmake <source-dir>/ -DWITH_DESKTOP=ON -DWITH_GLX_EXAMPLE=ON -DWITH_XTHREADS=ON -DWITH_TESTS=OFF -DWITH_EGL_EXAMPLE=OFF -DWITH_X11_GLES=OFF
224 X11GLESRenderer which is used on more embedded device which are supporting EGL and OpenGL ES 2.0
226 cmake <source-dir>/ -DWITH_DESKTOP=OFF -DWITH_GLX_EXAMPLE=OFF -DWITH_TESTS=OFF -DWITH_EGL_EXAMPLE=ON -DWITH_X11_GLES=ON -DWITH_XTHREADS=ON
228 Change the Environment during Runtime
229 =====================================
230 The following environments can be set to change the runtime behaviour.
232 LM_PLUGIN_PATH set the path for the location of communicator and renderer PlugIns
233 default : /usr/lib/layermanager
234 Example : export LM_PLUGIN_PATH= /usr/local/lib/layermanager
236 LM_USE_SESSION_BUS enables the DBUS communication to run on Session bus instead of Systembus
237 default : disabled run on system bus
238 Example : export LM_USE_SESSION_BUS=enable
240 Commandline parameter :
241 LayerManagerService : -w<horizontalresolution> - default 1280
242 -h<verticalresolution> - default 480
243 -c<console debug level> - default 2 (only errors and info)
244 -f<file debug level> - default 0 (disabled) log file location is /tmp/LayerManagerService.log
245 possible debug levels : 0 disabled
248 3 info,errors, warnings
249 4 info,errors, warnings,debug
250 -v shows version of layermanager
252 Running Testapplications
253 =====================================
255 1. Starting the service
259 install prefix is /usr/local
260 no compositing manager is running like openbox xfce metacity, kill these if needed
264 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
265 #> export LM_PLUGIN_PATH=/usr/local/lib/layermanager
266 #> LayerManagerService &
268 2. Running OpenGL / OpenGL ES 2.0 Example Applications
272 install prefix is /usr/local
273 LayerManagerService Running
277 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
279 #> EGLX11ApplicationExample &
281 #> GLX11ApplicationExample &
283 3. Running LayerManagerToolBox
285 The LayerManagerToolbox can be used to change and debug
286 the runtime behaviour of the service.
289 LayerManagerToolBox -? to see the expected parameter
291 Example LayerManagerToolBox --change-surface sid:[0xa],src:[0,0,320,240],dest:[0,0,800,480],o:[1.0],v:[1]
295 install prefix is /usr/local
296 LayerManagerService Running
300 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
301 #> LayerManagerToolbox [options]