fbdev: Add an fbdev compositor backend using pixman and evdev

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>
Philip Withnall 12 years ago committed by Kristian Høgsberg
parent 4174791d9e
commit 4f49917ec5
  1. 10
      configure.ac
  2. 24
      src/Makefile.am
  3. 1178
      src/compositor-fbdev.c

@ -142,6 +142,16 @@ fi
AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes")
AC_ARG_ENABLE([fbdev-compositor], [ --enable-fbdev-compositor],,
enable_fbdev_compositor=yes)
AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
[test x$enable_fbdev_compositor = xyes])
AS_IF([test x$enable_fbdev_compositor = xyes], [
AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
])
AC_ARG_WITH(cairo-glesv2,
AS_HELP_STRING([--with-cairo-glesv2],
[Use GLESv2 cairo instead of full GL]))

@ -84,7 +84,8 @@ module_LTLIBRARIES = \
$(x11_backend) \
$(drm_backend) \
$(wayland_backend) \
$(headless_backend)
$(headless_backend) \
$(fbdev_backend)
noinst_LTLIBRARIES =
@ -175,6 +176,27 @@ headless_backend_la_CFLAGS = \
headless_backend_la_SOURCES = compositor-headless.c
endif
if ENABLE_FBDEV_COMPOSITOR
fbdev_backend = fbdev-backend.la
fbdev_backend_la_LDFLAGS = -module -avoid-version
fbdev_backend_la_LIBADD = \
$(COMPOSITOR_LIBS) \
$(FBDEV_COMPOSITOR_LIBS) \
../shared/libshared.la
fbdev_backend_la_CFLAGS = \
$(COMPOSITOR_CFLAGS) \
$(FBDEV_COMPOSITOR_CFLAGS) \
$(PIXMAN_CFLAGS) \
$(GCC_CFLAGS)
fbdev_backend_la_SOURCES = \
compositor-fbdev.c \
tty.c \
evdev.c \
evdev.h \
evdev-touchpad.c \
launcher-util.c
endif
if ENABLE_DESKTOP_SHELL
desktop_shell = desktop-shell.la
desktop_shell_la_LDFLAGS = -module -avoid-version

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save