weston/src
Pekka Paalanen d7265bc4ac rpi: add a Dispmanx renderer
Dispmanx is the prorietary display API on the Raspberry Pi, which
provides hardware compositing. Every visible surface is assigned a
Dispmanx element, and the hardware or firmware will do all compositing
onto screen. The API supports translation, scaling, flips, discrete
rotations in 90-degree steps, alpha channel on the surfaces, and
full-surface alpha on top.

Previously, Dispmanx capabilities were used via the weston_plane
mechanism, where surfaces were assigned to planes when possible, and
otherwise transparently falling back to GLESv2 compositing. Because we
have no way to use the same memory buffer as a GL texture and a Dispmanx
resource, we had to prepare for both. In the worst case, that means one GL
texture, and two (double-buffered case) Dispmanx resources, all the size
of a whole surface, for all surfaces. This was eating memory fast. To
make things worse (and less slow), the wl_shm buffer was kept around,
since it was copied to either a texture or a resource as needed. This
caused all clients to need two buffers. In a Dispmanx-only renderer, we
can drop the GL texture, and we can release wl_shm buffer immediately
after the first copy, so clients become effectively single-buffered. So
from the worst case of 5 buffers per surface, we go down to 3 or just
2 (single-buffered Dispmanx element, one wl_shm buffer in the client)
buffers per surface.

As this will replace the GL renderer on rpi, we cannot fall back to the
GLESv2 compositing anymore. We lose arbitrary surface rotation, but we
lose also the GL fallback, which caused glitches.

This patch depends on new RaspberryPi firmware. Older firmware may not
render ARGB surfaces correctly, solid color surfaces maybe cause a
performance hit, and the output may completely fail in case the firmware
does not fall back internal off-line compositing properly as needed.

This new rpi-renderer support surface translation and scaling, but not
rotation or transpose (not even in 90-deg steps). In theory, 90-deg step
surface rotation is possible to support. Output transformations are
supported, but flipped variants do not seem to work right.

As a detail, menus and other surfaces that are simply translated with
respect to another surface caused falling back to the GL renderer. The
rpi-renderer handles them directly.

