summaryrefslogtreecommitdiff
path: root/compositor
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2019-09-20 14:35:58 +0300
committerPekka Paalanen <pq@iki.fi>2019-10-11 12:16:35 +0000
commitc57a8cccd3e89170b503b597830b91b94ba2e518 (patch)
treee3c104f80b1578627dc5720faa94b4d4b4929369 /compositor
parent5104d7b2afd4980da71370c27b7f79a441759f30 (diff)
compositor: add use-gl option to headless
This will allow one to run the headless backend with GL-renderer. Implements: https://gitlab.freedesktop.org/wayland/weston/issues/278 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Diffstat (limited to 'compositor')
-rw-r--r--compositor/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/compositor/main.c b/compositor/main.c
index 4dd11c9d..28f13e0b 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -680,6 +680,7 @@ usage(int error_code)
" --transform=TR\tThe output transformation, TR is one of:\n"
"\tnormal 90 180 270 flipped flipped-90 flipped-180 flipped-270\n"
" --use-pixman\t\tUse the pixman (CPU) renderer (default: no rendering)\n"
+ " --use-gl\t\tUse the GL renderer (default: no rendering)\n"
" --no-outputs\t\tDo not create any virtual outputs\n"
"\n");
#endif
@@ -2554,6 +2555,8 @@ load_headless_backend(struct weston_compositor *c,
char *transform = NULL;
int32_t use_pixman_config_ = 0;
int use_pixman_ = 0;
+ int32_t use_gl_config_ = 0;
+ int use_gl_ = 0;
struct wet_output_config *parsed_options = wet_init_parsed_options(c);
if (!parsed_options)
@@ -2563,17 +2566,22 @@ load_headless_backend(struct weston_compositor *c,
weston_config_section_get_bool(section, "use-pixman", &use_pixman_config_,
use_pixman_config_);
use_pixman_ = use_pixman_config_;
+ weston_config_section_get_bool(section, "use-gl", &use_gl_config_,
+ use_gl_config_);
+ use_gl_ = use_gl_config_;
const struct weston_option options[] = {
{ WESTON_OPTION_INTEGER, "width", 0, &parsed_options->width },
{ WESTON_OPTION_INTEGER, "height", 0, &parsed_options->height },
{ WESTON_OPTION_BOOLEAN, "use-pixman", 0, &use_pixman_ },
+ { WESTON_OPTION_BOOLEAN, "use-gl", 0, &use_gl_ },
{ WESTON_OPTION_STRING, "transform", 0, &transform },
{ WESTON_OPTION_BOOLEAN, "no-outputs", 0, &no_outputs },
};
parse_options(options, ARRAY_LENGTH(options), argc, argv);
config.use_pixman = use_pixman_;
+ config.use_gl = use_gl_;
if (transform) {
if (weston_parse_transform(transform, &parsed_options->transform) < 0) {