pixman: make shadow buffer optional
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 23 Apr 2018 09:44:57 +0000 (11:44 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 24 May 2018 14:20:04 +0000 (17:20 +0300)
commit26ded94aa0969f826b296cde3a40deb1871811de
treea567bd77fe600c3f5dc4a453a63f2eebce034adb
parentacf50c3d96a5ab7b393a064e10b6e4affbd7236f
pixman: make shadow buffer optional

Add a flag to pixman-renderer for initializing the output with a shadow
framebuffer. All backends were getting the shadow implcitly, so all
backends are modified to ask for the shadow explicitly.

Using a shadow buffer is usually beneficial, because read-modify-write
cycles (blending) into a scanout-capable buffer may be very slow. The
scanout framebuffer may also have reduced color depth, making blending
and read-back produce inferior results.

In some use cases though the shadow buffer might be just an extra copy
hurting more than it helps. Whether it helps or hurts depends on the
platform and the workload. Therefore let the backends control whether
pixman-renderer uses a shadow buffer for an output or not.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Reviewed-by: Ian Ray <ian.ray@ge.com>
libweston/compositor-drm.c
libweston/compositor-fbdev.c
libweston/compositor-headless.c
libweston/compositor-rdp.c
libweston/compositor-wayland.c
libweston/compositor-x11.c
libweston/pixman-renderer.c
libweston/pixman-renderer.h