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>
In current form SHM buffers pixel format can only be printed as 0 and 1.
With the help of this helper we align with DRM_FORMAT_ pixel format.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Use the pixel format table to parse format names. This makes the parser
recognize almost all DRM format names.
Not all formats are usable, but we rely on the use to fail
appropriately. What we can use depends on the drivers anyway.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add a function to find a format description by the DRM format name. This
will be useful when parsing configuration strings.
While at it, fix the two function formattings in pixel-formats.h to
match everything else in the file.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
There is often a need to print the name of a pixel format. Printing the
raw numeric value is hard to decipher, printing the four ASCII
characters is slightly more human-friendly but still needs a decoder
table. Add a name that can be printed easily.
The bulk of this patch was done with:
sed -i -e 's/\.format = DRM_FORMAT_\(.\+\),/DRM_FORMAT(\1),/' libweston/pixel-formats.c
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
It's a bit surprising that Weston looks different when launched from the root
of the git repo vs from elsewhere.
But it's also technically a security vulnerability: if I launch it from
a directory like /tmp, it might pick up a weston.ini created by another user,
which could then load modules with arbitrary code. Basically, it's the same
problem as including "." in $PATH.
Signed-off-by: Dima Ryazanov <dima@gmail.com>
input panel related members of ivi_shell struct are
not required anymore. Also get_default_view(),
input_panel_setup() and input_panel_destroy() are not used.
Therefore, we can remove them.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
input panel implementation puts contents of an
application, which uses input_method protocol,
on top of all other surfaces. It is not controllable
with ivi-layout interface.
This is not acceptable for an In-Vehicle Infotainment
platform. Because we have to ensure configured scenegraph
cannot be hijacked by any rogue application.
Therefore, I am removing input panel implementation
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
For toplevel surfaces, the shell will do the same thing. Without this, the
commit does not trigger repaints, because the output mask for the surface
is not set.
Without this the popup is not shown unless something else triggers a
repaint. This is usually not seen because the mouse cursor triggers a
repaint at the same time.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Introduce a helper function to disconnect the client on unhandled
buffer types, and use it in the gl and pixman renderers. The function
is modeled after linux_dmabuf_buffer_send_server_error.
Also print the egl error state in the gl renderer, in case the
unrecognized buffer error happens when querying an egl buffer.
https://gitlab.freedesktop.org/wayland/weston/issues/148
If the view is not mapped, we do not need to update its
properties. We can use ivi_view_is_mapped() function to
check it.
Also we don't need to call weston_view_damage_below()
for weston_views, which were in the scenegraph. Because
we are calling weston_view_unmap for views of unmapped
ivi_views in build_view_list() function
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
From Michael Olbrich:
"Both the core in weston_compositor_build_view_list() with view.link
and the ivi-shell in commit_screen_list() with view.layer_link
don't remove the old views from the list.
As a result, all views that are not currently in the list have
old broken links. Destroying such a view tries to remove
the view from these lists and will access the old, invalid pointers."
Therefore, we have to unmap weston_views which are not in current
scenegraph of ivi-shell. I implemented ivi_view_is_mapped() function
to check mappedness of ivi_views. The functions checks:
- the view is on a layer's order list
- the layer is on a screen
- the layer and view's ivi_surface are visible
If ivi_view is not mapped but weston_view is still mapped,
we have to unmap the weston_view with weston_view_unmap() call.
Reported-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Remoting plugin support streaming image of virtual output on drm-backend
to remote output. By appending remote-output section in weston.ini,
weston loads remoting plugin module and creates virtual outputs via
remoting plugin. The mode, host, and port properties are configurable in
remote-output section.
This plugin send motion jpeg images to client via RTP using gstreamer.
Client can receive by using following pipeline of gst-launch.
gst-launch-1.0 rtpbin name=rtpbin \
udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,
encoding-name=JPEG,payload=26" port=[PORTNUMBER] !
rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtpjpegdepay ! jpegdec ! autovideosink \
udpsrc port=[PORTNUMBER+1] ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 !
udpsink port=[PORTNUMBER+2] sync=false async=false
where, PORTNUMBER is specified in weston.ini.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>