diff options
author | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2018-04-16 22:14:52 +0200 |
---|---|---|
committer | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2018-04-20 17:07:06 +0200 |
commit | bb0882c5dad030f676e424265ebcd869bb3ff899 (patch) | |
tree | d95bb2d7ad6b5ac47427f73babe015b0ade02342 /meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension | |
parent | 97e5e76efa44f55ee9aaf3998bb3df38b829706c (diff) |
Introduce meta-agl-profile-core and meta-agl-profile-graphics
Rework towards agl profiles.
This change is part of a series of changes to create the
AGL profiles.
This set will mainly introduce the 'core' profile.
It is setup to be a drop-in change, thus some files were kept
in (dummy) locations for now.
However, they'll be taken care of in the next changes in this series.
The main target of the meta-agl-profile-core layer is to host:
- a minimal, bootable image with network and package management enabled
-- agl-image-boot
- a minimal image with network and packagemanagement and the AGL APIs
-- agl-image-minimal
The layer meta-agl-profile-graphical is used as superset of these
and includes support for egl+wayland+weston. All recipes concerning
graphics were moved there. This is not a full profile as we still have
to migrate some parts of meta-agl-demo in a follow-up changeset.
The roadmap as discussed during the F2F session in Karlsruhe is:
- week 16 : core profile and profiles w/o graphics
- week 17 : graphical profiles
- week 18 : final conversion of the demo image
v2: moved agl-login-manager from -graphics to -core (see Jose's comment)
v3: moved back after discussion - follow-up in separate changeset
Change-Id: Idacb0d1274baac1f63f8d1b850d4b1104ac33918
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension')
6 files changed, 452 insertions, 0 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Resolve-weston-crush-when-repeat-touching-very-quick.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Resolve-weston-crush-when-repeat-touching-very-quick.patch new file mode 100644 index 000000000..636ecf1b9 --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Resolve-weston-crush-when-repeat-touching-very-quick.patch @@ -0,0 +1,31 @@ +From 97af4843a4705cd7d5b6b69abb9002fd974a5b94 Mon Sep 17 00:00:00 2001 +From: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com> +Date: Fri, 12 Jan 2018 01:53:01 +0900 +Subject: [PATCH] Resolve weston cursh when repeat touching very quickly + +Weston sometimes crush while the user repeat touching very +quickly icons/shortcuts on HomeScreen. + +Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com> +--- + ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c +index b0fe37d..f1a31d0 100644 +--- a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c ++++ b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c +@@ -557,6 +557,10 @@ touch_grab_up(struct weston_touch_grab *grab, uint32_t time, int touch_id) + const struct ivi_layout_interface *interface = + seat->input_ctx->ivi_layout_interface; + ++ /* if touch device has no focused view, there is nothing to do*/ ++ if (grab->touch->focus == NULL) ++ return; ++ + /* For each surface_ctx, check for focus and send */ + wl_list_for_each(surf_ctx, &seat->input_ctx->surface_list, link) { + struct weston_surface *surf, *send_surf; +-- +2.7.4 + diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-simple-id-agent-initial-commit.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-simple-id-agent-initial-commit.patch new file mode 100644 index 000000000..9e95167ed --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-simple-id-agent-initial-commit.patch @@ -0,0 +1,264 @@ +From 8f67f40f7c6b6f62e094f0bdc5044793ae76b1c7 Mon Sep 17 00:00:00 2001 +From: Emre Ucan <eucan@de.adit-jv.com> +Date: Fri, 24 Nov 2017 16:24:51 +0100 +Subject: [PATCH 1/2] simple-id-agent: initial commit + +it is a very simple id-agent plugin. +It is possible to configure default surface id +offset. Assigned ids would start +from the given id offset. + +Please check the example weston.ini for loading +and configuring the simple-id-agent + +Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> +--- + CMakeLists.txt | 1 + + id-agent-modules/simple-id-agent/CMakeLists.txt | 72 ++++++++++++ + .../simple-id-agent/src/simple-id-agent.c | 124 +++++++++++++++++++++ + id-agent-modules/simple-id-agent/weston.ini.in | 11 ++ + 4 files changed, 208 insertions(+) + create mode 100644 id-agent-modules/simple-id-agent/CMakeLists.txt + create mode 100644 id-agent-modules/simple-id-agent/src/simple-id-agent.c + create mode 100644 id-agent-modules/simple-id-agent/weston.ini.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bad85df..d07abf5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,6 +35,7 @@ add_subdirectory(ivi-layermanagement-api/ilmClient) + add_subdirectory(ivi-layermanagement-api/ilmControl) + add_subdirectory(ivi-layermanagement-api/test) + add_subdirectory(ivi-layermanagement-examples) ++add_subdirectory(id-agent-modules/simple-id-agent) + + if(WITH_ILM_INPUT) + add_subdirectory(ivi-input-api/ilmInput) +diff --git a/id-agent-modules/simple-id-agent/CMakeLists.txt b/id-agent-modules/simple-id-agent/CMakeLists.txt +new file mode 100644 +index 0000000..8290722 +--- /dev/null ++++ b/id-agent-modules/simple-id-agent/CMakeLists.txt +@@ -0,0 +1,72 @@ ++############################################################################ ++# ++# Copyright (C) 2013 DENSO CORPORATION ++# Copyright 2014 BMW Car IT GmbH ++# ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++############################################################################ ++ ++cmake_minimum_required (VERSION 2.6) ++ ++project(simple-id-agent) ++ ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(WAYLAND_SERVER wayland-server>=1.13.0 REQUIRED) ++pkg_check_modules(WESTON weston>=2.0.0 REQUIRED) ++pkg_check_modules(PIXMAN pixman-1 REQUIRED) ++ ++find_package(Threads REQUIRED) ++ ++GET_TARGET_PROPERTY(IVI_EXTENSION_INCLUDE_DIRS ivi-extension-protocol INCLUDE_DIRECTORIES) ++ ++include_directories( ++ src ++ ${IVI_EXTENSION_INCLUDE_DIRS} ++ ${WAYLAND_SERVER_INCLUDE_DIRS} ++ ${WESTON_INCLUDE_DIRS} ++ ${PIXMAN_INCLUDE_DIRS} ++) ++ ++link_directories( ++ ${WAYLAND_SERVER_LIBRARY_DIRS} ++ ${PIXMAN_LIBRARY_DIRS} ++) ++ ++add_library(${PROJECT_NAME} MODULE ++ src/simple-id-agent.c ++) ++ ++set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") ++ ++add_dependencies(${PROJECT_NAME} ++ ivi-extension-protocol ++ ${WAYLAND_SERVER_LIBRARIES} ++ ${PIXMAN_LIBRARIES} ++) ++ ++set(LIBS ++ ${LIBS} ++ ivi-extension-protocol ++ ${WAYLAND_SERVER_LIBRARIES} ++) ++ ++set(CMAKE_C_LDFLAGS "-module -avoid-version") ++ ++target_link_libraries(${PROJECT_NAME} ${LIBS}) ++ ++install ( ++ TARGETS ${PROJECT_NAME} ++ LIBRARY DESTINATION lib${LIB_SUFFIX}/weston ++) +diff --git a/id-agent-modules/simple-id-agent/src/simple-id-agent.c b/id-agent-modules/simple-id-agent/src/simple-id-agent.c +new file mode 100644 +index 0000000..3c9e989 +--- /dev/null ++++ b/id-agent-modules/simple-id-agent/src/simple-id-agent.c +@@ -0,0 +1,124 @@ ++/* ++ * Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH ++ * ++ * 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 <stdlib.h> ++#include <stdio.h> ++#include <string.h> ++#include <limits.h> ++ ++#include <weston.h> ++#include <weston/ivi-layout-export.h> ++ ++struct ivi_id_agent ++{ ++ uint32_t default_id_offset; ++ uint32_t last_assigned_id; ++ struct weston_compositor *compositor; ++ const struct ivi_layout_interface *interface; ++ struct wl_listener desktop_surface_configured; ++}; ++ ++static void ++desktop_surface_event_configure(struct wl_listener *listener, ++ void *data) ++{ ++ struct ivi_id_agent *ida = wl_container_of(listener, ida, ++ desktop_surface_configured); ++ struct ivi_layout_surface *layout_surface = ++ (struct ivi_layout_surface *) data; ++ uint32_t tmp_id; ++ ++ tmp_id = ++ida->last_assigned_id; ++ ++ /* Find an unused id */ ++ while(ida->interface->get_surface_from_id(tmp_id)) { ++ weston_log("simple-id-agent: surface id: %d is already used\n", tmp_id); ++ tmp_id++; ++ } ++ ++ ida->last_assigned_id = tmp_id; ++ ++ if (ida->interface->surface_set_id(layout_surface, ida->last_assigned_id) != 0) ++ weston_log("simple-id-agent: failed to set surface id :%d\n", ida->last_assigned_id); ++} ++ ++static void ++deinit(struct ivi_id_agent *ida) ++{ ++ wl_list_remove(&ida->desktop_surface_configured.link); ++ free(ida); ++} ++ ++static int32_t ++read_config(struct ivi_id_agent *ida) ++{ ++ struct weston_config *config = NULL; ++ struct weston_config_section *section = NULL; ++ const char *name = NULL; ++ ++ config = wet_get_config(ida->compositor); ++ if (!config) ++ return -1; ++ ++ section = weston_config_get_section(config, "id-agent", NULL, NULL); ++ ++ if (section) { ++ ++ weston_config_section_get_uint(section, "default-id-offset", ++ &ida->default_id_offset, 0); ++ ++ } else { ++ ida->default_id_offset = 0; ++ } ++ ++ return 0; ++} ++ ++WL_EXPORT int32_t ++id_agent_module_init(struct weston_compositor *ec, ++ const struct ivi_layout_interface *interface, ++ size_t interface_version) ++{ ++ struct ivi_id_agent *ida; ++ ++ ida = calloc(1, sizeof *ida); ++ if (ida == NULL) { ++ weston_log("failed to allocate ivi_id_agent\n"); ++ return -1; ++ } ++ ++ ida->compositor = ec; ++ ida->interface = interface; ++ ida->desktop_surface_configured.notify = desktop_surface_event_configure; ++ ida->interface->add_listener_configure_desktop_surface(&ida->desktop_surface_configured); ++ ++ if(read_config(ida) != 0) { ++ deinit(ida); ++ return -1; ++ } ++ ++ ida->last_assigned_id = ida->default_id_offset; ++ ++ weston_log("id_agent_module_init: success\n"); ++ ++ return 0; ++} +diff --git a/id-agent-modules/simple-id-agent/weston.ini.in b/id-agent-modules/simple-id-agent/weston.ini.in +new file mode 100644 +index 0000000..b5e5fa1 +--- /dev/null ++++ b/id-agent-modules/simple-id-agent/weston.ini.in +@@ -0,0 +1,11 @@ ++[core] ++shell=ivi-shell.so ++require-input=false ++ ++[ivi-shell] ++ivi-module=ivi-controller.so ++ivi-input-module=ivi-input-controller.so ++id-agent-module=simple-id-agent.so ++ ++[id-agent] ++default-id-offset=10 +-- +2.13.6 + diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-controller-load-id-agent-module.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-controller-load-id-agent-module.patch new file mode 100644 index 000000000..f44786a36 --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-controller-load-id-agent-module.patch @@ -0,0 +1,69 @@ +From 26f2f7ce78ba2002809048b227ad9c35921a9cd8 Mon Sep 17 00:00:00 2001 +From: Emre Ucan <eucan@de.adit-jv.com> +Date: Fri, 24 Nov 2017 16:27:01 +0100 +Subject: [PATCH 2/2] ivi-controller: load id-agent module + +Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> +--- + weston-ivi-shell/src/ivi-controller.c | 39 +++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c +index 312a978..47b6de2 100644 +--- a/weston-ivi-shell/src/ivi-controller.c ++++ b/weston-ivi-shell/src/ivi-controller.c +@@ -1518,6 +1518,40 @@ load_input_module(struct weston_compositor *ec, + return 0; + } + ++static int load_id_agent_module(struct weston_compositor *ec, ++ const struct ivi_layout_interface *interface, ++ size_t interface_version) ++{ ++ struct weston_config *config = wet_get_config(ec); ++ struct weston_config_section *section; ++ char *id_agent_module = NULL; ++ ++ int (*id_agent_module_init)(struct weston_compositor *ec, ++ const struct ivi_layout_interface *interface, ++ size_t interface_version); ++ ++ section = weston_config_get_section(config, "ivi-shell", NULL, NULL); ++ ++ if (weston_config_section_get_string(section, "id-agent-module", ++ &id_agent_module, NULL) < 0) { ++ weston_log("ivi-controller: No id-agent-module set\n"); ++ return 0; ++ } ++ ++ id_agent_module_init = wet_load_module_entrypoint(id_agent_module, "id_agent_module_init"); ++ if (!id_agent_module_init) ++ return -1; ++ ++ if (id_agent_module_init(ec, interface, ++ sizeof(struct ivi_layout_interface)) != 0) { ++ weston_log("ivi-controller: Initialization of id agent module fails\n"); ++ return -1; ++ } ++ ++ free(id_agent_module); ++ return 0; ++} ++ + WL_EXPORT int + controller_module_init(struct weston_compositor *compositor, + int *argc, char *argv[], +@@ -1555,5 +1589,10 @@ controller_module_init(struct weston_compositor *compositor, + return -1; + } + ++ if (load_id_agent_module(compositor, interface, interface_version) < 0) { ++ free(shell); ++ return -1; ++ } ++ + return 0; + } +-- +2.13.6 + diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-add-resize-setting-suit-to-surface-si.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-add-resize-setting-suit-to-surface-si.patch new file mode 100644 index 000000000..d2d027256 --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-add-resize-setting-suit-to-surface-si.patch @@ -0,0 +1,62 @@ +From 525b5bf65303d661f44c01b11bafd5ba90976850 Mon Sep 17 00:00:00 2001 +From: Wataru Mizuno <wmizuno@jp.adit-jv.com> +Date: Wed, 6 Dec 2017 19:35:51 +0900 +Subject: [PATCH] ivi-controller: add resize setting suit to surface size + +The ivi-controller resizes surface size like desktop usecase. + +When window manager swicths the half size window to full size, +resize was not working correctly. +This patch fixs this issue by changing surface source region at +the same timing of destination region is changed. + +This patch is not necessary later version of wayland-ivi-extension +2.0 since this resize function has already been implemented by +appropriate manner. + +Signed-off-by: Wataru Mizuno <wmizuno@jp.adit-jv.com> +--- + weston-ivi-shell/src/ivi-controller.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c +index 312a978..9450cf2 100644 +--- a/weston-ivi-shell/src/ivi-controller.c ++++ b/weston-ivi-shell/src/ivi-controller.c +@@ -1334,7 +1334,7 @@ surface_event_configure(struct wl_listener *listener, void *data) + struct ivisurface *ivisurf = NULL; + struct ivi_layout_surface *layout_surface = + (struct ivi_layout_surface *) data; +- const struct ivi_layout_surface_properties *prop; ++ struct weston_surface *w_surface; + + ivisurf = get_surface(&shell->list_surface, layout_surface); + if (ivisurf == NULL) { +@@ -1342,11 +1342,22 @@ surface_event_configure(struct wl_listener *listener, void *data) + return; + } + +- prop = lyt->get_properties_of_surface(layout_surface); ++ w_surface = lyt->surface_get_weston_surface(layout_surface); ++ lyt->surface_set_destination_rectangle(layout_surface, ++ ivisurf->prop->dest_x, ++ ivisurf->prop->dest_y, ++ w_surface->width, ++ w_surface->height); ++ lyt->surface_set_source_rectangle(layout_surface, ++ 0, ++ 0, ++ w_surface->width, ++ w_surface->height); ++ lyt->commit_changes(); + + wl_resource_for_each(resource, &ivisurf->resource_list) { + send_surface_event(resource, ivisurf, +- prop, IVI_NOTIFICATION_CONFIGURE); ++ ivisurf->prop, IVI_NOTIFICATION_CONFIGURE); + } + } + +-- +2.7.4 + diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/disable-sanitizer-tests.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/disable-sanitizer-tests.patch new file mode 100644 index 000000000..df5d616fd --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/disable-sanitizer-tests.patch @@ -0,0 +1,13 @@ +Index: git/ivi-layermanagement-api/test/CMakeLists.txt +=================================================================== +--- git.orig/ivi-layermanagement-api/test/CMakeLists.txt ++++ git/ivi-layermanagement-api/test/CMakeLists.txt +@@ -58,7 +58,7 @@ IF(BUILD_ILM_API_TESTS) + ) + + SET(GCC_SANITIZER_COMPILE_FLAGS "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fstack-protector-all") +- SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_SANITIZER_COMPILE_FLAGS}" ) ++ SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" ) + SET( CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libasan -static-libubsan" ) + + ADD_EXECUTABLE(${PROJECT_NAME} ${SRC_FILES}) diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch new file mode 100644 index 000000000..86b448be1 --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3610fa9..8b4614d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,7 +34,7 @@ add_subdirectory(ivi-layermanagement-api/ilmCommon) + add_subdirectory(ivi-layermanagement-api/ilmClient) + add_subdirectory(ivi-layermanagement-api/ilmControl) + add_subdirectory(ivi-layermanagement-api/test) +-add_subdirectory(ivi-layermanagement-examples) ++#add_subdirectory(ivi-layermanagement-examples) + + if(WITH_ILM_INPUT) + add_subdirectory(ivi-input-api/ilmInput) |