The buffer-count test was added in
40c0c3f91e and removed in
4938f93f57, 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>
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>
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>
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>
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>
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>
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>
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>
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>
Make fbdev work with some Android downstream kernels, like the
asus-grouper (Google Nexus 7 2012).
Signed-off-by: Oliver Smith <ollieparanoid@bitmessage.ch>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
weston-egl-ext.h was moved to shared/ in
ffff92d592
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>