[PATCH 6/6] cms-helper/static: Add "identity" builtin cms profile
Allows to force loading an identity gamma table if option icc_profile=identity is given in weston.ini for an output. Some special display output devices, e.g., for neuro-science applications, and special display testing hardware need a guaranteed perfect pixel passthrough from framebuffer to output. This is an easy way to set this up for cms-static. Signed-off-by: Mario Kleiner --- src/cms-helper.c | 1 + src/cms-static.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cms-helper.c b/src/cms-helper.c index b586847..565b7d7 100644 --- a/src/cms-helper.c +++ b/src/cms-helper.c @@ -48,6 +48,7 @@ weston_cms_gamma_clear(struct weston_output *o) red[i] = (uint32_t) 0x * (uint32_t) i / (uint32_t) (o->gamma_size - 1); o->set_gamma(o, o->gamma_size, red, red, red); free(red); + weston_log("Gamma tables set to identity mapping for output %s\n", o->name); } #endif diff --git a/src/cms-static.c b/src/cms-static.c index ad54fd1..21856fe 100644 --- a/src/cms-static.c +++ b/src/cms-static.c @@ -52,7 +52,7 @@ cms_output_created(struct cms_static *cms, struct weston_output *o) if (weston_config_section_get_string(s, "icc_profile", &profile, NULL) < 0) return; p = weston_cms_load_profile(profile); - if (p == NULL) { + if (p == NULL && strcmp(profile, "identity")) { weston_log("cms-static: failed to load %s\n", profile); } else { weston_log("cms-static: loading %s for %s\n", -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 5/6] compositor-drm: Fix refresh rate selection in drm_output_switch_mode
The matching logic in choose_mode() compared refresh rate of a drm_mode candidate mode expressed in Hz against the requested refresh rate of the target weston_mode expressed in milliHz, so the match always failed and the logic always ended up the mode with the highest refresh rate for a given resolution, instead of the one matching the requested rate. Match proper fields to fix this. Signed-off-by: Mario Kleiner --- src/compositor-drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 9ddb6d6..396938f 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -1270,7 +1270,7 @@ choose_mode (struct drm_output *output, struct weston_mode *target_mode) wl_list_for_each(mode, &output->base.mode_list, base.link) { if (mode->mode_info.hdisplay == target_mode->width && mode->mode_info.vdisplay == target_mode->height) { - if (mode->mode_info.vrefresh == target_mode->refresh || + if (mode->base.refresh == target_mode->refresh || target_mode->refresh == 0) { return mode; } else if (!tmp_mode) -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 4/6] compositor-drm/shell: Allow restore_output_mode() to work properly.
Initialize output->native_mode with the initially chosen mode for an output, so restore_output_mode() has something to work with and can switch back from temporary selected modes to the outputs native mode. Before, this was a no-op. This allows an output to switch back to its default mode if a former toplevel fullscreen shell surface created via method WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER gets destroyed, or demoted to non-fullscreen, or if modesetting on the output failed. Also fix desktop-shell's activate method to only restore output mode on the output on which a shell surface gets activated. This way fullscreen windows can mode switch their output, but window switching and exposay still works in the expected way. Signed-off-by: Mario Kleiner --- desktop-shell/shell.c | 3 ++- src/compositor-drm.c | 4 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 7d0e403..68846ed 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2962,6 +2962,7 @@ shell_configure_fullscreen(struct shell_surface *shsurf) output->y - surf_y); break; } else { + weston_log("shell: Can't switch to temporary mode.\n"); restore_output_mode(output); center_on_output(shsurf->view, output); } @@ -5089,7 +5090,7 @@ activate(struct desktop_shell *shell, struct weston_surface *es, if (shsurf->state.fullscreen && configure) shell_configure_fullscreen(shsurf); else - restore_all_output_modes(shell->compositor); + restore_output_mode(shsurf->output); /* Update the surface’s layer. This brings it to the top of the stacking * order as appropriate. */ diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 4a7baa1..9ddb6d6 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -2209,6 +2209,10 @@ create_output_for_connector(struct drm_compositor *ec, connector->count_modes == 0 ? ", built-in" : ""); + /* Initialize output->native_mode field, so restore_output_mode() works. */ + weston_output_mode_set_native(&output->base, output->base.current_mode, + output->base.current_scale); + return 0; err_output: -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 3/6] desktop-shell: Allow multiple active fullscreen windows on multi-display setup.
Desktop shell demoted all fullscreen shell surfaces on all active outputs of a multi-display setup whenever any shell surface was activated anywhere. This made it impossible to have multiple fullscreen windows on separate outputs active at the same time, as creating or activating any shell surface would disable fullscreen status for all existing fullscreen surfaces. Make lower_fullscreen_layer() more selective, so on request it only demotes fullscreen surfaces on a specified weston_output. The activate() method for a specific surface will now only request demotion of fullscreen surfaces on the target output of the activated surface, but leave fullscreen surfaces on unrelated outputs alone. Desktop wide acting functions like the window switcher or exposay will still demote all fullscreen surfaces on all outputs to implement their effect as before. Signed-off-by: Mario Kleiner --- desktop-shell/exposay.c | 2 +- desktop-shell/shell.c | 47 +++ desktop-shell/shell.h | 3 ++- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c index 4b65cbd..a15fc7a 100644 --- a/desktop-shell/exposay.c +++ b/desktop-shell/exposay.c @@ -563,7 +563,7 @@ exposay_transition_active(struct desktop_shell *shell) shell->exposay.clicked = NULL; wl_list_init(&shell->exposay.surface_list); - lower_fullscreen_layer(shell); + lower_fullscreen_layer(shell, NULL); shell->exposay.grab_kbd.interface = &exposay_kbd_grab; weston_keyboard_start_grab(seat->keyboard, &shell->exposay.grab_kbd); diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index f7c928e..7d0e403 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -303,17 +303,29 @@ static bool shell_surface_is_top_fullscreen(struct shell_surface *shsurf) { struct desktop_shell *shell; - struct weston_view *top_fs_ev; + struct weston_view *view; + struct shell_surface *top_fs_shsurf = NULL; shell = shell_surface_get_shell(shsurf); if (wl_list_empty(&shell->fullscreen_layer.view_list.link)) return false; - top_fs_ev = container_of(shell->fullscreen_layer.view_list.link.next, -struct weston_view, -layer_link.link); - return (shsurf == get_shell_surface(top_fs_ev->surface)); + /* Find topmost shsurf on the same fullscreen output on which shsurf +* is displaying. We don't care about other outputs. +*/ + wl_list_for_each(view, &shell->fullscreen_layer.view_list.link, +layer_link.link) { + struct shell_surface *cand_shsurf = get_shell_surface(view->surface); + + if (cand_shsurf && + (cand_shsurf->fullscreen_output == shsurf->fullscreen_output)) { + top_fs_shsurf = cand_shsurf; + break; + } + } + + return (shsurf == top_fs_shsurf); } static void @@ -5000,10 +5012,14 @@ rotate_binding(struct weston_seat *seat, uint32_t time, uint32_t button, * and this is reversed when such a surface is re-configured, see * shell_configure_fullscreen() and shell_ensure_fullscreen_black_view(). * + * lowering_output = NULL - Lower on all outputs, else only lower on the + * specified output. + * * This should be used when implementing shell-wide overlays, such as * the alt-tab switcher, which need to de-promote fullscreen layers. */ void -lower_fullscreen_layer(struct desktop_shell *shell) +lower_fullscreen_layer(struct desktop_shell *shell, + struct weston_output *lowering_output) { struct workspace *ws; struct weston_view *view, *prev; @@ -5017,6 +5033,12 @@ lower_fullscreen_layer(struct desktop_shell *shell) if (!shsurf) continue; + /* Only lower surfaces which have lowering_output as their fullscreen +* output, unless a NULL output asks for lowering on all outputs. +*/ + if (lowering_output && (shsurf->fullscreen_output != lowering_output)) + continue; + /* We can have a non-fullscreen popup for a fullscreen surface * in the fullscreen layer. */ if (shsurf->state.fullscreen) { @@ -5047,9 +5069,13 @@ activate(struct desktop_shell *shell, struct weston_surface *es, struct weston_surface *old_es; struct shell_surface *shsurf; - lower_fullscreen_layer(shell); - main_surface = weston_surface_get_main_surface(es); + shsurf = get_shell_surface(main_surface); + assert(shsurf); + + /* Only demote fullscreen surfaces on the output of activated shsurf. +* Leave fu
[PATCH 1/6] compositor-drm: Handle more than two output crtcs per card
Allow proper handling of output->pipe > 1 to support triple-head graphics cards etc. by using the "high-crtc" support introduced in Linux 2.6.39 and libdrm 2.4.25 around May 2011. Signed-off-by: Mario Kleiner --- src/compositor-drm.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 43197a8..fe59811 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -593,6 +593,17 @@ drm_output_set_gamma(struct weston_output *output_base, weston_log("set gamma failed: %m\n"); } +static unsigned int drm_waitvblank_pipe(struct drm_output *output) +{ + if (output->pipe > 1) + return (output->pipe << DRM_VBLANK_HIGH_CRTC_SHIFT) & + DRM_VBLANK_HIGH_CRTC_MASK; + else if (output->pipe > 0) + return DRM_VBLANK_SECONDARY; + else + return 0; +} + static int drm_output_repaint(struct weston_output *output_base, pixman_region32_t *damage) @@ -664,8 +675,7 @@ drm_output_repaint(struct weston_output *output_base, weston_log("setplane failed: %d: %s\n", ret, strerror(errno)); - if (output->pipe > 0) - vbl.request.type |= DRM_VBLANK_SECONDARY; + vbl.request.type |= drm_waitvblank_pipe(output); /* * Queue a vblank signal so we know when the surface -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 2/6] compositor-drm: Allow instant start of repaint loop.
drm_output_start_repaint_loop() incurred a delay of one refresh cycle by using a no-op page-flip to get an accurate vblank timestamp as reference. This causes unwanted lag whenever Weston exited its repaint loop, e.g., whenever an application wants to repaint with less than full video refresh rate but still minimum lag. Try to use the drmWaitVblank ioctl to get a proper timestamp instantaneously without lag. If that does not work, fall back to the old method of idle page-flip. This optimization should work on any drm/kms driver which supports high precision vblank timestamping. As of Linux 4.0 these would be intel, radeon and nouveau on all supported gpu's. Signed-off-by: Mario Kleiner --- src/compositor-drm.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index fe59811..4a7baa1 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -225,6 +225,9 @@ static const char default_seat[] = "seat0"; static void drm_output_set_cursor(struct drm_output *output); +static void +drm_output_update_msc(struct drm_output *output, unsigned int seq); + static int drm_sprite_crtc_supported(struct drm_output *output, uint32_t supported) { @@ -704,6 +707,12 @@ err_pageflip: return -1; } +static int64_t +timespec_to_nsec(const struct timespec *a) +{ + return (int64_t)a->tv_sec * 1LL + a->tv_nsec; +} + static void drm_output_start_repaint_loop(struct weston_output *output_base) { @@ -711,7 +720,13 @@ drm_output_start_repaint_loop(struct weston_output *output_base) struct drm_compositor *compositor = (struct drm_compositor *) output_base->compositor; uint32_t fb_id; - struct timespec ts; + struct timespec ts, tnow; + int ret; + drmVBlank vbl = { + .request.type = DRM_VBLANK_RELATIVE, + .request.sequence = 0, + .request.signal = 0, + }; if (output->destroy_pending) return; @@ -721,6 +736,30 @@ drm_output_start_repaint_loop(struct weston_output *output_base) goto finish_frame; } + /* Try to get current msc and timestamp via instant query */ + vbl.request.type |= drm_waitvblank_pipe(output); + ret = drmWaitVBlank(compositor->drm.fd, &vbl); + + /* Error return or zero timestamp means failure to get valid timestamp */ + if ((ret == 0) && (vbl.reply.tval_sec > 0)) { + ts.tv_sec = vbl.reply.tval_sec; + ts.tv_nsec = vbl.reply.tval_usec * 1000; + + /* Valid timestamp for most recent vblank - not stale? Stale ts could +* happen on Linux 3.17+, so make sure it is not older than 1 refresh +* duration since now. +*/ + weston_compositor_read_presentation_clock(&compositor->base, &tnow); + if (timespec_to_nsec(&tnow) - timespec_to_nsec(&ts) < + (1LL / output_base->current_mode->refresh)) { + drm_output_update_msc(output, vbl.reply.sequence); + weston_output_finish_frame(output_base, &ts, + PRESENTATION_FEEDBACK_INVALID); + return; + } + } + + /* Immediate query didn't provide valid timestamp. Use pageflip fallback */ fb_id = output->current->fb_id; if (drmModePageFlip(compositor->drm.fd, output->crtc_id, fb_id, -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 1/5] compositor: Help text for --config
Signed-off-by: Bryce Harrington --- src/compositor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compositor.c b/src/compositor.c index 4de8fbf..f969018 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -5032,6 +5032,7 @@ usage(int error_code) " -i, --idle-time=SECS\tIdle time in seconds\n" " --modules\t\tLoad the comma-separated list of modules\n" " --log=FILE\t\tLog to the given file\n" + " -c, --config=FILE\tConfig file to load, defaults to ~/.config/weston.ini\n" " --no-config\t\tDo not read weston.ini\n" " -h, --help\t\tThis help message\n\n"); -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 4/5] tests: Cleanup test log filenames
The log files were being named like: surface-global-test.la-log.txt surface-global-test.la-serverlog.txt surface-test.la-log.txt surface-test.la-serverlog.txt text.weston-log.txt text.weston-serverlog.txt For consistency, omit the test filename's extension (.la/.so). Signed-off-by: Bryce Harrington --- tests/weston-tests-env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/weston-tests-env b/tests/weston-tests-env index 02c89b4..3cb3073 100755 --- a/tests/weston-tests-env +++ b/tests/weston-tests-env @@ -13,8 +13,8 @@ LOGDIR=$abs_builddir/logs mkdir -p "$LOGDIR" -SERVERLOG="$LOGDIR/$1-serverlog.txt" -OUTLOG="$LOGDIR/$1-log.txt" +SERVERLOG="$LOGDIR/${TEST_NAME}-serverlog.txt" +OUTLOG="$LOGDIR/${TEST_NAME}-log.txt" rm -f "$SERVERLOG" -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 0/5] Enable test configuration
This enables tests to provide their own .ini files for configuring weston, via the recently added --config option. Also included in this set is some related cleanup in weston-tests-env. Bryce Harrington (5): compositor: Help text for --config tests: Support --config to enable tests to override config defaults tests: Keep track of basename tests: Cleanup test log filenames tests: Refactor weston launching syntax src/compositor.c | 1 + tests/weston-tests-env | 53 -- 2 files changed, 31 insertions(+), 23 deletions(-) -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 2/5] tests: Support --config to enable tests to override config defaults
Implements a simple mechanism to allow tests to customize the configuration. Just place a .ini file at the same location as the test itself. If no configuration file is found, then no configuration will be used (i.e. --no-config is specified.) Signed-off-by: Bryce Harrington --- tests/weston-tests-env | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/weston-tests-env b/tests/weston-tests-env index 4d9ba88..070c686 100755 --- a/tests/weston-tests-env +++ b/tests/weston-tests-env @@ -27,11 +27,18 @@ SHELL_PLUGIN=$MODDIR/desktop-shell.so TEST_PLUGIN=$MODDIR/weston-test.so XWAYLAND_PLUGIN=$MODDIR/xwayland.so +CONFIG_FILE="$abs_builddir/$(basename $TESTNAME).ini" +if [ -e "${CONFIG_FILE}" ]; then + CONFIG="--config=${CONFIG_FILE}" +else + CONFIG="--no-config" +fi + case $TESTNAME in *.la|*.so) WESTON_BUILD_DIR=$abs_builddir \ $WESTON --backend=$MODDIR/$BACKEND \ - --no-config \ + $CONFIG \ --shell=$SHELL_PLUGIN \ --socket=test-$(basename $TESTNAME) \ --modules=$MODDIR/${TESTNAME/.la/.so},$XWAYLAND_PLUGIN \ @@ -43,7 +50,7 @@ case $TESTNAME in WESTON_TEST_CLIENT_PATH=$abs_builddir/$TESTNAME $WESTON \ --socket=test-$(basename $TESTNAME) \ --backend=$MODDIR/$BACKEND \ - --no-config \ + $CONFIG \ --shell=$SHELL_PLUGIN \ --log="$SERVERLOG" \ --modules=$TEST_PLUGIN,$XWAYLAND_PLUGIN \ -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 5/5] tests: Refactor weston launching syntax
There are only minor differences in the syntax for how weston is invoked for .so/.la tests vs. other tests, but it's hard to spot them. Refactor the command itself out, so it becomes clearer what the difference is. Signed-off-by: Bryce Harrington --- tests/weston-tests-env | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/tests/weston-tests-env b/tests/weston-tests-env index 3cb3073..173b6eb 100755 --- a/tests/weston-tests-env +++ b/tests/weston-tests-env @@ -37,24 +37,23 @@ fi case $TEST_FILE in *.la|*.so) - WESTON_BUILD_DIR=$abs_builddir \ - $WESTON --backend=$MODDIR/$BACKEND \ - $CONFIG \ - --shell=$SHELL_PLUGIN \ - --socket=test-${TEST_NAME} \ - --modules=$MODDIR/${TEST_FILE/.la/.so},$XWAYLAND_PLUGIN \ - --log="$SERVERLOG" \ - &> "$OUTLOG" + TEST_MODULE=$MODDIR/${TEST_FILE/.la/.so} + client= ;; *) - WESTON_BUILD_DIR=$abs_builddir \ - WESTON_TEST_CLIENT_PATH=$abs_builddir/$TEST_FILE $WESTON \ - --socket=test-${TEST_NAME} \ - --backend=$MODDIR/$BACKEND \ - $CONFIG \ - --shell=$SHELL_PLUGIN \ - --log="$SERVERLOG" \ - --modules=$TEST_PLUGIN,$XWAYLAND_PLUGIN \ - $($abs_builddir/$TEST_FILE --params) \ - &> "$OUTLOG" + export WESTON_TEST_CLIENT_PATH=$abs_builddir/$TEST_FILE + TEST_MODULE=$TEST_PLUGIN + client=$($WESTON_TEST_CLIENT_PATH --params) esac + +export WESTON_BUILD_DIR=$abs_builddir +$WESTON \ + --shell=$SHELL_PLUGIN \ + --socket=test-${TEST_NAME} \ + --modules=$TEST_MODULE,$XWAYLAND_PLUGIN \ + --backend=$MODDIR/$BACKEND \ + --log="$SERVERLOG" \ + $CONFIG \ + $client \ + &> "$OUTLOG" + -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH 3/5] tests: Keep track of basename
basename returns the filename without path information (but with the file extension). We can get this more efficiently via shell variables. Also, for the socket name, use the test's name without the file extension. Signed-off-by: Bryce Harrington --- tests/weston-tests-env | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/weston-tests-env b/tests/weston-tests-env index 070c686..02c89b4 100755 --- a/tests/weston-tests-env +++ b/tests/weston-tests-env @@ -1,8 +1,9 @@ #!/bin/bash -TESTNAME=$1 +TEST_FILE=${1##*/} +TEST_NAME=${TEST_FILE%.*} -if test -z "$TESTNAME"; then +if test -z "$TEST_NAME"; then echo "usage: $(basename $0) " exit 1; fi @@ -27,33 +28,33 @@ SHELL_PLUGIN=$MODDIR/desktop-shell.so TEST_PLUGIN=$MODDIR/weston-test.so XWAYLAND_PLUGIN=$MODDIR/xwayland.so -CONFIG_FILE="$abs_builddir/$(basename $TESTNAME).ini" +CONFIG_FILE="$abs_builddir/${TEST_NAME}.ini" if [ -e "${CONFIG_FILE}" ]; then CONFIG="--config=${CONFIG_FILE}" else CONFIG="--no-config" fi -case $TESTNAME in +case $TEST_FILE in *.la|*.so) WESTON_BUILD_DIR=$abs_builddir \ $WESTON --backend=$MODDIR/$BACKEND \ $CONFIG \ --shell=$SHELL_PLUGIN \ - --socket=test-$(basename $TESTNAME) \ - --modules=$MODDIR/${TESTNAME/.la/.so},$XWAYLAND_PLUGIN \ + --socket=test-${TEST_NAME} \ + --modules=$MODDIR/${TEST_FILE/.la/.so},$XWAYLAND_PLUGIN \ --log="$SERVERLOG" \ &> "$OUTLOG" ;; *) WESTON_BUILD_DIR=$abs_builddir \ - WESTON_TEST_CLIENT_PATH=$abs_builddir/$TESTNAME $WESTON \ - --socket=test-$(basename $TESTNAME) \ + WESTON_TEST_CLIENT_PATH=$abs_builddir/$TEST_FILE $WESTON \ + --socket=test-${TEST_NAME} \ --backend=$MODDIR/$BACKEND \ $CONFIG \ --shell=$SHELL_PLUGIN \ --log="$SERVERLOG" \ --modules=$TEST_PLUGIN,$XWAYLAND_PLUGIN \ - $($abs_builddir/$TESTNAME --params) \ + $($abs_builddir/$TEST_FILE --params) \ &> "$OUTLOG" esac -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
RE: [PATCH weston 5/9] build: generate weston-ivi.ini for tests
> -Original Message- > From: wayland-devel > [mailto:wayland-devel-boun...@lists.freedesktop.org] On Behalf Of Pekka > Paalanen > Sent: Monday, March 30, 2015 6:21 PM > To: wayland-devel@lists.freedesktop.org > Cc: Pekka Paalanen; Nobuhiko Tanibata > Subject: [PATCH weston 5/9] build: generate weston-ivi.ini for tests > > From: Pekka Paalanen > > The ivi-shell / hmi-controller cannot run without a properly populated > config file. Generate a config file especially for tests, which includes > paths to the build dirs. > > The generated file will be used by following patches adding ivi-shell tests. > > Signed-off-by: Pekka Paalanen [ntanibata] Tested-by: Nobuhiko Tanibata BR, Nobuhiko Tanibata > --- > .gitignore | 2 ++ > Makefile.am | 20 ++-- > ivi-shell/weston.ini.in | 4 ++-- > 3 files changed, 22 insertions(+), 4 deletions(-) > > diff --git a/.gitignore b/.gitignore > index aa24f9a..5be35ce 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -95,3 +95,5 @@ setbacklight > weston.1 > weston-drm.7 > weston.ini.5 > + > +/tests/weston-ivi.ini > diff --git a/Makefile.am b/Makefile.am > index 863adb2..fce82f1 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -24,6 +24,15 @@ ivi-shell/weston.ini : > $(srcdir)/ivi-shell/weston.ini.in > -e 's|@bindir[@]|$(bindir)|g' \ > -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ > -e 's|@libexecdir[@]|$(libexecdir)|g' \ > + -e 's|@plugin_prefix[@]||g' \ > + $< > $@ > + > +tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in > + $(AM_V_GEN)$(SED) \ > + -e 's|@bindir[@]|$(bindir)|g' \ > + -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ > + -e 's|@libexecdir[@]|$(libexecdir)|g' \ > + -e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \ > $< > $@ > > all-local : weston.ini ivi-shell/weston.ini > @@ -42,7 +51,10 @@ AM_CPPFLAGS = > \ > -DLIBEXECDIR='"$(libexecdir)"' \ > -DBINDIR='"$(bindir)"' > > -CLEANFILES = weston.ini ivi-shell/weston.ini $(BUILT_SOURCES) > +CLEANFILES = weston.ini \ > + ivi-shell/weston.ini\ > + tests/weston-ivi.ini\ > + $(BUILT_SOURCES) > > bin_PROGRAMS += weston > > @@ -920,7 +932,7 @@ libshared_cairo_la_SOURCES = > \ > # tests subdirectory > # > > -TESTS = $(shared_tests) $(module_tests) $(weston_tests) > +TESTS = $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests) > > shared_tests = \ > config-parser.test \ > @@ -940,6 +952,9 @@ weston_tests = > \ > roles.weston\ > subsurface.weston > > +ivi_tests = > + > +$(ivi_tests) : $(builddir)/tests/weston-ivi.ini > > AM_TESTS_ENVIRONMENT = \ > abs_builddir='$(abs_builddir)'; export abs_builddir; > @@ -964,6 +979,7 @@ noinst_PROGRAMS +=\ > $(setbacklight) \ > $(shared_tests) \ > $(weston_tests) \ > + $(ivi_tests)\ > matrix-test > > test_module_ldflags = \ > diff --git a/ivi-shell/weston.ini.in b/ivi-shell/weston.ini.in index > e05e8da..06af7e2 100644 > --- a/ivi-shell/weston.ini.in > +++ b/ivi-shell/weston.ini.in > @@ -1,8 +1,8 @@ > [core] > -shell=ivi-shell.so > +shell=@plugin_pre...@ivi-shell.so > > [ivi-shell] > -ivi-module=hmi-controller.so > +ivi-module=@plugin_pre...@hmi-controller.so > > ivi-shell-user-interface=@abs_top_builddir@/weston-ivi-shell-user-inte > rface > > #developermode=true > -- > 2.0.5 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
RE: [PATCH weston 9/9] tests: add ivi_layout stand-alone test module
> -Original Message- > From: wayland-devel > [mailto:wayland-devel-boun...@lists.freedesktop.org] On Behalf Of Pekka > Paalanen > Sent: Monday, March 30, 2015 6:21 PM > To: wayland-devel@lists.freedesktop.org > Cc: Pekka Paalanen; Nobuhiko Tanibata > Subject: [PATCH weston 9/9] tests: add ivi_layout stand-alone test module > > From: Pekka Paalanen > > This is the ivi_layout stand-alone test controller module that does not > require any clients to run. Therefore it is much simpler than > ivi_layout-test-plugin.c and does not need a matching part in > ivi_layout-test.c. > > Signed-off-by: Pekka Paalanen [ntanibata] Tested-by: Nobuhiko Tanibata BR, Nobuhiko Tanibata > --- > Makefile.am | 7 +++ > tests/ivi_layout-internal-test.c | 121 > +++ > 2 files changed, 128 insertions(+) > create mode 100644 tests/ivi_layout-internal-test.c > > diff --git a/Makefile.am b/Makefile.am > index 6a4e121..626c2f3 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -1092,8 +1092,15 @@ matrix_test_LDADD = -lm -lrt > > if ENABLE_IVI_SHELL > module_tests += \ > + ivi-layout-internal-test.la \ > ivi-layout-test.la > > +ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS) > +ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags) > +ivi_layout_internal_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) > +ivi_layout_internal_test_la_SOURCES =\ > + tests/ivi_layout-internal-test.c > + > ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS) > ivi_layout_test_la_LDFLAGS = $(test_module_ldflags) > ivi_layout_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) diff --git > a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c > new file mode 100644 > index 000..f8ffdee > --- /dev/null > +++ b/tests/ivi_layout-internal-test.c > @@ -0,0 +1,121 @@ > +/* > + * Copyright © 2013 DENSO CORPORATION > + * Copyright © 2015 Collabora, Ltd. > + * > + * 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. > + */ > + > +#include "config.h" > + > +#include > +#include > +#include > +#include > + > +#include "../src/compositor.h" > +#include "../ivi-shell/ivi-layout-export.h" > + > +struct test_context { > + struct weston_compositor *compositor; > + const struct ivi_controller_interface *controller_interface; }; > + > +static void > +iassert_fail(const char *cond, const char *file, int line, > + const char *func, struct test_context *ctx) { > + weston_log("Assert failure in %s:%d, %s: '%s'\n", > +file, line, func, cond); > + weston_compositor_exit_with_code(ctx->compositor, > EXIT_FAILURE); } > + > +#define iassert(cond) ({ > \ > + bool b_ = (cond); > \ > + if (!b_) > \ > + iassert_fail(#cond, __FILE__, __LINE__, __func__, ctx); > \ > + b_; > \ > +}) > + > +/ tests begin **/ > + > +/* > + * These are all internal ivi_layout API tests that do not require > + * any client objects. > + */ > + > +static void > +test_surface_bad_visibility(struct test_context *ctx) { > + const struct ivi_controller_interface *ctl = > ctx->controller_interface; > + bool visibility; > + > + iassert(ctl->surface_set_visibility(NULL, true) == IVI_FAILED); > + > + ctl->commit_changes(); > + > + visibility = ctl->surface_get_visibility(NULL); > + iassert(visibility == false); > +} > + > +/ tests end / > + > +static void > +run_internal_tests(void *data) > +{ > + struct test_context *ctx = data; > + > + test_surface_bad_visibility(ctx); > + > + weston_compositor_exit_with_code(ctx->compositor, > EXIT_SUCCESS); > + free(ctx);
RE: [PATCH weston 4/9] ivi-layout: abort without controller_module_init
> -Original Message- > From: wayland-devel > [mailto:wayland-devel-boun...@lists.freedesktop.org] On Behalf Of Pekka > Paalanen > Sent: Monday, March 30, 2015 6:21 PM > To: wayland-devel@lists.freedesktop.org > Cc: Pekka Paalanen; Nobuhiko Tanibata > Subject: [PATCH weston 4/9] ivi-layout: abort without > controller_module_init > > From: Pekka Paalanen > > When loading a controller module, if we do not find a controller_module_init > symbol, return failure to the caller instead of ignoring the failure. > > Signed-off-by: Pekka Paalanen [ntanibata] Tested-by: Nobuhiko Tanibata BR, Nobuhiko Tanibata > --- > ivi-shell/ivi-layout.c | 14 -- > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index > 6b2604e..cd4a171 100644 > --- a/ivi-shell/ivi-layout.c > +++ b/ivi-shell/ivi-layout.c > @@ -2953,12 +2953,14 @@ load_controller_modules(struct weston_compositor > *compositor, const char *module > snprintf(buffer, sizeof buffer, "%.*s", (int)(end - p), > p); > > controller_module_init = weston_load_module(buffer, > "controller_module_init"); > - if (controller_module_init) > - if(controller_module_init(compositor, argc, > argv, > - > &ivi_controller_interface, > -sizeof(struct > ivi_controller_interface)) != 0) { > - weston_log("ivi-shell: Initialization > of controller module fails"); > - return -1; > + if (!controller_module_init) > + return -1; > + > + if (controller_module_init(compositor, argc, argv, > +&ivi_controller_interface, > + sizeof(struct > ivi_controller_interface)) != 0) { > + weston_log("ivi-shell: Initialization of > controller module fails"); > + return -1; > } > > p = end; > -- > 2.0.5 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
RE: [PATCH weston 3/9] ivi-shell: add cmdline option for controller module
> -Original Message- > From: wayland-devel > [mailto:wayland-devel-boun...@lists.freedesktop.org] On Behalf Of Pekka > Paalanen > Sent: Monday, March 30, 2015 6:21 PM > To: wayland-devel@lists.freedesktop.org > Cc: Pekka Paalanen; Nobuhiko Tanibata > Subject: [PATCH weston 3/9] ivi-shell: add cmdline option for controller > module > > From: Pekka Paalanen > > This will be useful for tests, where we use --no-config, but ivi-shell needs > load the controller module from somewhere. > > We are not making hmi-controller.so the default, because this patch should > allow running the tests also with another controller. > > Signed-off-by: Pekka Paalanen [ntanibata] Tested-by: Nobuhiko Tanibata BR, Nobuhiko Tanibata > --- > ivi-shell/ivi-shell.c | 20 +--- > 1 file changed, 13 insertions(+), 7 deletions(-) > > diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index > 362a3c3..aef8e63 100644 > --- a/ivi-shell/ivi-shell.c > +++ b/ivi-shell/ivi-shell.c > @@ -386,20 +386,26 @@ init_ivi_shell(struct weston_compositor *compositor, > struct ivi_shell *shell, > > static int > ivi_shell_setting_create(struct ivi_shell_setting *dest, > - struct weston_compositor *compositor) > + struct weston_compositor *compositor, > + int *argc, char *argv[]) > { > int result = 0; > struct weston_config *config = compositor->config; > struct weston_config_section *section; > > - if (NULL == dest) > - return -1; > + const struct weston_option ivi_shell_options[] = { > + { WESTON_OPTION_STRING, "ivi-module", 0, > &dest->ivi_module }, > + }; > + > + parse_options(ivi_shell_options, > ARRAY_LENGTH(ivi_shell_options), > + argc, argv); > > section = weston_config_get_section(config, "ivi-shell", NULL, > NULL); > > - if (weston_config_section_get_string(section, "ivi-module", > - &dest->ivi_module, > NULL) != 0) { > - weston_log("ivi-shell: No ivi-module set in config\n"); > + if (!dest->ivi_module && > + weston_config_section_get_string(section, "ivi-module", > + &dest->ivi_module, NULL) < > 0) { > + weston_log("Error: ivi-shell: No ivi-module set\n"); > result = -1; > } > > @@ -424,7 +430,7 @@ module_init(struct weston_compositor *compositor, > if (shell == NULL) > return -1; > > - if (ivi_shell_setting_create(&setting, compositor) != 0) > + if (ivi_shell_setting_create(&setting, compositor, argc, argv) != > 0) > return -1; > > init_ivi_shell(compositor, shell, &setting); > -- > 2.0.5 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
RE: [PATCH weston 2/9] tests: rename client_create to create_client_and_test_surface
> -Original Message- > From: wayland-devel > [mailto:wayland-devel-boun...@lists.freedesktop.org] On Behalf Of Pekka > Paalanen > Sent: Monday, March 30, 2015 6:21 PM > To: wayland-devel@lists.freedesktop.org > Cc: Pekka Paalanen; Nobuhiko Tanibata > Subject: [PATCH weston 2/9] tests: rename client_create to > create_client_and_test_surface > > From: Pekka Paalanen > > A more descriptive name to not be confused with create_client(). > > Signed-off-by: Pekka Paalanen [ntanibata] Tested-by: Nobuhiko Tanibata BR, Nobuhiko Tanibata > --- > tests/bad-buffer-test.c | 2 +- > tests/buffer-count-test.c | 2 +- > tests/button-test.c | 2 +- > tests/event-test.c| 22 +++--- > tests/keyboard-test.c | 2 +- > tests/presentation-test.c | 2 +- > tests/roles-test.c| 4 ++-- > tests/subsurface-test.c | 30 +++--- > tests/text-test.c | 2 +- > tests/weston-test-client-helper.c | 2 +- > tests/weston-test-client-helper.h | 2 +- > 11 files changed, 36 insertions(+), 36 deletions(-) > > diff --git a/tests/bad-buffer-test.c b/tests/bad-buffer-test.c index > dc93b48..5175731 100644 > --- a/tests/bad-buffer-test.c > +++ b/tests/bad-buffer-test.c > @@ -64,7 +64,7 @@ TEST(test_truncated_shm_file) > struct wl_surface *surface; > int frame; > > - client = client_create(46, 76, 111, 134); > + client = create_client_and_test_surface(46, 76, 111, 134); > assert(client); > surface = client->surface->wl_surface; > > diff --git a/tests/buffer-count-test.c b/tests/buffer-count-test.c index > 31d78c2..693cfc5 100644 > --- a/tests/buffer-count-test.c > +++ b/tests/buffer-count-test.c > @@ -124,7 +124,7 @@ TEST(test_buffer_count) > uint32_t buffer_count; > int i; > > - test_data.client = client_create(10, 10, 10, 10); > + test_data.client = create_client_and_test_surface(10, 10, 10, > 10); > if (!test_data.client->has_wl_drm) > skip("compositor has not bound its display to EGL\n"); > > diff --git a/tests/button-test.c b/tests/button-test.c index > 7959fb7..de84190 100644 > --- a/tests/button-test.c > +++ b/tests/button-test.c > @@ -31,7 +31,7 @@ TEST(simple_button_test) > struct client *client; > struct pointer *pointer; > > - client = client_create(100, 100, 100, 100); > + client = create_client_and_test_surface(100, 100, 100, 100); > assert(client); > > pointer = client->input->pointer; > diff --git a/tests/event-test.c b/tests/event-test.c index > 43540a5..6607668 100644 > --- a/tests/event-test.c > +++ b/tests/event-test.c > @@ -69,7 +69,7 @@ TEST(test_pointer_top_left) > struct client *client; > int x, y; > > - client = client_create(46, 76, 111, 134); > + client = create_client_and_test_surface(46, 76, 111, 134); > assert(client); > > /* move pointer outside top left */ > @@ -94,7 +94,7 @@ TEST(test_pointer_bottom_left) > struct client *client; > int x, y; > > - client = client_create(99, 100, 100, 98); > + client = create_client_and_test_surface(99, 100, 100, 98); > assert(client); > > /* move pointer outside bottom left */ @@ -119,7 +119,7 @@ > TEST(test_pointer_top_right) > struct client *client; > int x, y; > > - client = client_create(48, 100, 67, 100); > + client = create_client_and_test_surface(48, 100, 67, 100); > assert(client); > > /* move pointer outside top right */ > @@ -144,7 +144,7 @@ TEST(test_pointer_bottom_right) > struct client *client; > int x, y; > > - client = client_create(100, 123, 100, 69); > + client = create_client_and_test_surface(100, 123, 100, 69); > assert(client); > > /* move pointer outside bottom right */ @@ -169,7 +169,7 @@ > TEST(test_pointer_top_center) > struct client *client; > int x, y; > > - client = client_create(100, 201, 100, 50); > + client = create_client_and_test_surface(100, 201, 100, 50); > assert(client); > > /* move pointer outside top center */ > @@ -194,7 +194,7 @@ TEST(test_pointer_bottom_center) > struct client *client; > int x, y; > > - client = client_create(100, 45, 67, 100); > + client = create_client_and_test_surface(100, 45, 67, 100); > assert(client); > > /* move pointer outside bottom center */ @@ -219,7 +219,7 @@ > TEST(test_pointer_left_center) > struct client *client; > int x, y; > > - client = client_create(167, 45, 78, 100); > + client = create_client_and_test_surface(167, 45, 78, 100); > assert(client); > > /* move pointer outside left center */ @@ -244,7 +244,7 @@ > TEST(test_pointer_right_center) > struct client *client; > int x, y; > > - client = client_create(110, 37, 100, 46); > + client = create_client_and_test_surface(110,
RE: [PATCH weston 1/9] tests: introduce create_client()
> -Original Message- > From: wayland-devel > [mailto:wayland-devel-boun...@lists.freedesktop.org] On Behalf Of Pekka > Paalanen > Sent: Monday, March 30, 2015 6:21 PM > To: wayland-devel@lists.freedesktop.org > Cc: Pekka Paalanen; Nobuhiko Tanibata > Subject: [PATCH weston 1/9] tests: introduce create_client() > > From: Pekka Paalanen > > Introduce a new helper create_client(), which literally only creates the > client struct, and does not require the test extension to be present. > This will be useful for ivi-shell tests. > > Signed-off-by: Pekka Paalanen [ntanibata] Tested-by: Nobuhiko Tanibata BR, Nobuhiko Tanibata > --- > tests/weston-test-client-helper.c | 23 +-- > tests/weston-test-client-helper.h | 3 +++ > 2 files changed, 20 insertions(+), 6 deletions(-) > > diff --git a/tests/weston-test-client-helper.c > b/tests/weston-test-client-helper.c > index cf9e742..58ed250 100644 > --- a/tests/weston-test-client-helper.c > +++ b/tests/weston-test-client-helper.c > @@ -562,10 +562,9 @@ log_handler(const char *fmt, va_list args) } > > struct client * > -client_create(int x, int y, int width, int height) > +create_client(void) > { > struct client *client; > - struct surface *surface; > > wl_log_set_handler_client(log_handler); > > @@ -577,7 +576,8 @@ client_create(int x, int y, int width, int height) > > /* setup registry so we can bind to interfaces */ > client->wl_registry = > wl_display_get_registry(client->wl_display); > - wl_registry_add_listener(client->wl_registry, > ®istry_listener, client); > + wl_registry_add_listener(client->wl_registry, > ®istry_listener, > + client); > > /* trigger global listener. Need to dispatch two times, because > wl_shm >* will emit new events after binding and we need them to arrive > @@ -588,12 +588,23 @@ client_create(int x, int y, int width, int height) > /* must have WL_SHM_FORMAT_ARGB32 */ > assert(client->has_argb); > > - /* must have weston_test interface */ > - assert(client->test); > - > /* must have an output */ > assert(client->output); > > + return client; > +} > + > +struct client * > +client_create(int x, int y, int width, int height) { > + struct client *client; > + struct surface *surface; > + > + client = create_client(); > + > + /* must have weston_test interface */ > + assert(client->test); > + > /* initialize the client surface */ > surface = xzalloc(sizeof *surface); > surface->wl_surface = > diff --git a/tests/weston-test-client-helper.h > b/tests/weston-test-client-helper.h > index 3208cc4..3ca8fd8 100644 > --- a/tests/weston-test-client-helper.h > +++ b/tests/weston-test-client-helper.h > @@ -115,6 +115,9 @@ xzalloc(size_t size) } > > struct client * > +create_client(void); > + > +struct client * > client_create(int x, int y, int width, int height); > > struct wl_buffer * > -- > 2.0.5 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH libinput v2 0/4] touchpad gestures support
On 3/26/2015 2:04 AM, Hans de Goede wrote: Hi All, Here is v2 of my touchpad gestures support patch series, changes since v1: - Merge the gesture capability flag and event-debug patched into the "touchpad: Add an API for touchpad gesture events" - Update the swipe and pinch/rotate implementations to work with the new typesafe device and normalized coordinates (rebased on latest master), this results in a nice cleanup Regards, Hans Gave these a spin with an Intuos Pro. Aside from an unrelated issue when using 5+ fingers[1], the patchset seems to work well. I have some trouble with the 3 cm heuristic (about half the time I try to scroll, its interpreted as a pinch) but I'd probably get used to it after a little use. Acked-by: Jason Gerecke [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89800 Jason --- Now instead of four in the eights place / you’ve got three, ‘Cause you added one / (That is to say, eight) to the two, / But you can’t take seven from three, / So you look at the sixty-fours ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH libinput] tools: List relative wheel among axis capabilities
Signed-off-by: Jason Gerecke --- For Peter's tablet-support branch. tools/event-debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/event-debug.c b/tools/event-debug.c index d2ac415..e8e49cd 100644 --- a/tools/event-debug.c +++ b/tools/event-debug.c @@ -480,6 +480,8 @@ print_proximity_event(struct libinput_event *ev) printf("r"); if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_SLIDER)) printf("s"); + if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_REL_WHEEL)) + printf("w"); printf("\tbtn:"); if (libinput_tool_has_button(tool, BTN_TOUCH)) -- 2.3.4 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/2] compositor-wayland: Flag the wayland backend as nested
2015-04-01 20:37 GMT+03:00 Derek Foreman : > Nested compositors may have different requirements than un-nested ones. > The current need stems from having to avoid the new repaint delay when > in a nested compositor. > > Signed-off-by: Derek Foreman > --- > src/compositor-wayland.c | 2 ++ > src/compositor.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c > index 7e59ecd..46085f1 100644 > --- a/src/compositor-wayland.c > +++ b/src/compositor-wayland.c > @@ -1929,6 +1929,8 @@ wayland_compositor_create(struct wl_display *display, > int use_pixman, > if (c == NULL) > return NULL; > > + c->base.nested = true; Shouldn't we set this also for the X11 backend? > + > if (weston_compositor_init(&c->base, display, argc, argv, >config) < 0) > goto err_free; > diff --git a/src/compositor.h b/src/compositor.h > index 5f49237..f294302 100644 > --- a/src/compositor.h > +++ b/src/compositor.h > @@ -688,6 +688,7 @@ struct weston_compositor { > > clockid_t presentation_clock; > int32_t repaint_msec; > + bool nested; > > int exit_code; > }; > -- > 2.1.4 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 2/2] compositor: Skip repaint delay for nested compositors
The repaint delay becomes cumulative if it's used in both a parent compositor and a nested compositor. This can lead to dropped frames and visible latency. Signed-off-by: Derek Foreman --- src/compositor.c | 8 1 file changed, 8 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 4de8fbf..433f6d2 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -2412,6 +2412,14 @@ weston_output_finish_frame(struct weston_output *output, msec = (refresh_nsec - timespec_to_nsec(&gone)) / 100; /* floor */ msec -= compositor->repaint_msec; + /* If nested outputs try to use a repaint window the delay sums +* with the parent's delay and we start dropping frames... +*/ + if (compositor->nested) { + output_repaint_timer_handler(output); + return; + } + if (msec < -1000 || msec > 1000) { static bool warned; -- 2.1.4 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 0/2] Fix choppy update in weston on weston
When running weston under weston since the new repaint delay code we get bad framerates since both compositors are doing their own delay. This is a pretty simplistic fix, just removing the delay entirely from nested compositors. Derek Foreman (2): compositor-wayland: Flag the wayland backend as nested compositor: Skip repaint delay for nested compositors src/compositor-wayland.c | 2 ++ src/compositor.c | 8 src/compositor.h | 1 + 3 files changed, 11 insertions(+) -- 2.1.4 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 1/2] compositor-wayland: Flag the wayland backend as nested
Nested compositors may have different requirements than un-nested ones. The current need stems from having to avoid the new repaint delay when in a nested compositor. Signed-off-by: Derek Foreman --- src/compositor-wayland.c | 2 ++ src/compositor.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c index 7e59ecd..46085f1 100644 --- a/src/compositor-wayland.c +++ b/src/compositor-wayland.c @@ -1929,6 +1929,8 @@ wayland_compositor_create(struct wl_display *display, int use_pixman, if (c == NULL) return NULL; + c->base.nested = true; + if (weston_compositor_init(&c->base, display, argc, argv, config) < 0) goto err_free; diff --git a/src/compositor.h b/src/compositor.h index 5f49237..f294302 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -688,6 +688,7 @@ struct weston_compositor { clockid_t presentation_clock; int32_t repaint_msec; + bool nested; int exit_code; }; -- 2.1.4 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel