[weston,4/4] main: add setting for DRM/pixman shadow framebuffer

Submitted by Fabien Lahoudere on April 23, 2018, 8:29 a.m.

Details

Message ID 1524472161-3385-5-git-send-email-fabien.lahoudere@collabora.com
State Accepted
Commit 325ff4cba1e9c9bc15c36b960cf892c7633ce4dd
Headers show
Series "Optimize pixman renderer" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Fabien Lahoudere April 23, 2018, 8:29 a.m.
From: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

Allows to control the Pixman-renderer shadow framebuffer usage from
weston.ini. It defaults to enabled, and whether it is a good idea to
disable or not depends on the platform and the workload.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
---
 compositor/main.c  | 3 +++
 man/weston-drm.man | 4 ++++
 2 files changed, 7 insertions(+)

Patch hide | download patch | download mbox

diff --git a/compositor/main.c b/compositor/main.c
index f72d3ea..9a65e69 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -1283,6 +1283,7 @@  load_drm_backend(struct weston_compositor *c,
 	struct weston_drm_backend_config config = {{ 0, }};
 	struct weston_config_section *section;
 	struct wet_compositor *wet = to_wet_compositor(c);
+	int use_shadow;
 	int ret = 0;
 
 	wet->drm_use_current_mode = false;
@@ -1303,6 +1304,8 @@  load_drm_backend(struct weston_compositor *c,
 					 NULL);
 	weston_config_section_get_uint(section, "pageflip-timeout",
 	                               &config.pageflip_timeout, 0);
+	weston_config_section_get_bool(section, "pixman-shadow", &use_shadow, 1);
+	config.use_pixman_shadow = use_shadow;
 
 	config.base.struct_version = WESTON_DRM_BACKEND_CONFIG_VERSION;
 	config.base.struct_size = sizeof(struct weston_drm_backend_config);
diff --git a/man/weston-drm.man b/man/weston-drm.man
index 75d7902..f488c87 100644
--- a/man/weston-drm.man
+++ b/man/weston-drm.man
@@ -79,6 +79,10 @@  Transform for the output, which can be rotated in 90-degree steps
 and possibly flipped. Possible values are
 .BR normal ", " 90 ", " 180 ", " 270 ", "
 .BR flipped ", " flipped-90 ", " flipped-180 ", and " flipped-270 .
+.TP
+\fBpixman-shadow\fR=\fIboolean\fR
+If using the Pixman-renderer, use shadow framebuffers. Defaults to
+.BR true .
 .
 .\" ***************************************************************
 .SH OPTIONS