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 drm planes (sprites) only support translation and scaling. Now that
we have matrix.type, we can just look there to see if the transform is
compatible with kms.
Introduce several matrix transform types and track type for matrix.
Could be usefull for activating some fastpath that depends on some
transform type.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Before, cairo-util.h would combine pixman and cairo includes. X11 and
Wayland compositors uses this to load an image as a pixman_image_t but are
forced to include cairo headers. Clients use load_cairo_surface to
load images as cairo_surface_t's, but are forced to include pixman.h.
We move the load_image pixman prototype to its own header, so compositors
can get at the pixman prototype without including cairo.h and clients
can include the cairo based function without including pixman.h.
This way libtool will remember the libtoytoolkit LIBADD libraries.
We can drop the toolkit_libs hack and just link to libtoytoolkit.la and
libtool will add the dependencies.
The X11 backend uses a shadow buffer to be able to support transformed
outputs. However, this belongs in the renderer, since otherwise this
code would have to be copied into every backend that uses the pixman
renderer and supports transformed outputs.
All the clients here were missing the global_remove handler. Because
window.c did not have it, weston-desktop-shell and weston-keyboard
segfaulted on compositor exit, as they received some
wl_registry.global_remove events.
Add more or less stub global_remove handlers, so that clients do not
crash on such events. Toytoolkit and all applications would need a lot
more code to properly handle the global object removal.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
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 handle FAIL_TEST tests by simply inverting the success flag. The
problem with this is, that if a FAIL_TEST fails by a SIGSEGV, it will be
interpreted as passed. However, no code should ever cause a SEGV, or any
other signal than ABRT. And even ABRT only in the case of an assert()
that is meant to fail. We would probably need more sophistication for the
FAIL_TEST cases.
For now, just interpret any other signal than ABRT as a hard failure,
regardless whether it is a TEST or FAIL_TEST. At least segfaults do not
cause false passes anymore.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
The list became stale probably when the lock_layer was introduced. Now
one less (ab)user of weston_surface::link.
Also add a comment on screensaver_configure(), that it is (and has been)
broken for pre-started screensavers.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
To be able to have a fullscreen surface on one output, and interact with
surfaces on another output, don't lower the fullscreen layer on
activate.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
The input region of the black surface placed under the fullscreen shell
surface did not have a specified input region. Because the initial input
region of a surface is infinity, no other surface on any other output
could get any focus.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
In particular if the hash table lookup fails and returns NULL then that value
would be passed into weston_wm_window_schedule_repaint which does not accept a
NULL value.
weston_compositor::read_format is in Pixman values now, so comparing to
a GL value does not work. Compare to the right value.
This fix affects only the log output of the GL renderer.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
When --use-shm is passed to weston and x11 backend is active,
it will use SHM surfaces with pixman renderer instead of EGL
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
This renderer could be used when there's no graphic accelerator available,
for example in (future) KMS and fbdev backends.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
These formats are used by pixman renderer for framebuffer surface, without
this patch screenshoter produces empty image.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Without this we try to load the installed backends, which is nasty for
regular runs, and just doesn't work for make distcheck, which sets
prefix to $PWD/_inst. This makes sure we load the right backend
and make distcheck pass. Other modules (xwayland, shells etc) just don't
get loaded for distcheck and for make check we still try to load the
installed modules.
Call drm_output_init_egl() instead of duplicating the gbm surface and
gl renderer state initialization code.
Note that this makes error handling a bit worse. Before, if we failed
to allocate a gbm surface we could still recover. Failing the renderer
state creation would lead to inconsisten state. Now we end up in
inconsistent state on both cases.