summaryrefslogtreecommitdiff
path: root/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* data: Some client iconsBryce Harrington2016-05-121-0/+3
| | | | | | | | | | | This adds an alternate weston terminal icon and icons for the flower and editor clients. The original Inkscape SVG file is included. Example screenshot: http://www.bryceharrington.org/Files/weston-icons.png Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
* drm: port the drm backend to the new init apiGiulio Camuffo2016-05-101-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preparing for libweston and for the separation of the code base into libweston vs. weston the compositor, we must remove all uses weston_config structures from the backends. We have decided that all option and config input happens in the compositor (main.c), and configuration is passed in for the backends as structs. Most other backends have already converted, and this patch converts the DRM-backend to the libweston-style init API. The libweston-style init API includes a header for each backend (here compositor-drm.h) defining the configuration interface. The compositor (main.c) prepares a configuration struct to be passed through libweston core to the backend during initialization. A complication with the DRM-backend is that outputs can be hotplugged, and their configuration needs to be fetched from the compositor (main.c). For this, the config struct contains a callback member. The output configuration API is subject to change later, this is just a temporary API to get libweston forward. As weston_compositor's user_data was not previously used for anything, and the output configuration callback needs data, the user_data is set to the 'config' pointer. This pointer is only used in drm_configure_output() in main.c. [Bryce: lots of stuff and rebasing] Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Tested-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: write commit message] [Pekka: squash in "drm: Don't hang onto the backend config object post-backend_init" from Bryce Harrington] [Pekka: drop the compositor.h hunk] [Pekka: do not #include inside extern "C"] [Pekka: remove incorrect comment about weston_drm_backend_config ownership.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-wayland: put configuration structure in separate headerBenoit Gschwind2016-05-041-0/+3
| | | | | | Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: moved #include out of extern "C".] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* x11: port the x11 backend to the new init apiBenoit Gschwind2016-05-031-0/+3
| | | | | | | | | | | | | | | | | Use a "well" defined structure to configure x11-backend and move configuration file parsing inside the weston compositor code. Enforce destruction of all backend config objects after initialization. Since the backend config struct versioning implies that there we expect potential future descrepancy between main's definition of the config object and the backend's, don't allow the backend to hang onto the config object outside the initialization scope. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net> Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
* fbdev-backend: refactor configuration APIBenoit Gschwind2016-04-291-1/+4
| | | | | | | | | | | | Implement a "well" defined API to configure the fbdev backend. Following and according to discussion about libweston API The output transform configuration is moved into weston and added to the fbdev configuration structure. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: squashed two patches and rebased.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-rdp: refactor configuration APIBenoit Gschwind2016-04-251-0/+3
| | | | | | | | | | Implement a "well" defined API to configure the rdp backend. Following according to discution about libweston API. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: David FORT <rdp.effort@gmail.com> [Pekka: added missing headers to Makefile.am] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* build: actually use CLOCK_GETTIME_LIBS for libzunitcGustavo Zacarias2016-04-221-1/+2
| | | | | | | The fix/check in 34d59859 is incomplete. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* build: add check for clock_gettime() in librtGustavo Zacarias2016-04-221-7/+8
| | | | | | | | | | | | | | zuctest is another clock_gettime() user that fails to link against librt when necessary. Instead of adding another -lrt LDADD entry i've opted for the saner way and converted the check to a configure test that will set CLOCK_GETTIME_LIBS appropiately and replaced all instances of -lrt with it. Built-tested against old and new glibc. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* headless: port the headless backend to the new init apiBenoit Gschwind2016-04-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refactor configuration API of headless-backend Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> v6: - Define version number in the header - Don't use leading underscores in header guards - Add stub config_init_to_defaults() - Allocate config on stack - Drop unused display_name parameter - Add error message when config is invalid - Install compositor-headless.h and list it in headless-backend sources v5: - Update to current trunk - Fixed typo 'struct weston_wayland_backend_config' - Dropped unused variables - Dropped weston_headless_backend_config_create() in favor of directly zalloc'ing the object - Dropped weston_headless_backend_load() in favor of the more generalized load_backend_new(). - Dropped typedef from header - Restored use of 'backend_init' entry point - Backend_init() takes a base weston_backend_config object - Renamed 'param' to 'config' in a few places for consistency - Renamed 'headless_options' variable to 'options for consistency - Version the base struct - Free config on error - Don't free config during backend_init normal operations - Adjust header ordering - Make header guard naming consistent with other headers - Light reformatting for code style and consistency with other backend config patches Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> [Pekka: rebased to apply before drm and x11 backends] [Pekka: squashed in the headless part of "Enforce destruction of all backend config objects after initialization"] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Makefile: fix systemd-notify plugin CFLAGSPekka Paalanen2016-04-131-1/+2
| | | | | | | | | | | | | | | | | SYSTEMD_DAEMON_LIBS does not belong in CFLAGS, but SYSTEMD_DAEMON_CFLAGS does. Fix that. Add the missing COMPOSITOR_CFLAGS. Otherwise compiling the plugin will use the system wayland-server.h when it should be using the one pointed to by pkg-config. The latter fixes the build for me, as my system libwayland-server is older than what Weston and this plugin require, and the correct version is only found in my install $prefix. Cc: Egor Starkov <egor.starkov@ge.com> Cc: Eugen Friedrich <efriedrich@de.adit-jv.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients & tests: Unify multiple definitions of x*alloc and related functionsBryce Harrington2016-03-171-1/+3
| | | | | | | | | | | | | Direct fail_on_null calls now produce output like: [weston-info] clients/weston-info.c:714: out of memory xmalloc, et al produce output on failure like: [weston-info] out of memory (-1) Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: introduce ivi-layout-shell.hPekka Paalanen2016-03-161-0/+1
| | | | | | | | | | | This new header encapsulates the API that ivi-layout offers to ivi-shell.c to call. ivi-shell.c no longer uses ivi-layout-private.h. This limits the ivi-layout internal structures to just ivi-layout code. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
* protocol: migrate to stable presentation-time.xmlPekka Paalanen2016-03-071-11/+10
| | | | | | | | | | | | | | | | | | | | Remove the unstable presentation_timing.xml file, and use presentation-time.xml from wayland-protocols instead to generate all the Presentation extension bindings. The following renames are done according to the XML changes: - generated header includes - enum constants and macros prefixed with WP_ - interface symbol names prefixed with wp_ - protocol API calls prefixed with wp_ Clients use wp_presentation_interface.name rather than hardcoding the global interface name: presentation-shm, weston-info, presentation-test. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> [Pekka: updated wayland-protocols dependency to 1.2]
* Makefile: handle also stable wayland-protocolsPekka Paalanen2016-02-231-1/+1
| | | | | | | | | | | | | | Fix the protostability function to handle stable protocol files correctly. Stable protocol XML file names do not have 'stable' in their name, nor do we want to write that in the prerequisite lists in the Makefile. Function 'protoname' does not need fixing, because for stable protocol prerequisites, the sed pattern will not match, and it passes stem through as is, which is correct. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Makefile: move presentation_timing source out of toytoolkitPekka Paalanen2016-02-231-2/+2
| | | | | | | | | | | | Toytoolkit sources don't actually use the presentation_timing client protocol bindings for anything. Apparently they were there only because that's how they end up in BUILT_SOURCES. Move them from toytoolkit sources to BUILT_SOURCES where also other such things are. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* clients: add simple-v4l-dmabuf clientEmmanuel Gil Peyrot2016-01-111-0/+15
| | | | | | | | | | | | | | | | | | | This client opens a V4L2 device, usually exposed as /dev/videoN, and retrieves its frames as dmabuf for later import into the compositor. It supports both single- and multi-planar devices, and any format exposed by the V4L2 device the Wayland compositor accepts. This client never changes the v4l2 settings, use `v4l2-ctl -c` if you want to change those. Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Acked-by: Derek Foreman <derekf@osg.samsung.com> Tested-by: Derek Foreman <derekf@osg.samsung.com> Maniphest Tasks: T90 Differential Revision: https://phabricator.freedesktop.org/D339
* clients: rename simple-dmabuf into simple-dmabuf-intelEmmanuel Gil Peyrot2016-01-111-6/+6
| | | | | | | | | | | | This client was using an Intel-specific way to allocate a dmabuf, so it makes sense to have that in its name. Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Differential Revision: https://phabricator.freedesktop.org/D342
* Remove workspaces protocolJonas Ådahl2015-11-191-7/+0
| | | | | | | | | | | | It doesn't fill a useful function and is not intended to be continued. If there is need for workspace manipulation from clients a protocol based on those future needs need to be properly designed. workspaces.xml is probably not very relevant since it did the bare minimum. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Rename screenshooter protocol to weston_screenshooterJonas Ådahl2015-11-191-7/+7
| | | | | | | | | Due to the effort of moving a way from non-prefixed protocols, rename the weston specific screenshooter protocol to weston_screenshooter. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* desktop-shell: Rename protocol weston_desktop_shellJonas Ådahl2015-11-191-10/+10
| | | | | | | | | | | | | In the effort of going away from generic names of protocols only relevant for weston, rename the weston desktop shell weston_desktop_shell. This also resets the version to 1, as there will be no prior versions to weston_desktop_shell. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Use xdg_shell protocol from wayland-protocolsJonas Ådahl2015-11-191-15/+14
| | | | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
* Makefile.am: Make the external xml scanning rule version genericJonas Ådahl2015-11-191-3/+11
| | | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Use input method protocol from wayland-protocolsJonas Ådahl2015-11-191-9/+8
| | | | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Jan Arne Petersen <janarne@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Use text input protocol from wayland-protocolsJonas Ådahl2015-11-191-11/+10
| | | | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Jan Arne Petersen <janarne@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Use linux-dmabuf protocol from wayland-protocolsJonas Ådahl2015-11-191-7/+6
| | | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Use fullscreen-shell.xml from wayland-protocolsJonas Ådahl2015-11-191-17/+27
| | | | | | | | | | Use the fullscreen-shell protocol XML from the wayland-protocols installation, and remove the one we provide ourself. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* build: Add -lrt for programs that use clock_gettime()Derek Foreman2015-10-211-2/+2
| | | | | | | | glibc requires this prior to 2.17, and we already do it in a few other places. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* ivi-shell: install ivi-layout-export.hUcan, Emre \(ADITG/SW1\)2015-10-151-0/+5
| | | | | | | | | | | | IVI-Shell is designed to be used with other controller modules than hmi-controller.These controller modules require the ivi-layout-export header file to properly integrate with the ivi-shell. The header file should be installed when ivi-shell is enabled, because these controller modules are not a part of the weston repository. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* compositor: remove systemd-notify.hEgor Starkov2015-09-291-3/+1
| | | | | | | | | Systemd notifications support was converted into loadable module, so systemd-notify.h header is not needed. Signed-off-by: Egor Starkov <egor.starkov@ge.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* systemd: Fix distcheck for typo in header pathBryce Harrington2015-09-251-1/+1
|
* compositor: systemd notifications supportEgor Starkov2015-09-251-1/+18
| | | | | | | | | | | | | | | | | Add systemd status and watchdog notification support. Feature is not compiled by default and can be enabled by "--enable-systemd-notify" configuration flag. It compiles into module "systemd-notify.so" and can be loaded by adding it in weston.ini like any other module, i.e. "modules=systemd-notify.so". Watchdog timeout equals to half of timeout defined by "WATCHDOG_USEC" environment variable, which is set by "WatchdogSec=" setting in service file. Signed-off-by: Egor Starkov <egor.starkov@ge.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* tests: Migrate screenshot code from internal test to client helpersBryce Harrington2015-09-251-4/+4
| | | | | | | | | | | | | | | These routines provide test cases an ability to capture screen images for rendering verification. This commit is a no-change refactoring, except for making the routines non-static. Makefile rules are also updated; most notably, this links test clients against the cairo libraries now. v2: Fix pointer code styling, suggested in review Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* launcher: fix broken distcheckDerek Foreman2015-09-241-0/+1
| | | | | | | We were missing launcher-impl.h in Makefile.am Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* launcher: Split out launcher implementations into three distinct onesJasper St. Pierre2015-09-231-3/+4
| | | | | | | | | | | | | We now have a launcher interface and distinct implementations for logind, weston-launch, and direct DRM, each in their own files. This helps up clean up the spaghetti code into something that's hopefully a bit more understood. There should be no functional changes here. Reviewed-by: Derek Foreman <derekf@osg.samsung.com> update: Dropped redundant free() in weston_launcher_destroy()
* launcher: Rename logind-util to launcher-logindJasper St. Pierre2015-09-231-2/+2
| | | | | | We're refactoring this to have multiple launcher "implementations". Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* clients: add simple-dmabuf clientGeorge Kiagiadakis2015-08-141-0/+15
| | | | | | | | | | | | | | | | v2: - adapted to protocol changes - added TODO comments - minor clean-up - change y-invert from per-plane boolean to per-buffer flag v3: - fix a typo: 1 -> i (noticed by Carlos Olmedo Escobar) Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Daniel Stone <daniels@collabora.com>
* gl-renderer: add dmabuf importPekka Paalanen2015-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import dmabuf as an EGLImage, and hold on to the EGLImage until we are signalled a content change. On content change, destroy the EGLImage and re-import to trigger GPU cache flushes. We hold on to the EGLImage as long as possible just in case the client does other imports that might later make re-importing fail. As dmabuf protocol uses drm_fourcc codes, we need libdrm for drm_fourcc.h. However, we are not doing any libdrm function calls, so there is no new need to link to libdrm. RFCv1 changes: - fix error if dmabuf exposed unsupported - always use GL_TEXTURE_EXTERNAL_OES with dmabuf v2 changes: - improve support check and error handling - hold on to the imported EGLImage to avoid the dmabuf becoming unimportable in the future - send internal errors with linux_dmabuf_buffer_send_server_error() - import EGL_EXT_image_dma_buf_import extension headers - use heuristics to decide between GL_TEXTURE_2D and GL_TEXTURE_EXTERNAL_OES - add comment about Mesa requirements - change y-invert from per-plane boolean to per-buffer flag Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* dmabuf: implement linux_dmabuf extensionPekka Paalanen2015-08-141-0/+2
| | | | | | | | | | | | | | | | | | | v2 changes: - implement the revised protocol - add basic sanity checks when creating buffer and check for support - add way to attach user data to the dmabuf for renderer use - bump max number of planes to 4 to follow DRM AddFb2 ioctl - improve errors handling - use separate linux_dmabuf_buffer fields for the different wl_resource types - as SERVER_ERROR code is no more, use a wl_display "generic" error for emergency-disconneting a client we fail to process - more documentation - change y-invert from per-plane boolean to per-buffer flag Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* protocol: add linux_dmabuf extension (v3)Pekka Paalanen2015-08-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An experimental (hence the 'z' prefix) linux_dmabuf Wayland protocol extension for creating dmabuf-based wl_buffers in a generic manner. This does not include proper dmabuf metadata negotiation because there is no way to communicate all dmabuf constraints from the compositor to a client before-hand. The client has to create a wl_buffer wrapping one or more dmabuf buffers and then listen at the feedback object returned to know if the operation was successful. RFCv1 changes (after a first draft without code): - some renames of interfaces and argument, no semantic changes - added destructor protocol to dmabuf_batch - added feedback interface for buffer creation v2 changes: - use drm_fourcc.h as authoritative source for format codes - add support for the 64-bit layout qualifier and y-inverted dmabufs - simplify the 'add' request (no need to preserve fd numerical id) - add explicit plane index in the 'add' request - integrate the 'feedback' object events to the batch interface - rename 'create_buffer' to 'create' and move it into the batch interface - add requirements needed from the graphics stack and clients - improve existing errors and add batch error codes - removed error codes from the global interface - improve documentation for arguments, enums, etc. - rename dmabuf_batch to zlinux_buffer_params - The y-inverted property makes more sense as a whole buffer property. Y-flipping individual planes of the same buffer object is hardly useful. The y-invert is also converted into a flag, so we may add more flags later. - add flags for interlaced buffer content v3 changes: - Apply Daniel Vetter's comments about wording on coherency. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* build: mkdir target weston.ini directories before writingRoss Burton2015-07-231-2/+2
| | | | | | | | | In parallel out-of-tree builds it is possible for e.g. ivi-shell/weston.ini to be written before ivi-shell/ exists. Solve this by creating the target directory first. Signed-off-by: Ross Burton <ross.burton@intel.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* Adding doxygen setup and info for the testing framework.Jon A. Cruz2015-07-171-0/+22
| | | | | Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Converted the config parser test to the new framework.Jon A. Cruz2015-07-171-1/+8
| | | | | Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Enables output in the JUnit XML format.Jon A. Cruz2015-07-171-0/+9
| | | | | | | | | | | | | Adds basic support for optionally outputting in the XML format commonly used by JUnit compatible tools. This format is supported by default by many tools, including the Jenkins build system. It also is more detailed and captures more information than the more simplistic TAP format. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* build: don't duplicate rule for weston.desktopRoss Burton2015-07-161-2/+1
| | | | | | | | | | dist_wayland_session_DATA will distribute and install src/weston.desktop, so the definition of wayland_session_DATA which also installs src/weston.desktop will result in the file being installed twice and (rarely) cause install to fail. Spotted and fix by Roy Li <rongqing.li@windriver.com>. Signed-off-by: Ross Burton <ross.burton@intel.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* compositor-drm: Allow instant start of repaint loop. (v4)Mario Kleiner2015-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm_output_start_repaint_loop() incurred a delay of one refresh cycle by using a no-op page-flip to get an accurate vblank timestamp as reference. This causes unwanted lag whenever Weston exited its repaint loop, e.g., whenever an application wants to repaint with less than full video refresh rate but still minimum lag. Try to use the drmWaitVblank ioctl to get a proper timestamp instantaneously without lag. If that does not work, fall back to the old method of idle page-flip. This optimization will work on any drm/kms driver which supports high precision vblank timestamping. As of Linux 4.0 these would be intel, radeon and nouveau on all their supported gpu's. On kms drivers without instant high precision timestamping support, the kernel is supposed to return a timestamp of zero when calling drmWaitVblank() to query the current vblank count and time iff vblank irqs are currently disabled, because the only way to get a valid timestamp on such kms drivers is to enable vblank interrupts and then wait a bit for the next vblank irq to take a new valid timestamp. The caller is supposed to poll until at next vblank irq it gets a valid non-zero timestamp if it needs a timestamp. This zero-timestamp signalling works up to Linux 3.17, but got broken due to a regression in Linux 3.18 and later. On Linux 3.18+ with kms drivers that don't have high precision timestamping, the kernel erroneously returns a stale timestamp from an earlier vblank, ie. the vblank count and timestamp are mismatched. A patch is under way to fix this, but to deal with broken kernels, we also check non-zero timestamps if they are more than one refresh duration in the past, as this indicates a stale/invalid timestamp, so we need to take the page-flip fallback for restarting the repaint loop. v2: Implement review suggestions by Pekka Paalanen, especially extend the commit message to describe when and why the instant restart won't work due to missing Linux kernel functionality or a Linux kernel regression. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> v3: Fix timespec_to_nsec() which was computing picoseconds, use the new timespec-util.h helpers. v4: Rebased to master, split long lines. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* shared: introduce timespec-util.hPekka Paalanen2015-07-161-0/+1
| | | | | | Copyright is set according to the moved code from compositor.c. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: move the main() to a new main.c fileGiulio Camuffo2015-07-101-0/+1
| | | | | | | | | | | | This commits starts to separate the libweston code from the weston specific code. As such, the main() is moved, together with signals handling and configuration handling. The definition of DEFAULT_REPAINT_WINDOW is left in compositor.c, so the config loading of repaint_msec is slightly modified to account that. Acked-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Added simple unit/integration test framework and corresponding test program.Jon A. Cruz2015-07-071-3/+51
| | | | | | | | | | | | Added a simple C-based test framework and an example program that uses it to run through some simple unit tests. This is new code inspired primarily by the approaches of Google Test, Boost Test, JUnit and TestNG. Factors of others were also considered during design and implementation. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* build: Use AM_CFLAGS instead of GCC_CFLAGSDerek Foreman2015-06-231-32/+32
| | | | | | | | | | | AM_CFLAGS is the default for any target that doesn't specify its own cflags. We should use AM_CFLAGS in preference to GCC_CFLAGS so we can change AM_CFLAGS and get all targets. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com> [pekka: fixed patch conflicts] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Remove weston-screensaverPekka Paalanen2015-06-221-20/+0
| | | | | | | | | | | | | | | | | | | This removes the weston-screensaver client. Screensavers are not so useful, DPMS is much better. This example has existed here for a good while, and things that we could learn from it have been learnt. Nowadays this is just dead weigth, which is usually not even compiled, because it depends on both cairo-gl and GLU. Removing it removes the only possible dependency to GLU and one user of cairo-gl. Now the last user of cairo-gl is gears (clients/nested.c uses cairo-glesv2). Support for screensavers is still left in desktop-shell, so external projects can still have their screensavers if they want. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>