compositor: add scale cmdline option for headless
authorPekka Paalanen <pekka.paalanen@collabora.com>
Wed, 22 Jan 2020 09:33:34 +0000 (11:33 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.com>
Thu, 27 Feb 2020 14:08:42 +0000 (16:08 +0200)
The test suite wants to start using different output scales, and this is the
easiest API to configure it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
compositor/main.c

index d5a7f04efdfcddbfec7ba589a5b0469be2758e06..7fbbb574deb09914b2ca45372688408a5fb99496 100644 (file)
@@ -687,6 +687,7 @@ usage(int error_code)
                "Options for headless-backend.so:\n\n"
                "  --width=WIDTH\t\tWidth of memory surface\n"
                "  --height=HEIGHT\tHeight of memory surface\n"
+               "  --scale=SCALE\t\tScale factor of output\n"
                "  --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"
@@ -2567,6 +2568,7 @@ load_headless_backend(struct weston_compositor *c,
        const struct weston_option options[] = {
                { WESTON_OPTION_INTEGER, "width", 0, &parsed_options->width },
                { WESTON_OPTION_INTEGER, "height", 0, &parsed_options->height },
+               { WESTON_OPTION_INTEGER, "scale", 0, &parsed_options->scale },
                { WESTON_OPTION_BOOLEAN, "use-pixman", 0, &config.use_pixman },
                { WESTON_OPTION_BOOLEAN, "use-gl", 0, &config.use_gl },
                { WESTON_OPTION_STRING, "transform", 0, &transform },