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
10 ====================================
11 In the automotive domain, the most HMI systems are using their own window manager implementation.
12 Many applications (e.g. navigation, reversing camera) are implemented standalone and
13 therefore one service is used to composite all applications to the final image on the screen. This Service
14 is also know as LayerManagement.
15 This Component provides a common API and a proof-of-concept implementation for the Layer Management Service.
16 This service should improve the existing vendor-specific layer management implementations
17 which have the following features :
19 * Fixed number of hardware layers
20 * Hardware accelerated compositing
22 * Number of layers not extensible during runtime
23 * Vendor-specific implementation
24 * No standardized interface
26 * No change during runtime possible
28 The IVI Layer Management have the following enhancements :
30 * Well-defined interface
31 * Standardized compositing
32 * Convenient and consistent access to hardware accelerated modules
33 * Separation of HMI and Layer Management
34 * Dynamically Extensions during runtime
35 * Low integration complexity
36 * Reduced dependency on hardware
39 ====================================
40 The IVI Layer Management consist of three subcomponents.
42 The LayerManagementService
44 This is the main component which controls and handles
45 the different layers with its content. Furthermore he
46 will execute the commands which are deployed by the corresponding
47 communicator. The content of the different layers are deployed to the
50 The LayerManagementCommunicator
52 This subcomponent will handle the LayerManagement API messages. Generally
53 a communicator will establish the communication between application and the
54 LayerManagementService. The concept behind the communicator is to abstract
55 the required ipc mechanism on the target platform.
57 The LayerManagementRenderer
59 This subcomponent will handle the rendering of the different layers and its content on the
60 final used target platform. The concept behind the renderer is to abstract
61 the required rendering mechanism on the target platform.
63 Required Platform capabilities
64 ====================================
66 Platform with X11 and OpenGL ES 2.0
69 If you have choosen the X11GLESRenderer as rendering backend, then the following
70 Extensions have to be supported by the TargetPlatform :
74 x-composite : This extension should support redirecting of egl Surfaces to x11 pixmaps too.
80 The following functions should be supported by the vendor specific graphic driver
81 glEGLImageTargetTexture2DOES
84 Furthermore it should be supported to create an egl image from an x11 pixmap.
86 Platform with X11 and OpenGL
89 If you have choosen the GLXRenderer as rendering backend, then the following
90 Extensions have to be supported by the TargetPlatform :
94 x-composite : This extension should support redirecting of egl Surfaces to x11 pixmaps too.
95 x-damage : This extension is required to render surfaces only, if there content has changed.
99 GLX_TEXTURE_FROM_PIXMAP :
100 The following functions should be supported by the vendor specific graphic driver
101 Furthermore it should be supported to create an texture from an x11 pixmap.
104 How to build on different platforms
105 ====================================
107 These conditions need to be met in order to build the LayerManager component:
109 - CMake required (version 2.6 or higher)
111 Building the LayerManager breaks down to the following steps:
113 1. Pull the current codebase from the git repository to your target source directory [referred to as <source-dir>]
115 Example: git clone https://git.genivi.org/srv/git/layer_management
117 This should give you a directory called "layer_management" in your current directory.
119 2. Create a build directory, e.g. IVILayerManagement_build [referred to as <build-dir>]
121 Example: mkdir IVILayerManagement_build
123 3. In <build-dir> Generate build system for your platform using CMake.
124 This step provides some customization options to configure build options.
126 Example: cd <build-dir>
127 cmake <source-dir> [optional_build_options]
129 For a full list of available build options in [optional_build_options] see "Supported Build Options"
135 5. Install LayerManager on local system.
136 Note: This step will require root priviledges on most systems.
138 Example: sudo make install
140 The LayerManager may now be started by calling "LayerManagerService".
145 You need both development packages and libraries for
154 X11 Composite libraries
156 Vendor specific EGL 1.4 Libraries, which are support the EGL_IMAGE_KHR Extension including
157 build an EGL Image from X11Pixmap
158 Vendor specific OpenGL ES 2.0 Libraries, with JIT compiler to support shader which are
159 delivered as source code
164 X11 Composite libraries
169 Supported Build Options
172 Build Flag Default Value Description
174 WITH_CLIENTEXAMPLES ON Build examples for client library usage
175 WITH_CLIENT_LIB ON Build LayerManagement client library
176 WITH_DESKTOP OFF Build renderer plugin for OpenGL/X11 based platforms
177 WITH_CONTROL_BIN ON Build LayerManagerControl binary
178 WITH_CONTROL_LIB OFF Build LayerManagement control library
179 WITH_DLT OFF Build with DLT logging support
180 WITH_DOCUMENTATION OFF Generate documentation during build (requires doxygen)
181 WITH_EGL_EXAMPLE ON Build examples for GLES/X11 based platforms
182 WITH_EXAMPLE_SCENE_PROVIDER OFF Build scene provider plugin to run example applications
183 WITH_FORCE_COPY OFF Force Software Copy of Pixmaps (compatibility for VMs)
184 WITH_GENERIC_COMMUNICATOR ON Build Generic Communicator Plugin based on IpcModules
185 WITH_GLESv2_LIB OFF Build development library for GLES/X11 based renderers
186 WITH_GLX_EXAMPLE OFF Build examples for OpenGL/X11 based platforms
187 WITH_GLX_LIB OFF Build development library for OpenGL/X11 based renderers
188 WITH_SERVICE_BIN ON Build LayerManagerService binary
189 WITH_STATIC_LIBRARIES OFF Link all plugins and libraries statically
190 WITH_STYLE_CHECKING OFF Report styleguide problems during build (requires python)
191 WITH_SYSTEMD_HEALTH_MONITOR OFF Build plugin for systemd based health monitoring
192 WITH_TESTS OFF Build unit test binaries for all enabled components
193 WITH_TEXT_RENDERER OFF Build renderer plugin with pure logging (no rendering)
194 WITH_WAYLAND_X11 OFF Build renderer plugin for GLES/Wayland with X11 backend
195 WITH_WAYLAND_X11_LIB OFF Build development library for GLES/Wayland X11 based renderers
196 WITH_WAYLAND_DRM OFF Build renderer plugin for GLES/Wayland with DRM backend
197 WITH_WAYLAND_DRM_LIB OFF Build development library for GLES/Wayland DRM based renderers
198 WITH_WAYLAND_FBDEV OFF Build renderer plugin for GLES/Wayland with FBDEV backend
199 WITH_WAYLAND_FBDEV_LIB OFF Build development library for GLES/Wayland FBDEV based renderers
200 WITH_WL_EXAMPLE OFF Build examples for GLES/Wayland based platforms
201 WITH_X11_GLES ON Build renderer plugin for GLES/X11 based platforms
203 You can set either of them during cmake execution, e.g.
205 cmake -DWITH_FORCE_COPY=ON -DWITH_EGL_EXAMPLE=OFF <source_dir>
207 or you can update your CmakeCache variables afterwards using tools like ccmake.
209 Build for different Platforms
212 You have the choice to use GLXRenderer or X11GLESRenderer.
214 GLXRenderer (X11Renderer.so) which is normaly used for a Desktop, VMWare Image and GMA500 based Headunits
216 cmake <source-dir>/ -DWITH_DESKTOP=ON -DWITH_GLX_EXAMPLE=ON -DWITH_TESTS=OFF -DWITH_EGL_EXAMPLE=OFF -DWITH_X11_GLES=OFF
218 X11GLESRenderer which is used on more embedded device which are supporting EGL and OpenGL ES 2.0
220 cmake <source-dir>/ -DWITH_DESKTOP=OFF -DWITH_GLX_EXAMPLE=OFF -DWITH_TESTS=OFF -DWITH_EGL_EXAMPLE=ON -DWITH_X11_GLES=ON
222 Change the Environment during Runtime
223 =====================================
224 The following environments can be set to change the runtime behaviour.
226 LM_PLUGIN_PATH set the path for the location of communicator and renderer PlugIns
227 default : /usr/lib/layermanager
228 Example : export LM_PLUGIN_PATH= /usr/local/lib/layermanager
230 LM_USE_SESSION_BUS enables the DBUS communication to run on Session bus instead of Systembus
231 default : disabled run on system bus
232 Example : export LM_USE_SESSION_BUS=enable
234 Commandline parameter :
235 LayerManagerService : -w<horizontalresolution> - default 1280
236 -h<verticalresolution> - default 480
237 -c<console debug level> - default 2 (only errors and info)
238 -f<file debug level> - default 0 (disabled) log file location is /tmp/LayerManagerService.log
239 possible debug levels : 0 disabled
242 3 info,errors, warnings
243 4 info,errors, warnings,debug
244 -v shows version of layermanager
246 Running Testapplications
247 =====================================
249 1. Starting the service
253 install prefix is /usr/local
254 no compositing manager is running like openbox xfce metacity, kill these if needed
258 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
259 #> export LM_PLUGIN_PATH=/usr/local/lib/layermanager
260 #> LayerManagerService &
262 2. Running OpenGL / OpenGL ES 2.0 Example Applications
266 install prefix is /usr/local
267 LayerManagerService Running
271 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
273 #> EGLX11ApplicationExample &
275 #> GLX11ApplicationExample &
277 3. Running LayerManagerControl
279 The LayerManagerControl can be used to change and debug
280 the runtime behaviour of the service.
283 LayerManagerControl without arguments to see a list of supported commands
286 LayerManagerControl get scene
287 LayerManagerControl get layers
288 LayerManagerControl get layer 1000
289 LayerManagerControl get surfaces
290 LayerManagerControl get surface 0xa
291 LayerManagerControl analyze surface 10
292 LayerManagerControl scatter
293 LayerManagerControl watch surface 0xa
297 install prefix is /usr/local
298 LayerManagerService Running
302 #> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
303 #> LayerManagerControl [command]