Add a frame buffer backend using pixman to render to fbdev.
This has been tested against nouveaufb but nothing else. Much of the code
came straight from the rpi backend (and copyright has been attributed
accordingly).
The behaviour of this backend on less modern frame buffers has yet to be
tested.
The refresh rate is calculated from the frame buffer's metadata. Every frame
is finished in synchrony with the refresh rate.
Frame buffer devices are currently specified on the command line (or using
the default of /dev/fb0); udev could be used in future to enumerate them.
pixman is used for compositing, and a suitable pixman format is built from
the frame buffer's metadata. This doesn't support the full range of
frame buffer formats, but does support varying BPPs of RGBA and ARGB. That
should be enough for now.
The following are not currently supported:
• FOURCC
• Non-packed formats (interleaved, planes, etc.)
• Non-true-colour formats (monochrome, greyscale, etc.)
• Big-endian formats (with component MSBs on the right)
• Non-RGBA and non-ARGB formats
Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
The Android backend has been fairly unused, since we do not have
projects actively using it. It gets basic build testing as part of the
normal build, but runtime testing it takes a considerable effort, and so
I have not done that in a long time. The code is slowly rotting, and
with new emerging backends it starts to be a burden, since it cannot use
udev, but needs evdev.
Therefore to ease Weston going forward, remove the Android backend. If
someone misses it, it can still be found in the stable 1.0 branch, and
of course resurrected from git history if someone wants to put in the
effort and maintain it.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
We were pulling in cairo and the image loading libraries through libshared.
Split out libshared into a core libshared and a libshared-cairo that
pulls in the extra libraries.
Add a new backend for the Raspberry Pi.
This backend uses the DispmanX API to initialise the display, and create
an EGLSurface, so that GLESv2 rendering is shown on the "framebuffer".
No X server is involved. All compositing happens through GLESv2.
The created EGLSurface is specifically configured as buffer content
preserving, otherwise Weston wouuld show only the latest damage and
everything else was black. This may be sub-optimal, since we are not
alternating between two buffers, like the DRM backend is, and content
preserving may imply a fullscreen copy on each frame.
Page flips are not properly hooked up yet. The display update will
block, and we use a timer to call weston_output_finish_frame(), just
like the x11 backend does.
This backend handles the VT and tty just like the DRM backend does.
While VT switching works in theory, the display output seems to be
frozen while switched away from Weston. You can still switch back.
Seats and connectors cannot be explicitly specified, and multiple seats
are not expected.
Udev is used to find the input devices. Input devices are opened
directly, weston-launch is not supported at this time. You may need to
confirm that your pi user has access to input device nodes.
The Raspberry Pi backend is built by default. It can be build-tested
without the Raspberry Pi headers and libraries, because we provide stubs
in rpi-bcm-stubs.h, but such resulting binary is non-functional. If
using stubs, the backend is built but not installed.
VT and tty handling, and udev related code are pretty much copied from
the DRM backend, hence the copyrights. The rpi-bcm-stubs.h code is
copied from the headers on Raspberry Pi, including their copyright
notice, and modified.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Instead of hardcoding drm-backend.so as the default if environment
presents neither Wayland nor X11, have a ./configure option to change
it. It still defaults to drm-backend.so, if not given.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Add a headless backend and a noop renderer, mainly for testing
purposes. Although no rendering is performed with this backend,
this allow some of the code paths inside Weston and shm clients
to be tested without any windowing system or any need for drm
access.
If clients don't set a cursor, they get whatever the last cursor was
before the pointer entered their window. That's a little confusing, so
set a pointer on enter to avoid that. The down-side is that simple EGL
isn't very simple anymore.
https://bugs.freedesktop.org/show_bug.cgi?id=52452
Do not build the tablet-shell client if --disable-tablet-shell is given.
Change --enable-tablet-shell to --disable-tablet-shell in ./configure
--help output, since it is enabled by default. Add a description.
Use proper quoting in the conditional.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Separate simple EGL clients from other simple clients. This allows to
build either simple-shm or simple-egl, whichever you want. We avoid
linking libEGL and GLESv2 into simple-shm, and we can build simple-shm
even if nothing provides EGL, GLESv2, or wayland-egl APIs.
Change the options in configure --help from --enable to --disable, since
these are enabled by default, and you would normally only ever give the
--disable flavor. Add descriptions.
Remove the #define BUILD_SIMPLE_CLIENTS since it is not used.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
configure.ac: The toytoolkit clients used to get libEGL linked to them
even if there was no cairo-egl. This is useless, and actually harmful on
platforms, where libEGL absolutely requires one of the GL ES libraries
to be linked in, too.
Look for EGL-related packages only for cairo-egl with toytoolkit.
window.c: protect all GL header includes with HAVE_CAIRO_EGL, since that
is the only case we can support EGL, GL, or GLESv2 at all. In the case
we do not have cairo-egl, add enough definitions to let us build the
stubs for EGL-related functions.
Remove some #ifdefs that were inside of the same #ifdef already.
These changes allow to build sorfware rendering toytoolkit clients
without any bits of EGL libs or headers.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Otherwise the user has no indication which package is missing for
CAIRO_EGL, and has to dig into config.log for it.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Modify the pkg-config check for setbacklight so that failure only
disables building setbacklight, instead of failing the whole configure.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This backend has not seen even build testing for months, presumably does
not even compile, and is starting to hinder development a little.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Benjamin Franzke <benjaminfranzke@googlemail.com>
This fix xwayland.so that was complaining about jpeg symbols from the
libshared.
Note that xwayland is not using the jpeg ones, but now that symbols are read
up front we need to link anyway.. or break apart that library.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
We don't support this anymore. weston requires a setuid helper (such as
weston-launch) to run under kms, and should never run as root itself.
Disabe the setuid warning in configure.ac since we now only install the
minimal weston-launch as setuid.
We had duplicated code in many places, using hardcoded paths for
temporary files into more than one path. Some cases did not bother with
O_CLOEXEC, and all hardcoded paths that might not exist.
Add an OS helper function for creating a unique anonymous file with
close-on-exec semantics. The helper uses $XDG_RUNTIME_DIR as the
directory for a file.
This patch unifies the buffer file creation in both Weston and the
clients.
As simple clients are better not linking to libshared, as it would
require e.g. Cairo, they pull the OS compatibility code directly.
Android does not have mkostemp(), so a configure test is added for it,
and a fallback used if it is not available.
Changes in v2:
remove all the alternate possible directory definitions and use
XDG_RUNTIME_DIR only, and fail is it is not set.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
The patch "compositor-android: fix build flags" started using GCC_CFLAGS
for C++ files, too. That lead to the following warnings when building a
C++ file:
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
cc1plus: warning: command line option "-Wmissing-prototypes" is valid
for Ada/C/ObjC but not for C++
Introduce GCC_CXXFLAGS, similar to GCC_CFLAGS, but for C++, avoiding the
problematic compiler flags.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
The Android backend provides basic EGL/GLES2 graphics, where everything
is always composited. Overlays are not used. Input is stubbed, therefore
there is no input yet.
This adds the first C++ source file into Weston compositor. The Android
gralloc and fb HAL glue code to the Android EGL library is in C++, and
there is no way to access it from plain C. We have a simple wrapper to
the required C++ class API. Android forces the C++ file name extension
to .cpp.
The android backend is compiled by default. However, all Android
specific calls are protected with #ifdef ANDROID, so it will build also
without Android headers. The binary produced without the Android build
system is useless, but allows build-testing generic Weston changes.
Therefore the android backend is not installed.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Some systems may not have execinfo.h. Add a configure test for it, and
if it is not found, make the backtrace() call a no-operation.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
There are no dependencies or requirements there that we don't already
need for weston itself. So lets just always build them.
Use check_PROGRAMS for the matrix unit test case.