summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2021-04-21 15:48:42 +0300
committerMarius Vlad <marius.vlad@collabora.com>2021-04-21 15:48:42 +0300
commit1eeb38c6f9353b7aa5596a561a3e5d70b465060b (patch)
treea05a7bdc0c53146d1a92f8d94e390d44c9d98572
parent0bef8700f21b9e7898f1785ee654d4669d0117b4 (diff)
compositor,main: Update to libweston9
This updates transform definitions, passing testsuite_data and logger/log context init/destroy bit. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7fe427fa234d38ca3ac8e1cf3ca208f1cd025e7a
-rw-r--r--meson.build4
-rw-r--r--src/compositor.c39
-rw-r--r--src/main.c2
3 files changed, 21 insertions, 24 deletions
diff --git a/meson.build b/meson.build
index 27fb2d0..95d87c2 100644
--- a/meson.build
+++ b/meson.build
@@ -11,7 +11,7 @@ project('agl-compositor',
config_h = configuration_data()
agl_compositor_version = '0.0.19'
-libweston_version = 'libweston-8'
+libweston_version = 'libweston-9'
pkgconfig = import('pkgconfig')
cc = meson.get_compiler('c')
@@ -154,7 +154,7 @@ libweston_dep = dependency(libweston_version)
deps_libweston = [
dependency('wayland-server'),
libweston_dep,
- dependency('libweston-desktop-8'),
+ dependency('libweston-desktop-9'),
local_dep,
]
diff --git a/src/compositor.c b/src/compositor.c
index 22c4979..ac579bf 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -299,14 +299,14 @@ static int
parse_transform(const char *transform, uint32_t *out)
{
static const struct { const char *name; uint32_t token; } transforms[] = {
- { "normal", WL_OUTPUT_TRANSFORM_NORMAL },
- { "90", WL_OUTPUT_TRANSFORM_90 },
- { "180", WL_OUTPUT_TRANSFORM_180 },
- { "270", WL_OUTPUT_TRANSFORM_270 },
- { "flipped", WL_OUTPUT_TRANSFORM_FLIPPED },
- { "flipped-90", WL_OUTPUT_TRANSFORM_FLIPPED_90 },
- { "flipped-180", WL_OUTPUT_TRANSFORM_FLIPPED_180 },
- { "flipped-270", WL_OUTPUT_TRANSFORM_FLIPPED_270 },
+ { "normal", WL_OUTPUT_TRANSFORM_NORMAL },
+ { "rotate-90", WL_OUTPUT_TRANSFORM_90 },
+ { "rotate-180", WL_OUTPUT_TRANSFORM_180 },
+ { "rotate-270", WL_OUTPUT_TRANSFORM_270 },
+ { "flipped", WL_OUTPUT_TRANSFORM_FLIPPED },
+ { "flipped-rotate-90", WL_OUTPUT_TRANSFORM_FLIPPED_90 },
+ { "flipped-rotate-180", WL_OUTPUT_TRANSFORM_FLIPPED_180 },
+ { "flipped-rotate-270", WL_OUTPUT_TRANSFORM_FLIPPED_270 },
};
for (size_t i = 0; i < ARRAY_LENGTH(transforms); i++)
@@ -1563,7 +1563,7 @@ copy_command_line(int argc, char * const argv[])
}
WL_EXPORT
-int wet_main(int argc, char *argv[])
+int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data)
{
struct ivi_compositor ivi = { 0 };
char *cmdline;
@@ -1622,15 +1622,15 @@ int wet_main(int argc, char *argv[])
return EXIT_SUCCESS;
}
- log_ctx = weston_log_ctx_compositor_create();
+ log_ctx = weston_log_ctx_create();
if (!log_ctx) {
fprintf(stderr, "Failed to initialize weston debug framework.\n");
return ret;
}
- log_scope = weston_compositor_add_log_scope(log_ctx, "log",
- "agl-compositor log\n",
- NULL, NULL, NULL);
+ log_scope = weston_log_ctx_add_log_scope(log_ctx, "log",
+ "agl-compositor log\n",
+ NULL, NULL, NULL);
log_file_open(log);
weston_log_set_handler(vlog, vlog_continue);
@@ -1673,7 +1673,7 @@ int wet_main(int argc, char *argv[])
if (!signals[i])
goto error_signals;
- ivi.compositor = weston_compositor_create(display, log_ctx, &ivi);
+ ivi.compositor = weston_compositor_create(display, log_ctx, &ivi, test_data);
if (!ivi.compositor) {
weston_log("fatal: failed to create compositor.\n");
goto error_signals;
@@ -1742,15 +1742,12 @@ int wet_main(int argc, char *argv[])
wl_display_destroy_clients(display);
error_compositor:
- weston_compositor_tear_down(ivi.compositor);
-
- weston_compositor_log_scope_destroy(log_scope);
- log_scope = NULL;
-
- weston_log_ctx_compositor_destroy(ivi.compositor);
weston_compositor_destroy(ivi.compositor);
+ weston_log_scope_destroy(log_scope);
+ log_scope = NULL;
- weston_log_subscriber_destroy_log(logger);
+ weston_log_subscriber_destroy(logger);
+ weston_log_ctx_destroy(log_ctx);
ivi_policy_destroy(ivi.policy);
diff --git a/src/main.c b/src/main.c
index 5d192b0..d1390f0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -28,5 +28,5 @@
int main(int argc, char *argv[])
{
- return wet_main(argc, argv);
+ return wet_main(argc, argv, NULL);
}