Michael Teyfel [Tue, 17 Oct 2017 09:10:18 +0000 (11:10 +0200)]
ivi-shell: remove surface_destroy_listener
Since the surface_destroy_listener is only registered for ivi-shell
applications, it should only be removed for ivi-shell applications.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Tue, 5 Feb 2019 14:25:56 +0000 (15:25 +0100)]
ivi-shell: added libweston-desktop-api implementation
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Wed, 6 Feb 2019 15:10:09 +0000 (16:10 +0100)]
ivi-layout: use libweston-desktop api for configure event
The libweston-desktop api is used to send configure
event to application.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Mon, 6 Nov 2017 11:55:07 +0000 (12:55 +0100)]
ivi-layout: use libweston-desktop api for views
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Fri, 1 Feb 2019 14:17:35 +0000 (15:17 +0100)]
ivi-shell: linked libweston-desktop and added structs
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Tue, 5 Feb 2019 14:15:22 +0000 (15:15 +0100)]
ivi-layout: introduced surface create and configure
Introduced surface create and configure function for xdg-apps.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Tue, 17 Oct 2017 09:03:38 +0000 (11:03 +0200)]
ivi-layout: introduced configure_desktop_changed
Introduced signal configure_desktop_changed with interface. This signal
should be sent, when a desktop-surface is configured.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Tue, 17 Oct 2017 08:35:47 +0000 (10:35 +0200)]
layout-interface: added interface to change surface id
This interface enables an id-agent to change the surface ids of an
ivi-layout-surface once.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Tue, 17 Oct 2017 08:31:09 +0000 (10:31 +0200)]
ivi-shell: introduction of IVI_INVALID_ID
Introduction of IVI_INVALID_ID for xdg-shell applications.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Tue, 17 Oct 2017 08:29:21 +0000 (10:29 +0200)]
ivi-shell: removed assert
Removed assert, that checks if ivi-surface is not available, since this
can now happen with xdg-shell support.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Michael Teyfel [Tue, 26 Sep 2017 15:12:08 +0000 (17:12 +0200)]
ivi-shell: rework goto labels to avoid memory leaks
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
Pekka Paalanen [Wed, 6 Feb 2019 14:42:09 +0000 (16:42 +0200)]
libweston: export weston_config API
Make it official that libweston will export the weston_config API, as requested
in https://gitlab.freedesktop.org/wayland/weston/merge_requests/29 .
There is no other way third party helper clients could access the API.
The autotools build has been accidentally exporting it all the time, but the
Meson build needed fixing.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Alexandros Frantzis [Tue, 29 Jan 2019 14:22:45 +0000 (16:22 +0200)]
clients: Add a mandelbrot set shader to simple-dmabuf-egl
Support drawing a mandelbrot set in the fragment shader, rendering it
with separate draw calls, one for each cell in a virtual 4x4 grid. This
more complex and heavy drawing will potentially help us to visually
discover any present or future explicit synchronization issues.
The mandelbrot set rendering is enabled with the -m/--mandelbrot
command-line switch.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Alexandros Frantzis [Tue, 30 Oct 2018 12:26:47 +0000 (14:26 +0200)]
clients: Support explicit synchronization in simple-dmabuf-egl
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Changes in v7:
- Merge acquire fence and release fence code blocks in redraw().
- Use 1 << n to define option bitflags.
- Remove redundant statement involving OPT_IMPLICIT_SYNC.
Changes in v6:
- Add option for window size.
- Add option for enabling/disabling explicit sync.
Changes in v5:
- Meson support.
Alexandros Frantzis [Mon, 12 Nov 2018 16:33:54 +0000 (18:33 +0200)]
tests: Add tests for per commit zwp_buffer_release_v1 behavior
Add tests to check that the zwp_buffer_release_v1 events are emitted per
surface commit.
To be able to test this we need to use a renderer that holds the buffer
until the next buffer is committed, hence we use the pixman renderer.
Changes in v7:
- Remove references to obsolete noop-hold renderer.
Changes in v5:
- Meson support.
Changes in v4:
- Use the pixman renderer instead of the (now gone) noop-hold
renderer.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Alexandros Frantzis [Fri, 19 Oct 2018 09:14:11 +0000 (12:14 +0300)]
libweston: Support zwp_surface_synchronization_v1.get_release
Implement the get_release request of the zwp_surface_synchronization_v1
interface.
This commit implements the zwp_buffer_release_v1 interface. It supports
the zwp_buffer_release_v1.fenced_release event for surfaces rendered by
the GL renderer, and the zwp_buffer_release_v1.immediate_release event
for other cases.
Note that the immediate_release event is safe to be used for surface
buffers used as planes in the DRM backend, since the backend releases
them only after the next page flip that doesn't use the buffers has
finished.
Changes in v7:
- Remove "partial" from commit title and description.
- Fix inverted check when clearing used_in_output_repaint flag.
Changes in v5:
- Use the new, generic explicit sync server error reporting function.
- Introduce and use weston_buffer_release_move.
- Introduce internally and use weston_buffer_release_destroy.
Changes in v4:
- Support the zwp_buffer_release_v1.fenced_release event.
- Support release fences in the GL renderer.
- Assert that pending state buffer_release is always NULL after a
commit.
- Simplify weston_buffer_release_reference.
- Move removal of destroy listener before resource destruction to
avoid concerns about use-after-free in
weston_buffer_release_reference
- Rename weston_buffer_release_reference.busy_count to ref_count.
- Add documentation for weston_buffer_release and ..._reference.
Changes in v3:
- Raise NO_BUFFER for get_release if no buffer has been committed,
don't raise UNSUPPORTED_BUFFER for non-dmabuf buffers,
so get_release works for all valid buffers.
- Destroy the buffer_release object after sending an event.
- Track lifetime of buffer_release objects per commit, independently
of any buffers.
- Use updated protocol interface names.
- Use correct format specifier for resource ids.
Changes in v2:
- Raise UNSUPPORTED_BUFFER at commit if client has requested a
buffer_release, but the committed buffer is not a valid linux_dmabuf.
- Remove tests that are not viable anymore due to our inability to
create dmabuf buffers and fences in a unit-test environment.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Alexandros Frantzis [Fri, 19 Oct 2018 09:14:11 +0000 (12:14 +0300)]
libweston: Support zwp_surface_synchronization_v1.set_acquire_fence
Implement the set_acquire_fence request of the
zwp_surface_synchronization_v1 interface.
The implementation uses the acquire fence in two ways:
1. If the associated buffer is used as GL render source, an
EGLSyncKHR is created from the fence and used to synchronize
access.
2. If the associated buffer is used as a plane framebuffer,
the acquire fence is treated as an in-fence for the atomic
commit operation. If in-fences are not supported and the buffer
has an acquire fence, we don't consider it for plane placement.
If the used compositor/renderer doesn't support explicit
synchronization, we don't advertise the protocol at all. Currently only
the DRM and X11 backends when using the GL renderer advertise the
protocol for production use.
Issues for discussion
---------------------
a. Currently, a server-side wait of EGLSyncKHR is performed before
using the EGLImage/texture during rendering. Unfortunately, it's not clear
from the specs whether this is generally safe to do, or we need to
sync before glEGLImageTargetTexture2DOES. The exception is
TEXTURE_EXTERNAL_OES where the spec mentions it's enough to sync
and then glBindTexture for any changes to take effect.
Changes in v5:
- Meson support.
- Make explicit sync server error reporting more generic, supporting
all explicit sync related interfaces not just
wp_linux_surface_synchronization.
- Fix typo in warning for missing EGL_KHR_wait_sync extension.
- Support minor version 2 of the explicit sync protocol (i.e., support
fences for opaque EGL buffers).
Changes in v4:
- Introduce and use fd_clear and and fd_move helpers.
- Don't check for a valid buffer when updating surface acquire fence fd
from state.
- Assert that pending state acquire fence fd is always clear
after a commit.
- Clarify that WESTON_CAP_EXPLICIT_SYNC applies to just the
renderer.
- Check for EGL_KHR_wait_sync before using eglWaitSyncKHR.
- Dup the acquire fence before passing to EGL.
Changes in v3:
- Keep acquire_fence_fd in surface instead of buffer.
- Clarify that WESTON_CAP_EXPLICIT_SYNC applies to both backend and
renderer.
- Move comment about non-ownership of in_fence_fd to struct
drm_plane_state definition.
- Assert that we don't try to use planes with in-fences when using the
legacy KMS API.
- Remove unnecessary info from wayland error messages.
- Handle acquire fence for subsurface commits.
- Guard against self-update in fd_update.
- Disconnect the client if acquire fence EGLSyncKHR creation or wait
fails.
- Use updated protocol interface names.
- User correct format specifier for resource ids.
- Advertise protocol for X11 backend with GL renderer.
Changes in v2:
- Remove sync file wait fallbacks.
- Raise UNSUPPORTED_BUFFER error at commit if we have an acquire
fence, but the committed buffer is not a valid linux_dmabuf.
- Don't put buffers with in-fences on planes that don't support
in-fences.
- Don't advertise explicit sync protocol if backend does not
support explicit sync.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Alexandros Frantzis [Fri, 19 Oct 2018 09:14:11 +0000 (12:14 +0300)]
libweston: Introduce an internal linux sync file API
Introduce an internal API for dealing with linux sync files,
and use it in the codebase to replace ad-hoc sync file management.
The linux_sync_file_is_valid function is not currently used, but will be
utilized in upcoming commits to implement the
zwp_linux_explicit_synchronization_unstable_v1 protocol.
Changes in v5:
- Meson support.
Changes in v3:
- Use parameter name in function documentation.
- Move kernel UAPI to separate header file.
Changes in v2:
- Add function documentation
- Remove linux_sync_file_wait()
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Alexandros Frantzis [Fri, 19 Oct 2018 09:14:11 +0000 (12:14 +0300)]
libweston: Introduce zwp_linux_explicit_synchronization_v1
Introduce support for the zwp_linux_explicit_synchronization_unstable_v1
protocol with an implementation of the zwp_linux_explicit_synchronization_v1
interface.
Explicit synchronization provides a more versatile notification
mechanism for buffer readiness and availability, and can be used to
improve efficiency by integrating with related functionality in display
and graphics APIs.
In addition, the per-commit nature of the release events provided by
this protocol potentially offers a solution to a deficiency of the
wl_buffer.release event (see
https://gitlab.freedesktop.org/wayland/wayland/issues/46).
Support for this protocol depends on the capabilities of the backend, so
we don't register it by default but provide a function which each
backend will need to call. In this commit only the headless backend when
using the noop renderer supports this to enable testing.
Note that the zwp_surface_synchronization_v1 interface, which contains
the core functionality of the protocol, is not implemented in this
commit. Support for it will be added in future commits.
Changes in v7:
- Added some information in the commit message about the benefits of
the explicit sync protocol.
Changes in v6:
- Fall back to advertising minor version 1 of the explicit sync protocol,
although we support minor version 2 features, until the new
wayland-protocols version is released.
Changes in v5:
- Meson support.
- Advertise minor version 2 of the explicit sync protocol.
Changes in v4:
- Enable explicit sync support in the headless backend for all
renderers.
Changes in v3:
- Use wl_resource_get_version() instead of hardcoding version 1.
- Use updated protocol interface names.
- Use correct format specifier for resource id.
- Change test name to 'linux-explicit-synchronization.weston'
(s/_/-/g).
Changes in v2:
- Move implementation to separate file so protocol can be registered
on demand by backends.
- Register protocol in headless+noop backend for testing purposes.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Pekka Paalanen [Wed, 6 Feb 2019 08:53:35 +0000 (10:53 +0200)]
tests: use weston_compositor_exit
Use the proper function to exit instead of the libwayland one, to allow main
handle_exit() to be called.
This is just to unify the exit paths.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 6 Feb 2019 08:48:51 +0000 (10:48 +0200)]
ivi-shell: use weston_compositor_exit
Use the proper function to exit instead of the libwayland one, to allow main
handle_exit() to be called.
This is just to unify the exit paths.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 6 Feb 2019 08:44:37 +0000 (10:44 +0200)]
desktop-shell: use weston_compositor_exit
Use the proper weston_compositor_exit API instead of wl_display_terminate() to
allow the compositor main to prepare for exit, and most importantly to set the
exit error code as appropriate.
I have some brokenness in my test suite running, and weston-desktop-shell was
crashing at start, yet the tests did not notice. With this patch, the tests
where the helper crashes are properly marked as failed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Eric Toombs [Fri, 1 Feb 2019 02:53:25 +0000 (21:53 -0500)]
weston: add more libinput config options
This is so that, for instance, people using weston as their main Wayland
compositor can invert the sense of two finger scrolling or change
pointer acceleration using weston.ini, rather than having to edit C
code.
All of the options that libinput itself exposes through its API are now
exposed in weston.ini. The new options are called `tap-and-drag`,
`tap-and-drag-lock`, `disable-while-typing`, `middle-emulation`,
`left-handed`, `rotation`, `accel-profile`, `accel-speed`,
`scroll-method`, `natural-scroll`, and `scroll-button`. I have
successfully tested everything except for `rotation`, out of a lack of
hardware support.
weston now depends directly on libevdev for turning button name strings into
kernel input codes. This was needed for the `scroll-button` config
option. (weston already depends indirectly on libevdev through
libinput, so I figured people would be OK with this.) As a practical
matter for debian-style packagers, weston now has a build dependency on
libevdev-dev.
Right now, the code applies the same options to all attached devices
that a given option is relevant for. There are plans for multiple
[libinput] sections, each with different device filters, for users who
need more control here.
Signed-off-by: Eric Toombs <3672-ewtoombs@users.noreply.gitlab.freedesktop.org>
Eric Toombs [Thu, 31 Jan 2019 23:24:04 +0000 (18:24 -0500)]
weston: deprecate enable_tap in favour of enable-tap
This is to increase consistency in config option naming in weston.ini.
(Prefer hyphens over underscores to separate words.)
If enable_tap is present in weston.ini, an obnoxious error message is
logged with weston_log(). In terms of configuration, if enable-tap is
present, enable_tap is ignored.
Signed-off-by: Eric Toombs <3672-ewtoombs@users.noreply.gitlab.freedesktop.org>
Eric Toombs [Thu, 31 Jan 2019 22:43:17 +0000 (17:43 -0500)]
man: fix small typo: directroy
Signed-off-by: Eric Toombs <3672-ewtoombs@users.noreply.gitlab.freedesktop.org>
Pekka Paalanen [Mon, 14 Jan 2019 17:44:45 +0000 (19:44 +0200)]
meson: remind about weston-launch suid
Since the Meson install step is not written to try to set the suid bit
automatically, remind the user that weston-launch needs to be
setuid-root to work.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Scott Anderson [Thu, 31 Jan 2019 23:11:31 +0000 (12:11 +1300)]
meson: Fix deprecation warning for pkgconfig
Meson 0.49 now issues a warning for libraries being passed into the
'libraries' keyword argument. Now they should be passed as a positional
argument.
See
https://mesonbuild.com/Release-notes-for-0-49-0.html#deprecation-warning-in-pkgconfig-generator
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
n3rdopolis [Wed, 9 Jan 2019 01:59:58 +0000 (01:59 +0000)]
libweston: fbdev: Force the Framebuffer devices to be activated.
This attempts to wake up secondary framebuffer devices
(/dev/fb1 and up) as usually these devices start powered off, and
the FBIOPUT_VSCREENINFO ioctl turns it on. This was tested on qemu
with two virtual QXL cards. This is a more precise way to activate
framebuffer devices with the ioctl
Daniel Stone [Thu, 31 Jan 2019 02:06:22 +0000 (02:06 +0000)]
gitlab-ci: Actually capture Meson logs
Correct the path to the build directory so we can capture Meson logs;
especially useful when tests fail like in #184.
An example of this change having been run with a deliberately-failing
test, capturing the Meson logs, can be found at:
https://gitlab.freedesktop.org/daniels/weston/-/jobs/94623
Signed-off-by: Daniel Stone <daniels@collabora.com>
emersion [Sun, 18 Nov 2018 20:42:10 +0000 (21:42 +0100)]
clients: sanitize XCURSOR_SIZE
Fixes https://gitlab.freedesktop.org/wayland/weston/issues/164
Thomas Zimmermann [Fri, 21 Sep 2018 09:50:32 +0000 (11:50 +0200)]
weston: Add config option to enable pixman-based rendering
Pixman can be used for rendering if the default GLESv2 rendering
is broken or cannot be used.
Pixman-based rendering is already available with the command-line
switch '--use-pixman'. This patch adds support for this option to
the configuration file. Putting
[core]
use-pixman=true
into 'weston.ini' enables pixman-based rendering for all backends
that support it. With this change, pixman has to be enabled only
once.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/27
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Thomas Zimmermann [Fri, 21 Sep 2018 12:44:57 +0000 (14:44 +0200)]
weston: Store use_pixman as `bool` type
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Greg V [Tue, 24 Jul 2018 20:21:55 +0000 (23:21 +0300)]
desktop-shell: extract view_get_transform, make it reliable
Avoid crashes related to get_shell_surface returning NULL.
Surfaces are already allowed to be neither focus nor shell in
e.g. focus_state_surface_destroy.
Dima Ryazanov [Thu, 15 Nov 2018 06:17:42 +0000 (22:17 -0800)]
clients: A better fix for a crash when unlocking or unconfining a pointer
This is a rewrite of the fix in:
https://lists.freedesktop.org/archives/wayland-devel/2018-May/038140.html
It addresses Pekka's concerns about window getting destroyed before the
unlock/unconfine event is triggered.
Signed-off-by: Dima Ryazanov <dima@gmail.com>
Dima Ryazanov [Thu, 15 Nov 2018 05:15:16 +0000 (21:15 -0800)]
clients: Delete an unused variable
Signed-off-by: Dima Ryazanov <dima@gmail.com>
Dima Ryazanov [Thu, 15 Nov 2018 05:03:35 +0000 (21:03 -0800)]
Revert "Fix a crash when unlocking or unconfining a pointer"
This reverts commit
e0dc5d47cb5f29deec495efd958fcd5f6f833389.
Signed-off-by: Dima Ryazanov <dima@gmail.com>
Scott Anderson [Mon, 28 Jan 2019 02:40:55 +0000 (15:40 +1300)]
compositor-drm: Don't set linear modifier when not supported
This will cause gbm_surface_create_with_modifiers to fail on drivers
where modifiers are not yet supported (e.g. amdgpu). We need to make
sure we only end up using gbm_surface_create in this case.
This fixes the remoting plugin on these drivers.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Marius Vlad [Fri, 25 Jan 2019 10:56:24 +0000 (12:56 +0200)]
compositor-drm: Add an environmental variable to force RENDER-only mode of compositing
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Fri, 21 Dec 2018 10:48:22 +0000 (12:48 +0200)]
compositor-drm: Forgot to use mode variable when using render only mode of composition
In patch
5d767416c1847 we simplified a bit the way in which the
compositing mode was being printed with the purpose to improve
weston-debug. It seems we forgot to use the mode when RENDER-only mode
is being used, so this patch fixes that.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Philipp Zabel [Tue, 22 Jan 2019 10:28:46 +0000 (11:28 +0100)]
compositor-drm: fix drm_output_prepare_overlay_view for non-matching format
Add missing drm_plane_state_put_back in case the view's pixel format
does not match any of the tested plane's supported formats.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Marius Vlad [Wed, 9 Jan 2019 10:26:07 +0000 (12:26 +0200)]
compositor-drm: Display the pixel format of the framebuffer used by the plane
With this patch we also display the format in usage by the HW-plane.
This touches both legacy and atomic paths.
Marius Vlad [Tue, 22 Jan 2019 15:56:58 +0000 (17:56 +0200)]
pixel-formats: Document pixel format human-friendly conversion methods
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Tue, 22 Jan 2019 15:56:36 +0000 (17:56 +0200)]
compositor-drm: Print DRM FB pixel format of the view in human-friendly form
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Jonas Ã…dahl [Tue, 22 Jan 2019 10:05:19 +0000 (11:05 +0100)]
gitlab-ci.yml: Install meson from 0.49 branch
Otherwise CI might fail due to
https://github.com/mesonbuild/meson/issues/4718 but the fix isn't
included in any release yet, so install meson from the 0.49 branch.
Signed-off-by: Jonas Ã…dahl <jadahl@gmail.com>
Pekka Paalanen [Thu, 17 Jan 2019 13:49:10 +0000 (15:49 +0200)]
meson: friendly error for simple-dmabuf-drm
This is probably the most annoying ones. Some distributions do not even package
a libdrm_${driver} if the driver's hardware does not occur on the CPU
architecture, e.g. Debian x86_64 does not have libdrm_etnaviv.
Helps people to disable those.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Alexandros Frantzis [Wed, 9 Jan 2019 11:38:16 +0000 (13:38 +0200)]
clients/simple-dmabuf-egl: Render a moving square
Render a moving square instead of just clearing the buffer, to help
uncover rendering issues (e.g. modifier-related issues) which may not be
visible with a simple glClear.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Alexandros Frantzis [Tue, 8 Jan 2019 10:32:12 +0000 (12:32 +0200)]
clients/simple-dmabuf-egl: Support dmabuf format modifiers
Take into account format modifiers advertised by the compositor and the
EGL implementation and supported by the buffer creation mechanism, to
select the optimal buffer modifier.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Eric Engestrom [Thu, 10 Jan 2019 14:57:05 +0000 (14:57 +0000)]
Revert "meson: fix -Wno-foo argument testing"
This reverts commit
bc315aa2881949d3961c03599e8c20e0273ec817
Turns out since meson 0.46 it knows about this quirk of compilers and
checks the right thing internally.
See https://github.com/mesonbuild/meson/pull/2284
Pekka Paalanen [Tue, 8 Jan 2019 18:05:09 +0000 (20:05 +0200)]
meson: better error for test-junit-xml dep
Helps people avoid libxml if they... want to?
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 7 Jan 2019 19:33:08 +0000 (21:33 +0200)]
meson: better error for tests missing libX11
Helps people avoid libX11 at the cost of disabling Xwayland support.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 7 Jan 2019 13:04:21 +0000 (15:04 +0200)]
tests: remove remnants of buffer-count test
The buffer-count test was added in
40c0c3f91eeb747b86df64579e3b3706cc5450af and removed in
4938f93f578c0d73d63068e4a777250fce7db430, but the removal left around
the dependency to EGL headers in weston-test.c.
Removal of those unneeded includes allows us to drop the EGL dependency
completely from weston-test.c build.
For the Meson build this means that there are no dependency('egl')
directives anymore without the user friendly error message.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 13:08:25 +0000 (15:08 +0200)]
meson: better errors for VA-API deps
Helps people avoid libva if they don't want it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 13:01:48 +0000 (15:01 +0200)]
meson: better error for drm+gl deps
Helps people avoid GBM if they don't have it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 13:00:21 +0000 (15:00 +0200)]
meson: better error for x11+gl deps
Helps people avoid egl in the rare case they don't have it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 12:53:04 +0000 (14:53 +0200)]
meson: better error for wayland-backend wl-egl dep
Helps people avoid wayland-egl if they don't want it.
Makes the check for wayland-egl explicit on the site instead of relying
on gl-renderer checking for it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 12:40:01 +0000 (14:40 +0200)]
meson: better errors for image loader deps
Helps people avoid libjpeg or libwebp if they don't want them.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 12:23:59 +0000 (14:23 +0200)]
meson: better errors for systemd-notify deps
Helps people avoid libsystemd if they don't want it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 12:20:40 +0000 (14:20 +0200)]
meson: better error for cms-colord deps
Helps people avoid colord if they don't want it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 12:17:23 +0000 (14:17 +0200)]
meson: better error cms-static deps
Helps people to avoid lcms2 if they don't want it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 11:36:40 +0000 (13:36 +0200)]
meson: contain and check simple-dmabuf-egl deps
Check the egl, glesv2 and gbm dependencies locally instead of relying on
the dep_* variables from the top level meson.build or
libweston/meson.build (dep_gbm).
This should make these dependencies now explicitly checked when the app
is built, rather than relying on other components doing the checks. If
the drm-backend was disabled, this would have probably hit an error
using the undeclared variable dep_gbm.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 11:28:23 +0000 (13:28 +0200)]
meson: better errors for gl-renderer egl and glesv2
Helps people to avoid EGL and GLESv2 if they do not want them.
Stops using dep_egl and dep_glesv2 so that the human friendly error
message is alongside the dependency() statement, so that the message and
the statement can later be merged together once Meson offers the custom
error messages feature or something even more sophisticated.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 11:13:53 +0000 (13:13 +0200)]
meson: better errors for x11-backend deps
Helps people avoid X11 related dependencies if they don't want them.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 11:02:32 +0000 (13:02 +0200)]
meson: better error for freerdp
Helps people to avoid freerdp if they don't want it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 10:29:12 +0000 (12:29 +0200)]
meson: better error for logind deps
Helps people to disable logind support if they do not want the
dependencies.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 10:20:22 +0000 (12:20 +0200)]
meson: better errors for xwayland deps
Helps people to disable xwayland if they don't want to install the
dependencies.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 10:13:39 +0000 (12:13 +0200)]
meson: drop indent level from xwayland
Use the pattern to avoid identing everything, when everything in the
file is under the one conditional.
Helps readability.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Mon, 31 Dec 2018 10:09:24 +0000 (12:09 +0200)]
meson: better error for wcap dep cairo
Add human-friendly error message.
Cairo is a hard dependency on the whole at least because tests seem to
require it, but this will help if someone adds an option to disable
building tests to get rid of Cairo.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Fri, 14 Dec 2018 17:11:51 +0000 (19:11 +0200)]
meson: fix pangocairo being optional
Cannot use dependency() directly in the structure, because it will
execute regardless of the option. Instead, let's store the dependency
name in the structure and use the same logic as with simple_clients to
conditionally look for the dependencies.
As a bonus, this brings friendly error messages to demo-clients
dependencies.
subsurfaces' dependencies are also converted to maintain consistency
with simple_clients.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Thu, 20 Dec 2018 09:53:21 +0000 (11:53 +0200)]
build: replace IN_WESTON with UNIT_TEST
Remove IN_WESTON in favour of the already defined UNIT_TEST which is
used to modify a compilation unit to expose more functions for unit
tests to prod at.
Originally IN_WESTON meant that compilation unit was being compiled for
use in the Weston compositor, but it probably never really did anything
more than change what WL_EXPORT means in matrix.c.
This patch not only simplifies the logic, but it fixes the Meson build
of test-matrix: IN_WESTON was defined there even when matrix.c was being
built outside of Weston, which caused it to depend on libwayland
headers, which were not included in the Meson build of test-matrix.
Test-matrix has no reason to depend in libwayland in any way, so this
patch fixes that.
Reported-by: Greg V <greg@unrelenting.technology>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Greg V [Thu, 13 Dec 2018 20:20:16 +0000 (23:20 +0300)]
build: add missing wayland-client dep in meson
Tests library requires Wayland headers to build.
Signed-off-by: Greg V <greg@unrelenting.technology>
Greg V [Thu, 13 Dec 2018 20:17:48 +0000 (23:17 +0300)]
build: use '-Wl,' wrapper for the -export-dynamic linker flag
Meson links with the C compiler, not the raw linker.
With clang+LLD, the bare flag would be ignored.
Signed-off-by: Greg V <greg@unrelenting.technology>
Greg V [Thu, 13 Dec 2018 20:13:25 +0000 (23:13 +0300)]
build: use pkg-config to find libjpeg in meson
Signed-off-by: Greg V <greg@unrelenting.technology>
Pablo Castellano [Wed, 28 Nov 2018 07:45:46 +0000 (08:45 +0100)]
compositor-fbdev: add support for ABGR
Make fbdev work with some Android downstream kernels, like the
asus-grouper (Google Nexus 7 2012).
Signed-off-by: Oliver Smith <ollieparanoid@bitmessage.ch>
Alexandros Frantzis [Thu, 25 Oct 2018 14:32:36 +0000 (17:32 +0300)]
clients: Add simple-dmabuf-egl
Add a client that uses EGL/GLESv2 to draw to dmabuf buffers, utilizing
EGLImages and FBOs. The client uses GBM to create the dmabufs buffers.
The simple-dmabuf-egl client is partly based on patch [1] that changes
dmabuf clients to use GBM instead of libdrm code, but has been greatly
simplified since in this case we don't require direct pixel access or
non-RGBA formats.
[1] https://patchwork.freedesktop.org/patch/239796/
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Marius Vlad [Fri, 23 Nov 2018 10:04:27 +0000 (12:04 +0200)]
libweston/screnshooter: Fix weston screenshot event done if there's no client running
The 'done' event sent back to client with the weston screenshot interface
is not being sent if there is no damage on the plane. This patch (re-uses just
like recording part) weston_output_damage() to achieve that.
Otherwise the client will have to wait (and be blocked) until some
damage on the plane is being done.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Sat, 15 Dec 2018 13:57:19 +0000 (15:57 +0200)]
compositor: Install weston-screenshooter in BINDIR
Previously weston-screenshooter was installed in LIBEXECDIR, but given
that now it can be invoked by the user whenever debug protocol is
enabled, let's intall it into BINDIR. This way, it can be invoked
without the need to modify PATH.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Sat, 15 Dec 2018 13:51:57 +0000 (15:51 +0200)]
compositor: Add some handy wrappers for wet_get_binary_path()
This allows to possibility to specify where to look for the executable
but also simplifies the need of having to pass either BINDIR/LIBEXECDIR
for retrieving full-path of the executable.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Thu, 13 Dec 2018 14:31:14 +0000 (16:31 +0200)]
ivi-shell/hmi-controller: Include config.h as to not break ivi-shell build on meson
We're going to eventually pass bindir to weston-screenshooter and we
will need config.h info.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Thu, 13 Dec 2018 21:04:52 +0000 (23:04 +0200)]
libweston: Allow taking screenshots when debug protocol is enabled
Screenshots of the outputs can only be taken by having a keyboard
plug-ed in, as to avoid potential malicious intent. On the other hand,
this is problematic as there are cases where a keyboard cannot
be used as a input device. A particular use-case is that for
multiple devices it can be cumbersome to connect a keyboard such
that using ssh can be much easier and can be further automated.
This patch allows taking screenshots without the need of having a
keyboard connected when debug protocol is enabled.
Add also a few words about the fact that this is a serious issue
and can lead to silently leaking the output contents.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Thu, 13 Dec 2018 21:03:30 +0000 (23:03 +0200)]
libweston/weston-debug: Add a easy way to determine if the debug protocol has been enabled
This allows additional debug features to depend on the debug protocol being enabled
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Wed, 5 Dec 2018 12:40:31 +0000 (14:40 +0200)]
clients/screenshot: Allow weston-screenshooter to be called directly
As is stands now, libexec/weston-screenshooter can only be called from
within weston server. This will allow weston-screenshooter to be called
on the command line. The final scope here is to allow taking screenshots
without the need of a keyboard.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Thu, 13 Dec 2018 13:24:08 +0000 (15:24 +0200)]
clients/screenshot: Avoid using global variables to pass down data between functions
This is just cosmetic and doesn't fixes anything.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Tue, 18 Dec 2018 08:29:20 +0000 (10:29 +0200)]
libweston/compositor-drm: Add missing debug message for scanout_view
Print debug message when the fb coudn't be retrieved for the primary
plane.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Tue, 18 Dec 2018 08:27:31 +0000 (10:27 +0200)]
libweston/compositor-drm: No need to test for invalid alpha for the view
This is redundant and is already being checked drm_fb_get_from_view()
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 14 Dec 2018 09:56:10 +0000 (11:56 +0200)]
libweston/compositor-drm: Print composition mode in weston-debug
This fixes the situation when using only plane-state mode for
compositing there's no obvious debug message stating that. This patch
makes it slightly better/easier to dermine what mode the compositor is
using currently.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 23 Nov 2018 12:10:16 +0000 (14:10 +0200)]
Fix compiler warning: unused variable when building with DEBUG
clients/keyboard.c: In function 'dbg':
clients/keyboard.c:276:6: warning: variable 'l' set but not used [-Wunused-but-set-variable]
int l;
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 23 Nov 2018 12:07:33 +0000 (14:07 +0200)]
Fix compiler warnings: invalid type format
This patch fixes the following warnings:
clients/weston-info.c: In function 'print_tablet_tool_info':
clients/weston-info.c:569:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' [-Wformat=]
printf("\t\t\thardware serial: %lx\n", info->hardware_serial);
^
clients/weston-info.c:572:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' [-Wformat=]
printf("\t\t\thardware wacom: %lx\n", info->hardware_id_wacom);
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 23 Nov 2018 12:04:46 +0000 (14:04 +0200)]
Fix compiler warnings: clobber variables
This patchs fixes warnings generated by older toolchains:
shared/image-loader.c: In function 'load_png':
shared/image-loader.c:211:12: warning: variable 'data' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
png_byte *data = NULL;
See https://linux.die.net/man/3/longjmp why is this needed.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 23 Nov 2018 12:02:07 +0000 (14:02 +0200)]
Fix compiler warnings generated by older toolchains/compiler
This fixes warnings like ``may be used uninitialized''
libweston/compositor-drm.c: In function 'drm_device_is_kms':
libweston/compositor-drm.c:6374:12: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
b->drm.id = id;
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Eric Engestrom [Thu, 13 Dec 2018 17:05:31 +0000 (17:05 +0000)]
meson: fix -Wno-foo argument testing
gcc and clang ignore `-Wno-foo` arguments nowadays, so we need to
test the positive variant instead.
Daniel Stone [Sun, 22 Jul 2018 14:38:54 +0000 (15:38 +0100)]
CI: Add Meson build
This uses pip to install Meson in order to get a sufficiently new
version.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Sat, 24 Nov 2018 11:52:49 +0000 (13:52 +0200)]
CI: build rdp-backend
Extends CI build coverage to catch more issues.
freerdp2-dev needs stretch-backports.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Sat, 24 Nov 2018 11:51:04 +0000 (13:51 +0200)]
CI: build remoting-plugin
Extends CI build coverage to catch more issues.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Sat, 24 Nov 2018 12:13:02 +0000 (14:13 +0200)]
build: add meson to autotools dist tar-ball
This should let people using the dist tarballs to build with meson.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Daniel Stone [Thu, 24 Nov 2016 15:54:51 +0000 (15:54 +0000)]
Add Meson build system
Meson is a build system, currently implemented in Python, with multiple
output backends, including Ninja and Make. The build file syntax is
clean and easy to read unlike autotools. In practise, configuring and
building with Meson and Ninja has been observed to be much faster than
with autotools. Also cross-building support is excellent.
More information at http://mesonbuild.com
Since moving to Meson requires some changes from users in any case, we
took this opportunity to revamp build options. Most of the build options
still exist, some have changed names or more, and a few have been
dropped. The option to choose the Cairo flavour is not implemented since
for the longest time the Cairo image backend has been the only
recommended one.
This Meson build should be fully functional and it installs everything
an all-enabled autotools build does. Installed pkg-config files have
some minor differences that should be insignificant. Building of some
developer documentation that was never installed with autotools is
missing.
It is expected that the autotools build system will be removed soon
after the next Weston release.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Daniel Stone [Sun, 9 Dec 2018 12:49:07 +0000 (14:49 +0200)]
tests: fix include in input-timestamps-helper.c
No need to use the protocol directory prefix. This may even be necessary
for the Meson build.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Extracted from the patch adding the Meson build system.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Sat, 24 Nov 2018 09:39:48 +0000 (11:39 +0200)]
shared: remove fallback definition of backtrace()
The user of backtrace() was removed in
bb707dc0fe331c9af112a0552b7aa6fde755dd83 and has been unused since.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Sat, 17 Nov 2018 12:48:04 +0000 (14:48 +0200)]
clients/simple-egl: include weston-egl-ext.h correctly
weston-egl-ext.h was moved to shared/ in
ffff92d592e1635a7ee4511ad3e080f7576553bd
Use the correct include path, so that Meson build does not need to add
../shared to the include path just for this.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Daniel Stone [Tue, 28 Aug 2018 21:53:59 +0000 (22:53 +0100)]
tests: Rename surface-screenshot
Give it a more regular name, matching all the other test plugins.
Signed-off-by: Daniel Stone <daniels@collabora.com>
David Fort [Tue, 4 Dec 2018 22:25:39 +0000 (23:25 +0100)]
rdp-compositor: fix compilation with FreeRDP 2.0-rc4
Some members have been removed from FreeRDP structs, so let's use local
variables.