This patch only adds the new renderer, but does not hook it up into use.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 17:05:45 -04:00
..
xwayland config-parser: Honor XDG_CONFIG_DIRS 2013-05-14 14:36:37 -04:00
.gitignore protocol: add sub-surfaces 2013-05-10 14:05:59 -04:00
animation.c compositor: Adapt to wl_surface going away 2013-05-08 09:54:37 -04:00
bindings.c input: Merge wl_seat into weston_seat 2013-05-07 09:07:43 -04:00
clipboard.c input: Merge wl_seat into weston_seat 2013-05-07 09:07:43 -04:00
cms-colord.c cms-colord: Warn if reading or writing to the FD failed 2013-05-15 11:40:10 -04:00
cms-helper.c Add initial color management framework code 2013-05-10 12:51:08 -04:00
cms-helper.h Add initial color management framework code 2013-05-10 12:51:08 -04:00
cms-static.c cms-static: Use the right wl_listener for the output hotplug listener 2013-05-22 14:20:42 -04:00
compositor-drm.c compositor-drm: Support output scaling 2013-05-22 16:19:59 -04:00
compositor-fbdev.c compositor: Support output/buffer scaling 2013-05-22 16:19:42 -04:00
compositor-headless.c compositor: Support output/buffer scaling 2013-05-22 16:19:42 -04:00
compositor-rdp.c config-parser: Honor XDG_CONFIG_DIRS 2013-05-14 14:36:37 -04:00
compositor-rpi.c compositor: Support output/buffer scaling 2013-05-22 16:19:42 -04:00
compositor-wayland.c compositor: Support output/buffer scaling 2013-05-22 16:19:42 -04:00
compositor-x11.c compositor-x11: Only repaint the damaged region 2013-05-22 16:19:54 -04:00
compositor.c compositor: add capability CAPTURE_YFLIP 2013-05-22 16:56:58 -04:00
compositor.h compositor: add capability CAPTURE_YFLIP 2013-05-22 16:56:58 -04:00
data-device.c input: Move surface picking into the pointer grab focus callback 2013-05-08 22:03:45 -04:00
evdev-touchpad.c evdev-touchpad: Disable tap FSM by default on touchpads with button pads 2013-03-27 15:39:09 -04:00
evdev.c input: Merge wl_seat into weston_seat 2013-05-07 09:07:43 -04:00
evdev.h evdev: Wait for SYN event before sending events over to the client 2013-02-27 15:28:21 -05:00
filter.c Replace fprintf() by weston_log() 2012-06-08 13:11:36 -04:00
filter.h evdev: Improve touchpad support and add motion filters 2012-05-17 11:33:45 -04:00
gl-renderer.c compositor: add capability CAPTURE_YFLIP 2013-05-22 16:56:58 -04:00
gl-renderer.h gl-renderer: make EGL typedefs similar to EGL/egl.h when building without EGL support 2013-01-15 16:00:16 -05:00
input.c input: Move surface picking into the pointer grab focus callback 2013-05-08 22:03:45 -04:00
launcher-util.c weston-launcher: Add missing newline in error message 2013-02-14 13:38:40 -05:00
launcher-util.h Introduce weston-launch 2012-04-06 14:01:19 +02:00
libbacklight.c backlight: Avoid passing an invalid fd into close() 2013-01-10 16:07:42 -05:00
libbacklight.h Fix a few -pedantic warnings 2012-05-10 14:11:44 -04:00
log.c compositor: Fold the log prototypes into compositor.h and drop log.h 2012-08-01 00:00:57 -04:00
Makefile.am rpi: add a Dispmanx renderer 2013-05-22 17:05:45 -04:00
noop-renderer.c renderer: introduce destroy callback 2013-01-08 15:31:08 -05:00
pixman-renderer.c compositor: add capability CAPTURE_YFLIP 2013-05-22 16:56:58 -04:00
pixman-renderer.h renderer: introduce destroy callback 2013-01-08 15:31:08 -05:00
rpi-bcm-stubs.h rpi: add a Dispmanx renderer 2013-05-22 17:05:45 -04:00
rpi-renderer.c rpi: add a Dispmanx renderer 2013-05-22 17:05:45 -04:00
rpi-renderer.h rpi: add a Dispmanx renderer 2013-05-22 17:05:45 -04:00
screenshooter.c compositor: add capability CAPTURE_YFLIP 2013-05-22 16:56:58 -04:00
shell.c compositor: add capability flag for arbitrary surface rotation 2013-05-22 16:46:43 -04:00
tablet-shell.c config-parser: Honor XDG_CONFIG_DIRS 2013-05-14 14:36:37 -04:00
text-backend.c text: Respawn input method process if it exits 2013-05-14 14:55:39 -04:00
tty.c tty: Clean up completely if switching vt fails 2012-12-06 22:32:37 -05:00
udev-seat.c input: Merge wl_seat into weston_seat 2013-05-07 09:07:43 -04:00
udev-seat.h udev-seat: Simplfy enable/disable interface a bit 2013-02-18 16:50:19 -05:00
version.h.in Install header files and pkg-config file for external modules 2013-02-18 15:29:35 -05:00
weston-egl-ext.h weston-egl: Allow compilation against older EGL stack 2013-03-22 10:26:04 -04:00
weston-launch.c weston-launch: Fix failure to exec weston due to initalized argv values 2013-05-22 16:39:36 -04:00
weston-launch.h Introduce weston-launch 2012-04-06 14:01:19 +02:00
weston.pc.in Install header files and pkg-config file for external modules 2013-02-18 15:29:35 -05:00
zoom.c input: Merge wl_seat into weston_seat 2013-05-07 09:07:43 -04:00