main: add setting for DRM/pixman shadow framebuffer
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 23 Apr 2018 09:44:59 +0000 (11:44 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 24 May 2018 14:20:04 +0000 (17:20 +0300)
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>
Reviewed-by: Ian Ray <ian.ray@ge.com>
compositor/main.c
man/weston-drm.man

index 54fa312f6dd410f58c6b183d10e1aed75c66a304..1092204f853891aafcf10741c276511e0da78e23 100644 (file)
@@ -1286,6 +1286,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;
@@ -1306,6 +1307,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);
index 6518563adc36678641f7793d830a1bc33f32f781..d4cb75a77bbcc73c66a5454ffcd8ea6aadbf962a 100644 (file)
@@ -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