.gitignore | 1 Makefile.am | 504 +- README | 146 clients/clickdot.c | 1 clients/cliptest.c | 3 clients/confine.c | 531 +++ clients/desktop-shell.c | 70 clients/dnd.c | 1 clients/editor.c | 4 clients/eventdemo.c | 50 clients/flower.c | 2 clients/fullscreen.c | 7 clients/ivi-shell-user-interface.c | 43 clients/keyboard.c | 44 clients/multi-resource.c | 26 clients/nested-client.c | 1 clients/nested.c | 14 clients/presentation-shm.c | 75 clients/resizor.c | 159 clients/scaler.c | 46 clients/screenshot.c | 16 clients/simple-damage.c | 130 clients/simple-dmabuf-intel.c | 123 clients/simple-dmabuf-v4l.c | 126 clients/simple-egl.c | 124 clients/simple-shm.c | 108 clients/simple-touch.c | 3 clients/smoke.c | 2 clients/stacking.c | 1 clients/subsurfaces.c | 4 clients/terminal.c | 75 clients/weston-info.c | 55 clients/weston-simple-im.c | 9 clients/window.c | 688 +++- clients/window.h | 78 compositor/cms-colord.c | 567 +++ compositor/cms-helper.c | 136 compositor/cms-helper.h | 75 compositor/cms-static.c | 119 compositor/main.c | 1791 ++++++++++ compositor/screen-share.c | 1129 ++++++ compositor/systemd-notify.c | 165 compositor/text-backend.c | 1085 ++++++ compositor/weston-screenshooter.c | 192 + compositor/weston.desktop | 5 compositor/weston.h | 73 compositor/weston.pc.in | 12 compositor/xwayland.c | 209 + configure.ac | 212 - data/COPYING | 18 data/icon_editor.png |binary data/icon_flower.png |binary data/icon_terminal.png |binary data/icons.svg | 1012 +++++ desktop-shell/exposay.c | 14 desktop-shell/input-panel.c | 19 desktop-shell/shell.c | 3206 ++++-------------- desktop-shell/shell.h | 16 fullscreen-shell/fullscreen-shell.c | 117 ivi-shell/hmi-controller.c | 221 - ivi-shell/input-panel-ivi.c | 27 ivi-shell/ivi-layout-export.h | 368 -- ivi-shell/ivi-layout-private.h | 72 ivi-shell/ivi-layout-shell.h | 60 ivi-shell/ivi-layout-transition.c | 45 ivi-shell/ivi-layout.c | 1324 +------ ivi-shell/ivi-shell.c | 109 ivi-shell/ivi-shell.h | 15 libweston-desktop/client.c | 212 + libweston-desktop/internal.h | 236 + libweston-desktop/libweston-desktop.c | 244 + libweston-desktop/libweston-desktop.h | 166 libweston-desktop/libweston-desktop.pc.in | 11 libweston-desktop/seat.c | 368 ++ libweston-desktop/surface.c | 810 ++++ libweston-desktop/wl-shell.c | 466 ++ libweston-desktop/xdg-shell-v5.c | 798 ++++ libweston-desktop/xdg-shell-v6.c | 1237 +++++++ libweston-desktop/xwayland.c | 377 ++ libweston/animation.c | 502 ++ libweston/bindings.c | 580 +++ libweston/clipboard.c | 307 + libweston/compositor-drm.c | 3285 +++++++++++++++++++ libweston/compositor-drm.h | 138 libweston/compositor-fbdev.c | 784 ++++ libweston/compositor-fbdev.h | 63 libweston/compositor-headless.c | 274 + libweston/compositor-headless.h | 56 libweston/compositor-rdp.c | 1346 +++++++ libweston/compositor-rdp.h | 54 libweston/compositor-wayland.c | 2361 +++++++++++++ libweston/compositor-wayland.h | 63 libweston/compositor-x11.c | 1745 ++++++++++ libweston/compositor-x11.h | 64 libweston/compositor.c | 5119 ++++++++++++++++++++++++++++++ libweston/compositor.h | 1827 ++++++++++ libweston/data-device.c | 1343 +++++++ libweston/dbus.c | 408 ++ libweston/dbus.h | 110 libweston/gl-renderer.c | 3191 ++++++++++++++++++ libweston/gl-renderer.h | 117 libweston/input.c | 4558 ++++++++++++++++++++++++++ libweston/launcher-direct.c | 315 + libweston/launcher-impl.h | 45 libweston/launcher-logind.c | 840 ++++ libweston/launcher-util.c | 118 libweston/launcher-util.h | 58 libweston/launcher-weston-launch.c | 286 + libweston/libbacklight.c | 318 + libweston/libbacklight.h | 79 libweston/libinput-device.c | 604 +++ libweston/libinput-device.h | 80 libweston/libinput-seat.c | 417 ++ libweston/libinput-seat.h | 72 libweston/libweston.pc.in | 11 libweston/linux-dmabuf.c | 498 ++ libweston/linux-dmabuf.h | 88 libweston/log.c | 98 libweston/noop-renderer.c | 122 libweston/pixman-renderer.c | 932 +++++ libweston/pixman-renderer.h | 40 libweston/plugin-registry.c | 156 libweston/plugin-registry.h | 55 libweston/screenshooter.c | 488 ++ libweston/spring-tool.c | 76 libweston/timeline-object.h | 55 libweston/timeline.c | 292 + libweston/timeline.h | 65 libweston/vaapi-recorder.c | 1161 ++++++ libweston/vaapi-recorder.h | 38 libweston/version.h.in | 50 libweston/vertex-clipping.c | 330 + libweston/vertex-clipping.h | 66 libweston/weston-egl-ext.h | 156 libweston/weston-launch.c | 782 ++++ libweston/weston-launch.h | 49 libweston/zoom.c | 178 + m4/weston.m4 | 37 man/weston.ini.man | 25 protocol/ivi-application.xml | 2 protocol/presentation_timing.xml | 274 - protocol/scaler.xml | 208 - releasing.txt | 32 shared/config-parser.c | 83 shared/config-parser.h | 6 shared/frame.c | 1 shared/helpers.h | 11 shared/image-loader.c | 45 shared/option-parser.c | 55 shared/platform.h | 57 shared/string-helpers.h | 70 shared/xalloc.c | 50 shared/xalloc.h | 51 src/animation.c | 485 -- src/bindings.c | 579 --- src/clipboard.c | 306 - src/cms-colord.c | 568 --- src/cms-helper.c | 135 src/cms-helper.h | 75 src/cms-static.c | 118 src/compositor-drm.c | 3260 ------------------- src/compositor-fbdev.c | 856 ----- src/compositor-headless.c | 292 - src/compositor-rdp.c | 1319 ------- src/compositor-rpi.c | 575 --- src/compositor-wayland.c | 2427 -------------- src/compositor-x11.c | 1762 ---------- src/compositor.c | 5050 ----------------------------- src/compositor.h | 1715 ---------- src/data-device.c | 1338 ------- src/dbus.c | 407 -- src/dbus.h | 110 src/gl-renderer.c | 3129 ------------------ src/gl-renderer.h | 132 src/input.c | 2750 ---------------- src/launcher-direct.c | 315 - src/launcher-impl.h | 45 src/launcher-logind.c | 839 ---- src/launcher-util.c | 117 src/launcher-util.h | 58 src/launcher-weston-launch.c | 300 - src/libbacklight.c | 310 - src/libbacklight.h | 79 src/libinput-device.c | 624 --- src/libinput-device.h | 78 src/libinput-seat.c | 414 -- src/libinput-seat.h | 65 src/linux-dmabuf.c | 497 -- src/linux-dmabuf.h | 88 src/log.c | 143 src/main.c | 892 ----- src/noop-renderer.c | 121 src/pixman-renderer.c | 931 ----- src/pixman-renderer.h | 40 src/rpi-bcm-stubs.h | 327 - src/rpi-renderer.c | 1830 ---------- src/rpi-renderer.h | 52 src/screen-share.c | 1126 ------ src/screenshooter.c | 634 --- src/spring-tool.c | 74 src/systemd-notify.c | 123 src/text-backend.c | 1082 ------ src/timeline-object.h | 55 src/timeline.c | 292 - src/timeline.h | 65 src/vaapi-recorder.c | 1161 ------ src/vaapi-recorder.h | 38 src/version.h.in | 50 src/vertex-clipping.c | 330 - src/vertex-clipping.h | 66 src/weston-egl-ext.h | 120 src/weston-launch.c | 770 ---- src/weston-launch.h | 49 src/weston.desktop | 5 src/weston.pc.in | 11 src/zoom.c | 177 - tests/buffer-count-test.c | 1 tests/config-parser-test.c | 186 + tests/event-test.c | 26 tests/internal-screenshot-test.c | 80 tests/ivi-test.h | 1 tests/ivi_layout-internal-test.c | 424 -- tests/ivi_layout-test-plugin.c | 266 - tests/ivi_layout-test.c | 15 tests/keyboard-test.c | 2 tests/plugin-registry-test.c | 101 tests/presentation-test.c | 38 tests/string-test.c | 87 tests/surface-global-test.c | 3 tests/surface-screenshot.c | 1 tests/surface-test.c | 2 tests/text-test.c | 1 tests/vertex-clip-test.c | 2 tests/viewporter-test.c | 553 +++ tests/weston-test-client-helper.c | 617 ++- tests/weston-test-client-helper.h | 55 tests/weston-test.c | 26 tests/weston-tests-env | 24 tools/zunitc/inc/zunitc/zunitc.h | 2 tools/zunitc/src/zuc_base_logger.c | 21 tools/zunitc/src/zuc_junit_reporter.c | 34 tools/zunitc/src/zunitc_impl.c | 11 wcap/wcap-decode.h | 2 weston.ini.in | 1 xwayland/dnd.c | 1 xwayland/hash.c | 2 xwayland/hash.h | 2 xwayland/launcher.c | 282 - xwayland/selection.c | 33 xwayland/window-manager.c | 134 xwayland/xwayland-api.h | 176 + xwayland/xwayland-internal-interface.h | 62 xwayland/xwayland.h | 10 253 files changed, 55574 insertions(+), 48419 deletions(-)
New commits: commit eb07f3624dc66bc2fd2d8e594c541da3e77e7631 Author: Bryce Harrington <br...@osg.samsung.com> Date: Tue Aug 16 11:51:53 2016 -0700 configure.ac: bump to version 1.11.91 for the alpha release diff --git a/configure.ac b/configure.ac index cac3e7d..58fa04e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ m4_define([weston_major_version], [1]) m4_define([weston_minor_version], [11]) -m4_define([weston_micro_version], [90]) +m4_define([weston_micro_version], [91]) m4_define([weston_version], [weston_major_version.weston_minor_version.weston_micro_version]) m4_define([libweston_major_version], [1]) m4_define([libweston_minor_version], [11]) -m4_define([libweston_patch_version], [90]) +m4_define([libweston_patch_version], [91]) AC_PREREQ([2.64]) AC_INIT([weston], @@ -14,7 +14,7 @@ AC_INIT([weston], [weston], [http://wayland.freedesktop.org]) -WAYLAND_PREREQ_VERSION="1.11.90" +WAYLAND_PREREQ_VERSION="1.11.91" AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version]) AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version]) commit 6384edf0252e25b2b77d0156e247e8302f318657 Author: Quentin Glidic <sardemff7+...@sardemff7.net> Date: Tue Aug 16 11:42:47 2016 +0200 libweston-desktop/{wl_shell, xwayland}: Fix changing between toplevel states Signed-off-by: Quentin Glidic <sardemff7+...@sardemff7.net> Tested-by: Emmanuel Gil Peyrot <emmanuel.pey...@collabora.com> diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c index 7c6a589..74ce473 100644 --- a/libweston-desktop/wl-shell.c +++ b/libweston-desktop/wl-shell.c @@ -151,8 +151,10 @@ weston_desktop_wl_shell_change_state(struct weston_desktop_wl_shell_surface *sur assert(state != NONE); - if (to_add && surface->added) + if (to_add && surface->added) { + surface->state = state; return; + } if (surface->state != state) { if (surface->state == POPUP) diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c index da04f7f..cb08323 100644 --- a/libweston-desktop/xwayland.c +++ b/libweston-desktop/xwayland.c @@ -75,8 +75,10 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf assert(state != NONE); - if (to_add && surface->added) + if (to_add && surface->added) { + surface->state = state; return; + } if (surface->state != state) { if (surface->state == XWAYLAND) { commit f6636a8dec24340b9ec4ec5a1171d3efabf3904a Author: Quentin Glidic <sardemff7+...@sardemff7.net> Date: Tue Aug 16 10:55:02 2016 +0200 libweston-desktop/xwayland: Actually destroy the view Signed-off-by: Quentin Glidic <sardemff7+...@sardemff7.net> Reviewed-by: Jonas Ådahl <jad...@gmail.com> diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c index 927afab..da04f7f 100644 --- a/libweston-desktop/xwayland.c +++ b/libweston-desktop/xwayland.c @@ -81,6 +81,7 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf if (surface->state != state) { if (surface->state == XWAYLAND) { weston_desktop_surface_unlink_view(surface->view); + weston_view_destroy(surface->view); surface->view = NULL; } @@ -149,11 +150,13 @@ weston_desktop_xwayland_surface_destroy(struct weston_desktop_surface *dsurface, wl_list_remove(&surface->resource_destroy_listener.link); weston_desktop_surface_unset_relative_to(surface->surface); - if (surface->added) + if (surface->added) { weston_desktop_api_surface_removed(surface->desktop, surface->surface); - else if (surface->state == XWAYLAND) + } else if (surface->state == XWAYLAND) { weston_desktop_surface_unlink_view(surface->view); + weston_view_destroy(surface->view); + } free(surface); } commit f01ecee75ae435e50910ca852819ee11b22e3b1a Author: Quentin Glidic <sardemff7+...@sardemff7.net> Date: Tue Aug 16 10:52:46 2016 +0200 libweston-desktop: Rename _destroy_view to _unlink_view It doesn't destroy the view per se (except for internal surfaces) and require the caller to also destroy the view itself at the appropriate time. Signed-off-by: Quentin Glidic <sardemff7+...@sardemff7.net> Reviewed-by: Jonas Ådahl <jad...@gmail.com> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 8023b0d..7bcaa8d 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2364,7 +2364,7 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface, weston_desktop_surface_set_user_data(shsurf->desktop_surface, NULL); shsurf->desktop_surface = NULL; - weston_desktop_surface_destroy_view(shsurf->view); + weston_desktop_surface_unlink_view(shsurf->view); if (weston_surface_is_mapped(surface) && shsurf->shell->win_close_animation_type == ANIMATION_FADE) { pixman_region32_fini(&surface->pending.input); diff --git a/libweston-desktop/libweston-desktop.h b/libweston-desktop/libweston-desktop.h index 0f0e031..f77ab55 100644 --- a/libweston-desktop/libweston-desktop.h +++ b/libweston-desktop/libweston-desktop.h @@ -111,7 +111,7 @@ weston_desktop_surface_set_user_data(struct weston_desktop_surface *self, struct weston_view * weston_desktop_surface_create_view(struct weston_desktop_surface *surface); void -weston_desktop_surface_destroy_view(struct weston_view *view); +weston_desktop_surface_unlink_view(struct weston_view *view); void weston_desktop_surface_propagate_layer(struct weston_desktop_surface *surface); void diff --git a/libweston-desktop/surface.c b/libweston-desktop/surface.c index 42258db..2205107 100644 --- a/libweston-desktop/surface.c +++ b/libweston-desktop/surface.c @@ -404,7 +404,7 @@ weston_desktop_surface_create_view(struct weston_desktop_surface *surface) } WL_EXPORT void -weston_desktop_surface_destroy_view(struct weston_view *wview) +weston_desktop_surface_unlink_view(struct weston_view *wview) { struct weston_desktop_surface *surface; struct weston_desktop_view *view; diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c index 6c63483..927afab 100644 --- a/libweston-desktop/xwayland.c +++ b/libweston-desktop/xwayland.c @@ -80,7 +80,7 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf if (surface->state != state) { if (surface->state == XWAYLAND) { - weston_desktop_surface_destroy_view(surface->view); + weston_desktop_surface_unlink_view(surface->view); surface->view = NULL; } @@ -153,7 +153,7 @@ weston_desktop_xwayland_surface_destroy(struct weston_desktop_surface *dsurface, weston_desktop_api_surface_removed(surface->desktop, surface->surface); else if (surface->state == XWAYLAND) - weston_desktop_surface_destroy_view(surface->view); + weston_desktop_surface_unlink_view(surface->view); free(surface); } commit 729c7fa788822e5b0561f992d040e1bb8781cbaf Author: Quentin Glidic <sardemff7+...@sardemff7.net> Date: Tue Aug 16 10:28:21 2016 +0200 desktop-shell: Properly destroy the weston_desktop_view Signed-off-by: Quentin Glidic <sardemff7+...@sardemff7.net> Reviewed-by: Jonas Ådahl <jad...@gmail.com> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 786020b..8023b0d 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2364,6 +2364,7 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface, weston_desktop_surface_set_user_data(shsurf->desktop_surface, NULL); shsurf->desktop_surface = NULL; + weston_desktop_surface_destroy_view(shsurf->view); if (weston_surface_is_mapped(surface) && shsurf->shell->win_close_animation_type == ANIMATION_FADE) { pixman_region32_fini(&surface->pending.input); @@ -2373,7 +2374,6 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface, weston_fade_run(shsurf->view, 1.0, 0.0, 300.0, fade_out_done, shsurf); } else { - weston_desktop_surface_destroy_view(shsurf->view); weston_view_destroy(shsurf->view); free(shsurf); } commit 154c5d23041cb51973dc07689ab195759e2b59df Author: Quentin Glidic <sardemff7+...@sardemff7.net> Date: Mon Aug 15 17:29:09 2016 +0200 Makefile.am: Fix libtool race Signed-off-by: Quentin Glidic <sardemff7+...@sardemff7.net> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> Acked-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> diff --git a/Makefile.am b/Makefile.am index 6c3f4f7..1e63a58 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,6 +61,14 @@ CLEANFILES = weston.ini \ internal-screenshot-00.png \ $(BUILT_SOURCES) +# Libtool race fix +# libweston-desktop depends on libweston, and desktop-shell depends on both. +# This leads to a libtool race at installation, because libtool re-links +# everything. +# If you add more fixes, you may need a workaround to keep automake generated +# targets. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328 +install-libweston_moduleLTLIBRARIES install-moduleLTLIBRARIES: install-libLTLIBRARIES + lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) commit 2af7e208cf4a50222bb7874fb8daf7623b997bda Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Jul 7 10:52:17 2016 -0500 weston-editor: Close the data source after sending We're leaking the fd when sending cut'n'paste. Failure to close can also makes the other end unhappy because it doesn't know the paste is finished. Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-by: Yong Bakos <yba...@humanoriented.com> Reviewed-by: Jonas Ådahl <jad...@gmail.com> diff --git a/clients/editor.c b/clients/editor.c index b34ef42..6805d8a 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -576,6 +576,8 @@ data_source_send(void *data, if (write(fd, editor->selected_text, strlen(editor->selected_text) + 1) < 0) fprintf(stderr, "write failed: %m\n"); + + close(fd); } static void commit e91b6e9c62847f4fa00be4f813da94ee050d0b94 Author: Arnaud Vrac <av...@freebox.fr> Date: Wed Jun 8 17:55:08 2016 +0200 fullscreen-shell: avoid access to freed data Remove the output transform from the view transform list when its surface is destroyed. The surface destruction also triggers the freeing of its views, so the next access to the output transform link could crash. Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c index b9c82a8..b3083d8 100644 --- a/fullscreen-shell/fullscreen-shell.c +++ b/fullscreen-shell/fullscreen-shell.c @@ -293,6 +293,8 @@ surface_destroyed(struct wl_listener *listener, void *data) surface_destroyed); fsout->surface = NULL; fsout->view = NULL; + wl_list_remove(&fsout->transform.link); + wl_list_init(&fsout->transform.link); } static void commit 319397e050e2b4833e10093ccefd8ad77a6ef78d Author: Pekka Paalanen <pekka.paala...@collabora.co.uk> Date: Mon Jul 4 16:25:16 2016 +0300 gl-renderer, simple-dmabuf-v4l: fix dmabuf y-invert Invert the Y_INVERT flag for the EGL import fo dmabufs. This fixes weston-simple-dmabuf-intel to show the same image on both GL-composited and with direct scanout on a hardware plane. Before, the image would y-flip when switching between these two cases. Now the orientation also matches the color values written in simple-dmabuf-intel.c. The GL-renderer uses the OpenGL convention of texture coordinates, where the origin is at the bottom-left of an image. This can be observed in texture_region() where the texcoords are inverted if y_invert is false, since the surface coordinates have origin at top-left. Both wl_shm and dmabuf buffers have origin at the top-left. When wl_shm buffer is imported with glTexImage2D, it gets inverted because glTexImage2D is defined to read in the bottom row first. The shm data is top row first. This incidentally also means, that buffer pixel 0,0 ends up at texture coordinates 0,0. This is now inverted compared to the GL coordinate convention, and therefore gl_renderer_attach_shm() sets y_inverted to true. This causes texture_region() to NOT invert the texcoords. Wayland surface coordinates have origin at top-left, hence the double-inversion. Dmabuf buffers also have the origin at top-left. However, they are imported via EGL to GL, where they should get the GL oriented coordinates but they do not. It is as if pixel 0,0 ends up at texcoords 0,0 - the same thing as with wl_shm buffers. Therefore we need to invert the invert flag. Too bad EGL_EXT_image_dma_buf_import does not seem to specify the image orientation. The GL spec implied result seems to conflict with the reality in Mesa 11.2.2. I asked about this in the Mesa developer mailing list. The question with no answers: https://lists.freedesktop.org/archives/mesa-dev/2016-June/120249.html and the thread I hijacked to get some answers: https://lists.freedesktop.org/archives/mesa-dev/2016-June/120733.html which culminated to the conclusion: https://lists.freedesktop.org/archives/mesa-dev/2016-June/120955.html that supports this patch. simple-dmabuf-v4l is equally fixed to not add Y_INVERT. There is no rational reason to have it, and removing is necessary together with the GL-renderer change to keep the image the right way up. This has been tested with VIVID. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> diff --git a/clients/simple-dmabuf-v4l.c b/clients/simple-dmabuf-v4l.c index de77e36..af25d0e 100644 --- a/clients/simple-dmabuf-v4l.c +++ b/clients/simple-dmabuf-v4l.c @@ -360,7 +360,12 @@ create_dmabuf_buffer(struct display *display, struct buffer *buffer) unsigned i; modifier = 0; - flags = ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT; + flags = 0; + + /* XXX: apparently some webcams may actually provide y-inverted images, + * in which case we should set + * flags = ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT + */ params = zwp_linux_dmabuf_v1_create_params(display->dmabuf); for (i = 0; i < display->format.num_planes; ++i) diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c index ff48790..031576b 100644 --- a/libweston/gl-renderer.c +++ b/libweston/gl-renderer.c @@ -1824,8 +1824,14 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface, buffer->width = dmabuf->attributes.width; buffer->height = dmabuf->attributes.height; + + /* + * GL-renderer uses the OpenGL convention of texture coordinates, where + * the origin is at bottom-left. Because dmabuf buffers have the origin + * at top-left, we must invert the Y_INVERT flag to get the image right. + */ buffer->y_inverted = - !!(dmabuf->attributes.flags & ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT); + !(dmabuf->attributes.flags & ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT); for (i = 0; i < gs->num_images; i++) egl_image_unref(gs->images[i]); commit dbb85d717355f872e1fd71c4e63a66a1b52d81a2 Author: Pekka Paalanen <pekka.paala...@collabora.co.uk> Date: Mon Jul 4 16:25:15 2016 +0300 clients/dmabuf-v4l: explain vivid setup Add very short explanation on how to set up Vivid driver, when you don't have suitable V4L2 device to use. Using the XR24 (DRM_FORMAT_XRGB8888) format practically guarantees that you can test direct scanout on a hardware overlay, too. At least on PC hardware that has overlays. Tested to work on Intel. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> diff --git a/clients/simple-dmabuf-v4l.c b/clients/simple-dmabuf-v4l.c index ce124cc..de77e36 100644 --- a/clients/simple-dmabuf-v4l.c +++ b/clients/simple-dmabuf-v4l.c @@ -896,6 +896,23 @@ usage(const char *argv0) "The default for both formats is YUYV.\n" "If the V4L2 and DRM formats differ, the data is simply " "reinterpreted rather than converted.\n", argv0); + + printf("\n" + "How to set up Vivid the virtual video driver for testing:\n" + "- build your kernel with CONFIG_VIDEO_VIVID=m\n" + "- add this to a /etc/modprobe.d/ file:\n" + " options vivid node_types=0x1 num_inputs=1 input_types=0x00\n" + "- modprobe vivid and check which device was created,\n" + " here we assume /dev/video0\n" + "- set the pixel format:\n" + " $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=640,pixelformat=XR24\n" + "- launch the demo:\n" + " $ %s /dev/video0 XR24 XR24\n" + "You should see a test pattern with color bars, and some text.\n" + "\n" + "More about vivid: https://www.kernel.org/doc/Documentation/video4linux/vivid.txt\n" + "\n", argv0); + exit(0); } commit 2eda27b7fbc6cde9ac8beb04cd0af2d4d04f73c6 Author: Emil Velikov <emil.veli...@collabora.com> Date: Mon Aug 15 16:31:11 2016 +0100 README: fix s/libwayland/libweston/ typo Since one is (about to be) using libweston, they should check for it as opposed to libwayland. Silly copy/paste mistake that would have caused a lot of confusion. Signed-off-by: Emil Velikov <emil.veli...@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> diff --git a/README b/README index 91a4953..84c30a4 100644 --- a/README +++ b/README @@ -133,7 +133,7 @@ weston_ham_sandwich(void); In order to use the said symbol, the one will have a similar code in their configure.ac: -PKG_CHECK_MODULES(LIBWAYLAND, [libwayland-1 >= 1.1]) +PKG_CHECK_MODULES(LIBWESTON, [libweston-1 >= 1.1]) AC_DEFINE(REQUIRE_LIBWESTON_API_VERSION, [0x0101]) If the user is _not_ interested in forward compatibility, they can use 0xffff commit 51c6f631c0100be32b41c407c89167d2f6d88a6e Author: Benoit Gschwind <gschw...@gnu-log.net> Date: Wed May 18 21:32:12 2016 +0200 compositor-x11: remove redundant state arg of x11_backend_deliver_button_event The "state" variable in x11_backend_deliver_button_event is basically the same as (event->response_type == XCB_BUTTON_PRESS), thus update the code to use the last one. Signed-off-by: Benoit Gschwind <gschw...@gnu-log.net> Reviewed-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c index 5562b9f..3e0d20f 100644 --- a/libweston/compositor-x11.c +++ b/libweston/compositor-x11.c @@ -1060,13 +1060,14 @@ update_xkb_state_from_core(struct x11_backend *b, uint16_t x11_mask) static void x11_backend_deliver_button_event(struct x11_backend *b, - xcb_generic_event_t *event, int state) + xcb_generic_event_t *event) { xcb_button_press_event_t *button_event = (xcb_button_press_event_t *) event; uint32_t button; struct x11_output *output; struct weston_pointer_axis_event weston_event; + bool is_button_pressed = event->response_type == XCB_BUTTON_PRESS; assert(event->response_type == XCB_BUTTON_PRESS || event->response_type == XCB_BUTTON_RELEASE); @@ -1075,7 +1076,7 @@ x11_backend_deliver_button_event(struct x11_backend *b, if (!output) return; - if (state) + if (is_button_pressed) xcb_grab_pointer(b->conn, 0, output->window, XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | @@ -1105,7 +1106,7 @@ x11_backend_deliver_button_event(struct x11_backend *b, case 4: /* Axis are measured in pixels, but the xcb events are discrete * steps. Therefore move the axis by some pixels every step. */ - if (state) { + if (is_button_pressed) { weston_event.value = -DEFAULT_AXIS_STEP_DISTANCE; weston_event.discrete = -1; weston_event.has_discrete = true; @@ -1118,7 +1119,7 @@ x11_backend_deliver_button_event(struct x11_backend *b, } return; case 5: - if (state) { + if (is_button_pressed) { weston_event.value = DEFAULT_AXIS_STEP_DISTANCE; weston_event.discrete = 1; weston_event.has_discrete = true; @@ -1131,7 +1132,7 @@ x11_backend_deliver_button_event(struct x11_backend *b, } return; case 6: - if (state) { + if (is_button_pressed) { weston_event.value = -DEFAULT_AXIS_STEP_DISTANCE; weston_event.discrete = -1; weston_event.has_discrete = true; @@ -1144,7 +1145,7 @@ x11_backend_deliver_button_event(struct x11_backend *b, } return; case 7: - if (state) { + if (is_button_pressed) { weston_event.value = DEFAULT_AXIS_STEP_DISTANCE; weston_event.discrete = 1; weston_event.has_discrete = true; @@ -1163,8 +1164,8 @@ x11_backend_deliver_button_event(struct x11_backend *b, notify_button(&b->core_seat, weston_compositor_get_time(), button, - state ? WL_POINTER_BUTTON_STATE_PRESSED : - WL_POINTER_BUTTON_STATE_RELEASED); + is_button_pressed ? WL_POINTER_BUTTON_STATE_PRESSED : + WL_POINTER_BUTTON_STATE_RELEASED); notify_pointer_frame(&b->core_seat); } @@ -1357,10 +1358,8 @@ x11_backend_handle_event(int fd, uint32_t mask, void *data) STATE_UPDATE_NONE); break; case XCB_BUTTON_PRESS: - x11_backend_deliver_button_event(b, event, 1); - break; case XCB_BUTTON_RELEASE: - x11_backend_deliver_button_event(b, event, 0); + x11_backend_deliver_button_event(b, event); break; case XCB_MOTION_NOTIFY: x11_backend_deliver_motion_event(b, event); commit 4ddc4cc4fae83c48fc9d40ec4bd0cbb38ba183ff Author: Benoit Gschwind <gschw...@gnu-log.net> Date: Wed May 18 21:32:11 2016 +0200 compositor-x11: add assert to avoid misuse of x11_backend_deliver_button_event The x11_backend_deliver_button_event can be called with any xcb_generic_event. The assert check if the call is done with the expected events. Signed-off-by: Benoit Gschwind <gschw...@gnu-log.net> Reviewed-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c index b900184..5562b9f 100644 --- a/libweston/compositor-x11.c +++ b/libweston/compositor-x11.c @@ -1068,6 +1068,9 @@ x11_backend_deliver_button_event(struct x11_backend *b, struct x11_output *output; struct weston_pointer_axis_event weston_event; + assert(event->response_type == XCB_BUTTON_PRESS || + event->response_type == XCB_BUTTON_RELEASE); + output = x11_backend_find_output(b, button_event->event); if (!output) return; commit 482ffdf0064113f96aa09646fc21fc5109fc8b75 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 8 12:50:57 2016 -0500 compositor-drm: Stop sending uninit data to the kernel Valgrind noticed that we send uninit data to drmModeAddFB2. While the kernel should never read this (because of the plane format), it's probably still nicer to zero the data before we send it. Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-by: Yong Bakos <yba...@humanoriented.com> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 5c9bfd9..4825b46 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -394,7 +394,7 @@ drm_fb_get_from_bo(struct gbm_bo *bo, { struct drm_fb *fb = gbm_bo_get_user_data(bo); uint32_t width, height; - uint32_t handles[4], pitches[4], offsets[4]; + uint32_t handles[4] = { 0 }, pitches[4] = { 0 }, offsets[4] = { 0 }; int ret; if (fb) commit b40b827f83c476c52c1478f16b37db9facf905e3 Author: Pekka Paalanen <pekka.paala...@collabora.co.uk> Date: Mon Aug 15 14:06:15 2016 +0300 configure.ac: check weston vs. libweston versions Check that the defined versions for Weston and libweston are consistent and according to the version bumping rules: - In pre-release and only pre-release versions the weston and libweston may differ - when they differ, libweston version must be exactly (weston.major+1).0.0 - otherwise, the versions must be exactly the same. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> Acked-by: Jonas Ådahl <jad...@gmail.com> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> diff --git a/configure.ac b/configure.ac index 76db759..cac3e7d 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,38 @@ AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests s AM_SILENT_RULES([yes]) +# Check Weston and libweston version consistency +m4_if(m4_cmp(weston_micro_version, [90]), [-1], + [ + dnl micro < 90 + dnl A final or stable release, not a pre-release: + dnl Weston and libweston versions must match. + m4_if(weston_version, libweston_major_version[.]libweston_minor_version[.]libweston_patch_version, + [], + [AC_MSG_ERROR([Weston and libweston version mismatch for a final release])]) + ], + [ + dnl A pre-release: + dnl libweston must be equal or greater than weston. + m4_case(m4_list_cmp([weston_major_version, weston_minor_version, weston_micro_version], + [libweston_major_version, libweston_minor_version, libweston_patch_version]), + [-1], [ + dnl weston < libweston + dnl libweston must be weston_major+1.0.0 + m4_if(m4_eval(weston_major_version+1)[.0.0], + libweston_major_version[.]libweston_minor_version[.]libweston_patch_version, + [], + [AC_MSG_ERROR([libweston version is greater but not (weston_major+1).0.0])]) + ], + [0], [ + dnl weston == libweston, all ok + ], + [1], [ + dnl weston > libweston, wrong + AC_MSG_ERROR([Weston version is greater than libweston.]) + ]) + ]) + # Check for programs AC_PROG_CC AC_PROG_SED commit 85a4e19944af0971e0acc5597c92fc21c17cdabe Author: Pekka Paalanen <pekka.paala...@collabora.co.uk> Date: Mon Aug 15 14:16:05 2016 +0300 configure.ac: bump libweston version to match weston This bump is required for the following patch that adds strict version consistency checking between weston and libweston. This bumps libweston major from 0 to 1. All libweston users need to adapt. This major bump would have to be made on the 1.11.91 release anyway. Cc: Giulio Camuffo <giuliocamu...@gmail.com> Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> diff --git a/configure.ac b/configure.ac index fe65bda..76db759 100644 --- a/configure.ac +++ b/configure.ac @@ -3,9 +3,9 @@ m4_define([weston_minor_version], [11]) m4_define([weston_micro_version], [90]) m4_define([weston_version], [weston_major_version.weston_minor_version.weston_micro_version]) -m4_define([libweston_major_version], [0]) -m4_define([libweston_minor_version], [0]) -m4_define([libweston_patch_version], [0]) +m4_define([libweston_major_version], [1]) +m4_define([libweston_minor_version], [11]) +m4_define([libweston_patch_version], [90]) AC_PREREQ([2.64]) AC_INIT([weston], commit 72416979cbd5864915f9bc0116ac1a512bcb1173 Author: Pekka Paalanen <pekka.paala...@collabora.co.uk> Date: Wed Aug 10 14:54:08 2016 +0300 README: updates on libweston versioning We have agreed to use the major as the ABI-version, so talk about major to avoid confusion. Remove unncessary or incorrect wording related to breaking ABI on minor bumps. Explain a little about the weston vs. libweston version numbers. v2: