From bb0882c5dad030f676e424265ebcd869bb3ff899 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Mon, 16 Apr 2018 22:14:52 +0200 Subject: Introduce meta-agl-profile-core and meta-agl-profile-graphics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ...t-introcuded-surface_create_and_configure.patch | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch (limited to 'meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch') diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch new file mode 100644 index 000000000..04461a1d4 --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch @@ -0,0 +1,117 @@ +index 68ca68ba..c86cbb11 100644 +--- a/ivi-shell/ivi-layout-shell.h ++++ b/ivi-shell/ivi-layout-shell.h +@@ -39,6 +39,14 @@ struct weston_view; + struct weston_surface; + struct ivi_layout_surface; + ++void ++ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf, ++ int32_t width, int32_t height); ++ ++struct ivi_layout_surface* ++ivi_layout_desktop_surface_create(struct weston_surface *wl_surface, ++ uint32_t id_surface); ++ + void + ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf, + int32_t width, int32_t height); +diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c +index 690af742..086d0fd2 100644 +--- a/ivi-shell/ivi-layout.c ++++ b/ivi-shell/ivi-layout.c +@@ -1995,20 +1995,8 @@ ivi_layout_surface_dump(struct weston_surface *surface, + * methods of interaction between ivi-shell with ivi-layout + */ + +-void +-ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf, +- int32_t width, int32_t height) +-{ +- struct ivi_layout *layout = get_instance(); +- +- /* emit callback which is set by ivi-layout api user */ +- wl_signal_emit(&layout->surface_notification.configure_changed, +- ivisurf); +-} +- +-struct ivi_layout_surface* +-ivi_layout_surface_create(struct weston_surface *wl_surface, +- uint32_t id_surface) ++static struct ivi_layout_surface* ++surface_create(struct weston_surface *wl_surface, uint32_t id_surface) + { + struct ivi_layout *layout = get_instance(); + struct ivi_layout_surface *ivisurf = NULL; +@@ -2018,14 +2006,6 @@ ivi_layout_surface_create(struct weston_surface *wl_surface, + return NULL; + } + +- ivisurf = get_surface(&layout->surface_list, id_surface); +- if (ivisurf != NULL) { +- if (ivisurf->surface != NULL) { +- weston_log("id_surface(%d) is already created\n", id_surface); +- return NULL; +- } +- } +- + ivisurf = calloc(1, sizeof *ivisurf); + if (ivisurf == NULL) { + weston_log("fails to allocate memory\n"); +@@ -2049,7 +2029,55 @@ ivi_layout_surface_create(struct weston_surface *wl_surface, + + wl_list_insert(&layout->surface_list, &ivisurf->link); + +- wl_signal_emit(&layout->surface_notification.created, ivisurf); ++ return ivisurf; ++} ++ ++void ++ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf, ++ int32_t width, int32_t height) ++{ ++ struct ivi_layout *layout = get_instance(); ++ ++ /* emit callback which is set by ivi-layout api user */ ++ wl_signal_emit(&layout->surface_notification.configure_desktop_changed, ++ ivisurf); ++} ++ ++struct ivi_layout_surface* ++ivi_layout_desktop_surface_create(struct weston_surface *wl_surface, ++ uint32_t id_surface) ++{ ++ return surface_create(wl_surface, id_surface); ++} ++ ++void ++ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf, ++ int32_t width, int32_t height) ++{ ++ struct ivi_layout *layout = get_instance(); ++ ++ /* emit callback which is set by ivi-layout api user */ ++ wl_signal_emit(&layout->surface_notification.configure_changed, ++ ivisurf); ++} ++ ++struct ivi_layout_surface* ++ivi_layout_surface_create(struct weston_surface *wl_surface, ++ uint32_t id_surface) ++{ ++ struct ivi_layout *layout = get_instance(); ++ struct ivi_layout_surface *ivisurf = NULL; ++ ++ ivisurf = get_surface(&layout->surface_list, id_surface); ++ if (ivisurf) { ++ weston_log("id_surface(%d) is already created\n", id_surface); ++ return NULL; ++ } ++ ++ ivisurf = surface_create(wl_surface, id_surface); ++ ++ if (ivisurf) ++ wl_signal_emit(&layout->surface_notification.created, ivisurf); + + return ivisurf; + } -- cgit 1.2.3-korg