2012-10-29 20:19:24 +04:00
|
|
|
/*
|
|
|
|
* Copyright © 2010-2011 Benjamin Franzke
|
|
|
|
* Copyright © 2012 Intel Corporation
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and
|
|
|
|
* its documentation for any purpose is hereby granted without fee, provided
|
|
|
|
* that the above copyright notice appear in all copies and that both that
|
|
|
|
* copyright notice and this permission notice appear in supporting
|
|
|
|
* documentation, and that the name of the copyright holders not be used in
|
|
|
|
* advertising or publicity pertaining to distribution of the software
|
|
|
|
* without specific, written prior permission. The copyright holders make
|
|
|
|
* no representations about the suitability of this software for any
|
|
|
|
* purpose. It is provided "as is" without express or implied warranty.
|
|
|
|
*
|
|
|
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
|
|
|
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
|
|
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
|
|
|
|
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
|
|
|
|
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2013-05-22 19:03:19 +04:00
|
|
|
#include "config.h"
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/time.h>
|
2014-11-20 02:06:17 +03:00
|
|
|
#include <stdbool.h>
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
#include "compositor.h"
|
2014-11-20 02:06:17 +03:00
|
|
|
#include "pixman-renderer.h"
|
compositor: set presentation.presented flags
Change weston_output_finish_frame() signature so that backends are
required to set the flags, that will be reported on the Presentation
'presented' event. This is meant for output-wide feedback flags. Flags
that vary per wl_surface are subject for the following patch.
All start_repaint_loop functions use the special private flag
PRESENTATION_FEEDBACK_INVALID to mark, that this call of
weston_output_finish_frame() cannot trigger the 'presented' event. If it
does, we now hit an assert, and should then investigate why a fake update
triggered Presentation feedback.
DRM:
Page flip is always vsync'd, and always gets the completion timestamp
from the kernel which should correspond well to hardware. Completion is
triggered by the kernel/hardware.
Vblank handler is only used with the broken planes path, therefore do
not report VSYNC, because we cannot guarantee all the planes updated at
the same time. We cannot set the INVALID, because it would abort the
compositor if the broken planes path was ever used. This is a hack that
will get fixed with nuclear pageflip support in the future.
fbdev:
No vsync, update done by copy, no completion event from hardware, and
completion time is totally fake.
headless:
No real output to update.
RDP:
Guessing that maybe no vsync, fake time, and copy make sense (pixels
sent over network). Also no event that the pixels have been shown?
RPI:
Presumably Dispmanx updates are vsync'd. We get a completion event from
the driver, but need to read the clock ourselves, so the completion time
is somewhat unreliable. Zero-copy flag not implemented though it would
be theoretically possible with EGL clients (zero-copy is a per-surface
flag anyway, so in this patch).
Wayland:
No information how the host compositor is doing updates, so make a safe
guess without assuming vsync or hardware completion event. While we do
get some timestamp from the host compositor, it is not the completion
time. Would need to hook to the Presentation extension of the host
compositor to get more accurate flags.
X11:
No idea about vsync, completion event, or copying. Also the timestamp is
a fake.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Acked-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2014-12-17 17:20:40 +03:00
|
|
|
#include "presentation_timing-server-protocol.h"
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
struct headless_compositor {
|
|
|
|
struct weston_compositor base;
|
|
|
|
struct weston_seat fake_seat;
|
2014-11-20 02:06:17 +03:00
|
|
|
bool use_pixman;
|
2012-10-29 20:19:24 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct headless_output {
|
|
|
|
struct weston_output base;
|
|
|
|
struct weston_mode mode;
|
|
|
|
struct wl_event_source *finish_frame_timer;
|
2014-11-20 02:06:17 +03:00
|
|
|
uint32_t *image_buf;
|
|
|
|
pixman_image_t *image;
|
2012-10-29 20:19:24 +04:00
|
|
|
};
|
|
|
|
|
2014-11-20 02:06:17 +03:00
|
|
|
struct headless_parameters {
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int use_pixman;
|
2014-11-20 02:06:18 +03:00
|
|
|
uint32_t transform;
|
2014-11-20 02:06:17 +03:00
|
|
|
};
|
2012-10-29 20:19:24 +04:00
|
|
|
|
2013-04-06 01:07:11 +04:00
|
|
|
static void
|
|
|
|
headless_output_start_repaint_loop(struct weston_output *output)
|
2012-10-29 20:19:24 +04:00
|
|
|
{
|
2014-09-24 06:08:45 +04:00
|
|
|
struct timespec ts;
|
2012-10-29 20:19:24 +04:00
|
|
|
|
2015-03-18 13:17:26 +03:00
|
|
|
weston_compositor_read_presentation_clock(output->compositor, &ts);
|
compositor: set presentation.presented flags
Change weston_output_finish_frame() signature so that backends are
required to set the flags, that will be reported on the Presentation
'presented' event. This is meant for output-wide feedback flags. Flags
that vary per wl_surface are subject for the following patch.
All start_repaint_loop functions use the special private flag
PRESENTATION_FEEDBACK_INVALID to mark, that this call of
weston_output_finish_frame() cannot trigger the 'presented' event. If it
does, we now hit an assert, and should then investigate why a fake update
triggered Presentation feedback.
DRM:
Page flip is always vsync'd, and always gets the completion timestamp
from the kernel which should correspond well to hardware. Completion is
triggered by the kernel/hardware.
Vblank handler is only used with the broken planes path, therefore do
not report VSYNC, because we cannot guarantee all the planes updated at
the same time. We cannot set the INVALID, because it would abort the
compositor if the broken planes path was ever used. This is a hack that
will get fixed with nuclear pageflip support in the future.
fbdev:
No vsync, update done by copy, no completion event from hardware, and
completion time is totally fake.
headless:
No real output to update.
RDP:
Guessing that maybe no vsync, fake time, and copy make sense (pixels
sent over network). Also no event that the pixels have been shown?
RPI:
Presumably Dispmanx updates are vsync'd. We get a completion event from
the driver, but need to read the clock ourselves, so the completion time
is somewhat unreliable. Zero-copy flag not implemented though it would
be theoretically possible with EGL clients (zero-copy is a per-surface
flag anyway, so in this patch).
Wayland:
No information how the host compositor is doing updates, so make a safe
guess without assuming vsync or hardware completion event. While we do
get some timestamp from the host compositor, it is not the completion
time. Would need to hook to the Presentation extension of the host
compositor to get more accurate flags.
X11:
No idea about vsync, completion event, or copying. Also the timestamp is
a fake.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Acked-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2014-12-17 17:20:40 +03:00
|
|
|
weston_output_finish_frame(output, &ts, PRESENTATION_FEEDBACK_INVALID);
|
2013-04-06 01:07:11 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
finish_frame_handler(void *data)
|
|
|
|
{
|
compositor: set presentation.presented flags
Change weston_output_finish_frame() signature so that backends are
required to set the flags, that will be reported on the Presentation
'presented' event. This is meant for output-wide feedback flags. Flags
that vary per wl_surface are subject for the following patch.
All start_repaint_loop functions use the special private flag
PRESENTATION_FEEDBACK_INVALID to mark, that this call of
weston_output_finish_frame() cannot trigger the 'presented' event. If it
does, we now hit an assert, and should then investigate why a fake update
triggered Presentation feedback.
DRM:
Page flip is always vsync'd, and always gets the completion timestamp
from the kernel which should correspond well to hardware. Completion is
triggered by the kernel/hardware.
Vblank handler is only used with the broken planes path, therefore do
not report VSYNC, because we cannot guarantee all the planes updated at
the same time. We cannot set the INVALID, because it would abort the
compositor if the broken planes path was ever used. This is a hack that
will get fixed with nuclear pageflip support in the future.
fbdev:
No vsync, update done by copy, no completion event from hardware, and
completion time is totally fake.
headless:
No real output to update.
RDP:
Guessing that maybe no vsync, fake time, and copy make sense (pixels
sent over network). Also no event that the pixels have been shown?
RPI:
Presumably Dispmanx updates are vsync'd. We get a completion event from
the driver, but need to read the clock ourselves, so the completion time
is somewhat unreliable. Zero-copy flag not implemented though it would
be theoretically possible with EGL clients (zero-copy is a per-surface
flag anyway, so in this patch).
Wayland:
No information how the host compositor is doing updates, so make a safe
guess without assuming vsync or hardware completion event. While we do
get some timestamp from the host compositor, it is not the completion
time. Would need to hook to the Presentation extension of the host
compositor to get more accurate flags.
X11:
No idea about vsync, completion event, or copying. Also the timestamp is
a fake.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Acked-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2014-12-17 17:20:40 +03:00
|
|
|
struct headless_output *output = data;
|
|
|
|
struct timespec ts;
|
|
|
|
|
2015-03-18 13:17:26 +03:00
|
|
|
weston_compositor_read_presentation_clock(output->base.compositor, &ts);
|
compositor: set presentation.presented flags
Change weston_output_finish_frame() signature so that backends are
required to set the flags, that will be reported on the Presentation
'presented' event. This is meant for output-wide feedback flags. Flags
that vary per wl_surface are subject for the following patch.
All start_repaint_loop functions use the special private flag
PRESENTATION_FEEDBACK_INVALID to mark, that this call of
weston_output_finish_frame() cannot trigger the 'presented' event. If it
does, we now hit an assert, and should then investigate why a fake update
triggered Presentation feedback.
DRM:
Page flip is always vsync'd, and always gets the completion timestamp
from the kernel which should correspond well to hardware. Completion is
triggered by the kernel/hardware.
Vblank handler is only used with the broken planes path, therefore do
not report VSYNC, because we cannot guarantee all the planes updated at
the same time. We cannot set the INVALID, because it would abort the
compositor if the broken planes path was ever used. This is a hack that
will get fixed with nuclear pageflip support in the future.
fbdev:
No vsync, update done by copy, no completion event from hardware, and
completion time is totally fake.
headless:
No real output to update.
RDP:
Guessing that maybe no vsync, fake time, and copy make sense (pixels
sent over network). Also no event that the pixels have been shown?
RPI:
Presumably Dispmanx updates are vsync'd. We get a completion event from
the driver, but need to read the clock ourselves, so the completion time
is somewhat unreliable. Zero-copy flag not implemented though it would
be theoretically possible with EGL clients (zero-copy is a per-surface
flag anyway, so in this patch).
Wayland:
No information how the host compositor is doing updates, so make a safe
guess without assuming vsync or hardware completion event. While we do
get some timestamp from the host compositor, it is not the completion
time. Would need to hook to the Presentation extension of the host
compositor to get more accurate flags.
X11:
No idea about vsync, completion event, or copying. Also the timestamp is
a fake.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Acked-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2014-12-17 17:20:40 +03:00
|
|
|
weston_output_finish_frame(&output->base, &ts, 0);
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2013-10-22 19:11:26 +04:00
|
|
|
static int
|
2012-10-29 20:19:24 +04:00
|
|
|
headless_output_repaint(struct weston_output *output_base,
|
|
|
|
pixman_region32_t *damage)
|
|
|
|
{
|
|
|
|
struct headless_output *output = (struct headless_output *) output_base;
|
|
|
|
struct weston_compositor *ec = output->base.compositor;
|
|
|
|
|
|
|
|
ec->renderer->repaint_output(&output->base, damage);
|
|
|
|
|
2012-11-22 17:57:00 +04:00
|
|
|
pixman_region32_subtract(&ec->primary_plane.damage,
|
|
|
|
&ec->primary_plane.damage, damage);
|
|
|
|
|
2012-10-29 20:19:24 +04:00
|
|
|
wl_event_source_timer_update(output->finish_frame_timer, 16);
|
|
|
|
|
2013-10-22 19:11:26 +04:00
|
|
|
return 0;
|
2012-10-29 20:19:24 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
headless_output_destroy(struct weston_output *output_base)
|
|
|
|
{
|
|
|
|
struct headless_output *output = (struct headless_output *) output_base;
|
2014-11-20 02:06:17 +03:00
|
|
|
struct headless_compositor *c =
|
|
|
|
(struct headless_compositor *) output->base.compositor;
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
wl_event_source_remove(output->finish_frame_timer);
|
2014-11-20 02:06:17 +03:00
|
|
|
|
|
|
|
if (c->use_pixman) {
|
|
|
|
pixman_renderer_output_destroy(&output->base);
|
|
|
|
pixman_image_unref(output->image);
|
|
|
|
free(output->image_buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
weston_output_destroy(&output->base);
|
|
|
|
|
2012-10-29 20:19:24 +04:00
|
|
|
free(output);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
headless_compositor_create_output(struct headless_compositor *c,
|
2014-11-20 02:06:18 +03:00
|
|
|
struct headless_parameters *param)
|
2012-10-29 20:19:24 +04:00
|
|
|
{
|
|
|
|
struct headless_output *output;
|
|
|
|
struct wl_event_loop *loop;
|
|
|
|
|
2013-08-08 05:57:05 +04:00
|
|
|
output = zalloc(sizeof *output);
|
2012-10-29 20:19:24 +04:00
|
|
|
if (output == NULL)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
output->mode.flags =
|
|
|
|
WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED;
|
2014-11-20 02:06:18 +03:00
|
|
|
output->mode.width = param->width;
|
|
|
|
output->mode.height = param->height;
|
2014-05-23 13:48:45 +04:00
|
|
|
output->mode.refresh = 60000;
|
2012-10-29 20:19:24 +04:00
|
|
|
wl_list_init(&output->base.mode_list);
|
|
|
|
wl_list_insert(&output->base.mode_list, &output->mode.link);
|
|
|
|
|
2013-09-19 01:56:35 +04:00
|
|
|
output->base.current_mode = &output->mode;
|
2014-11-20 02:06:18 +03:00
|
|
|
weston_output_init(&output->base, &c->base, 0, 0, param->width,
|
|
|
|
param->height, param->transform, 1);
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
output->base.make = "weston";
|
|
|
|
output->base.model = "headless";
|
|
|
|
|
|
|
|
loop = wl_display_get_event_loop(c->base.wl_display);
|
|
|
|
output->finish_frame_timer =
|
|
|
|
wl_event_loop_add_timer(loop, finish_frame_handler, output);
|
|
|
|
|
2013-04-06 01:07:11 +04:00
|
|
|
output->base.start_repaint_loop = headless_output_start_repaint_loop;
|
2012-10-29 20:19:24 +04:00
|
|
|
output->base.repaint = headless_output_repaint;
|
|
|
|
output->base.destroy = headless_output_destroy;
|
|
|
|
output->base.assign_planes = NULL;
|
|
|
|
output->base.set_backlight = NULL;
|
|
|
|
output->base.set_dpms = NULL;
|
|
|
|
output->base.switch_mode = NULL;
|
|
|
|
|
2014-11-20 02:06:17 +03:00
|
|
|
if (c->use_pixman) {
|
2014-11-20 02:06:18 +03:00
|
|
|
output->image_buf = malloc(param->width * param->height * 4);
|
2014-11-20 02:06:17 +03:00
|
|
|
if (!output->image_buf)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
output->image = pixman_image_create_bits(PIXMAN_x8r8g8b8,
|
2014-11-20 02:06:18 +03:00
|
|
|
param->width,
|
|
|
|
param->height,
|
2014-11-20 02:06:17 +03:00
|
|
|
output->image_buf,
|
2014-11-20 02:06:18 +03:00
|
|
|
param->width * 4);
|
2014-11-20 02:06:17 +03:00
|
|
|
|
|
|
|
if (pixman_renderer_output_create(&output->base) < 0)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
pixman_renderer_output_set_buffer(&output->base,
|
|
|
|
output->image);
|
|
|
|
}
|
|
|
|
|
2015-05-06 21:41:57 +03:00
|
|
|
weston_compositor_add_output(&c->base, &output->base);
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-02-07 12:34:43 +04:00
|
|
|
static int
|
|
|
|
headless_input_create(struct headless_compositor *c)
|
|
|
|
{
|
|
|
|
weston_seat_init(&c->fake_seat, &c->base, "default");
|
|
|
|
|
|
|
|
weston_seat_init_pointer(&c->fake_seat);
|
|
|
|
|
|
|
|
if (weston_seat_init_keyboard(&c->fake_seat, NULL) < 0)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
headless_input_destroy(struct headless_compositor *c)
|
|
|
|
{
|
|
|
|
weston_seat_release(&c->fake_seat);
|
|
|
|
}
|
|
|
|
|
2012-10-29 20:19:24 +04:00
|
|
|
static void
|
|
|
|
headless_restore(struct weston_compositor *ec)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
headless_destroy(struct weston_compositor *ec)
|
|
|
|
{
|
|
|
|
struct headless_compositor *c = (struct headless_compositor *) ec;
|
|
|
|
|
2014-02-07 12:34:43 +04:00
|
|
|
headless_input_destroy(c);
|
2012-10-29 20:19:24 +04:00
|
|
|
weston_compositor_shutdown(ec);
|
|
|
|
|
|
|
|
free(ec);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct weston_compositor *
|
|
|
|
headless_compositor_create(struct wl_display *display,
|
2014-11-20 02:06:17 +03:00
|
|
|
struct headless_parameters *param,
|
|
|
|
const char *display_name,
|
2013-05-27 05:48:14 +04:00
|
|
|
int *argc, char *argv[],
|
|
|
|
struct weston_config *config)
|
2012-10-29 20:19:24 +04:00
|
|
|
{
|
|
|
|
struct headless_compositor *c;
|
|
|
|
|
2013-08-08 05:57:05 +04:00
|
|
|
c = zalloc(sizeof *c);
|
2012-10-29 20:19:24 +04:00
|
|
|
if (c == NULL)
|
|
|
|
return NULL;
|
|
|
|
|
2013-05-27 05:48:14 +04:00
|
|
|
if (weston_compositor_init(&c->base, display, argc, argv, config) < 0)
|
2012-10-29 20:19:24 +04:00
|
|
|
goto err_free;
|
|
|
|
|
2014-09-24 06:08:45 +04:00
|
|
|
if (weston_compositor_set_presentation_clock_software(&c->base) < 0)
|
|
|
|
goto err_compositor;
|
|
|
|
|
2014-02-07 12:34:43 +04:00
|
|
|
if (headless_input_create(c) < 0)
|
|
|
|
goto err_compositor;
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
c->base.destroy = headless_destroy;
|
|
|
|
c->base.restore = headless_restore;
|
|
|
|
|
2014-11-20 02:06:17 +03:00
|
|
|
c->use_pixman = param->use_pixman;
|
|
|
|
if (c->use_pixman) {
|
|
|
|
pixman_renderer_init(&c->base);
|
|
|
|
}
|
2014-11-20 02:06:18 +03:00
|
|
|
if (headless_compositor_create_output(c, param) < 0)
|
2014-02-07 12:34:43 +04:00
|
|
|
goto err_input;
|
2012-10-29 20:19:24 +04:00
|
|
|
|
2014-11-20 02:06:17 +03:00
|
|
|
if (!c->use_pixman && noop_renderer_init(&c->base) < 0)
|
2014-02-07 12:34:43 +04:00
|
|
|
goto err_input;
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
return &c->base;
|
|
|
|
|
2014-02-07 12:34:43 +04:00
|
|
|
err_input:
|
|
|
|
headless_input_destroy(c);
|
2012-10-29 20:19:24 +04:00
|
|
|
err_compositor:
|
|
|
|
weston_compositor_shutdown(&c->base);
|
|
|
|
err_free:
|
|
|
|
free(c);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
WL_EXPORT struct weston_compositor *
|
2013-02-21 00:27:49 +04:00
|
|
|
backend_init(struct wl_display *display, int *argc, char *argv[],
|
2013-05-27 05:48:14 +04:00
|
|
|
struct weston_config *config)
|
2012-10-29 20:19:24 +04:00
|
|
|
{
|
|
|
|
int width = 1024, height = 640;
|
|
|
|
char *display_name = NULL;
|
2014-11-20 02:06:17 +03:00
|
|
|
struct headless_parameters param = { 0, };
|
2014-11-20 02:06:18 +03:00
|
|
|
const char *transform = "normal";
|
2012-10-29 20:19:24 +04:00
|
|
|
|
|
|
|
const struct weston_option headless_options[] = {
|
|
|
|
{ WESTON_OPTION_INTEGER, "width", 0, &width },
|
|
|
|
{ WESTON_OPTION_INTEGER, "height", 0, &height },
|
2014-11-20 02:06:17 +03:00
|
|
|
{ WESTON_OPTION_BOOLEAN, "use-pixman", 0, ¶m.use_pixman },
|
2014-11-20 02:06:18 +03:00
|
|
|
{ WESTON_OPTION_STRING, "transform", 0, &transform },
|
2012-10-29 20:19:24 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
parse_options(headless_options,
|
|
|
|
ARRAY_LENGTH(headless_options), argc, argv);
|
|
|
|
|
2014-11-20 02:06:17 +03:00
|
|
|
param.width = width;
|
|
|
|
param.height = height;
|
|
|
|
|
2014-11-20 02:06:18 +03:00
|
|
|
if (weston_parse_transform(transform, ¶m.transform) < 0)
|
|
|
|
weston_log("Invalid transform \"%s\"\n", transform);
|
|
|
|
|
2014-11-20 02:06:17 +03:00
|
|
|
return headless_compositor_create(display, ¶m, display_name,
|
2013-05-27 05:48:14 +04:00
|
|
|
argc, argv, config);
|
2012-10-29 20:19:24 +04:00
|
|
|
}
|