Merge "[RCAR] Update Rcar gen3 BSP to 3.6"
[AGL/meta-agl.git] / meta-agl-profile-graphical / recipes-graphics / wayland / weston / 0013-simple-egl-remove-ivi-application-support.patch
1 index 23f79dfe..f9c8010b 100644
2 --- a/Makefile.am
3 +++ b/Makefile.am
4 @@ -616,9 +616,7 @@ demo_clients += weston-simple-egl
5  weston_simple_egl_SOURCES = clients/simple-egl.c
6  nodist_weston_simple_egl_SOURCES =             \
7         protocol/xdg-shell-unstable-v6-protocol.c               \
8 -       protocol/xdg-shell-unstable-v6-client-protocol.h        \
9 -       protocol/ivi-application-protocol.c             \
10 -       protocol/ivi-application-client-protocol.h
11 +       protocol/xdg-shell-unstable-v6-client-protocol.h
12  weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
13  weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
14  endif
15 diff --git a/clients/simple-egl.c b/clients/simple-egl.c
16 index dad0f09b..07e7e785 100644
17 --- a/clients/simple-egl.c
18 +++ b/clients/simple-egl.c
19 @@ -45,8 +45,6 @@
20  #include "xdg-shell-unstable-v6-client-protocol.h"
21  #include <sys/types.h>
22  #include <unistd.h>
23 -#include "ivi-application-client-protocol.h"
24 -#define IVI_SURFACE_ID 9000
25  
26  #include "shared/helpers.h"
27  #include "shared/platform.h"
28 @@ -74,7 +72,6 @@ struct display {
29                 EGLConfig conf;
30         } egl;
31         struct window *window;
32 -       struct ivi_application *ivi_application;
33  
34         PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC swap_buffers_with_damage;
35  };
36 @@ -97,7 +94,6 @@ struct window {
37         struct wl_surface *surface;
38         struct zxdg_surface_v6 *xdg_surface;
39         struct zxdg_toplevel_v6 *xdg_toplevel;
40 -       struct ivi_surface *ivi_surface;
41         EGLSurface egl_surface;
42         struct wl_callback *callback;
43         int fullscreen, opaque, buffer_size, frame_sync, delay;
44 @@ -355,27 +351,22 @@ static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
45  };
46  
47  static void
48 -handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface,
49 -                             int32_t width, int32_t height)
50 +create_surface(struct window *window)
51  {
52 -       struct window *window = data;
53 -
54 -       wl_egl_window_resize(window->native, width, height, 0, 0);
55 -
56 -       window->geometry.width = width;
57 -       window->geometry.height = height;
58 +       struct display *display = window->display;
59 +       EGLBoolean ret;
60  
61 -       if (!window->fullscreen)
62 -               window->window_size = window->geometry;
63 -}
64 +       window->surface = wl_compositor_create_surface(display->compositor);
65  
66 -static const struct ivi_surface_listener ivi_surface_listener = {
67 -       handle_ivi_surface_configure,
68 -};
69 +       window->native =
70 +               wl_egl_window_create(window->surface,
71 +                                    window->geometry.width,
72 +                                    window->geometry.height);
73 +       window->egl_surface =
74 +               weston_platform_create_egl_surface(display->egl.dpy,
75 +                                                  display->egl.conf,
76 +                                                  window->native, NULL);
77  
78 -static void
79 -create_xdg_surface(struct window *window, struct display *display)
80 -{
81         window->xdg_surface = zxdg_shell_v6_get_xdg_surface(display->shell,
82                                                             window->surface);
83         zxdg_surface_v6_add_listener(window->xdg_surface,
84 @@ -390,50 +381,6 @@ create_xdg_surface(struct window *window, struct display *display)
85  
86         window->wait_for_configure = true;
87         wl_surface_commit(window->surface);
88 -}
89 -
90 -static void
91 -create_ivi_surface(struct window *window, struct display *display)
92 -{
93 -       uint32_t id_ivisurf = IVI_SURFACE_ID + (uint32_t)getpid();
94 -       window->ivi_surface =
95 -               ivi_application_surface_create(display->ivi_application,
96 -                                              id_ivisurf, window->surface);
97 -
98 -       if (window->ivi_surface == NULL) {
99 -               fprintf(stderr, "Failed to create ivi_client_surface\n");
100 -               abort();
101 -       }
102 -
103 -       ivi_surface_add_listener(window->ivi_surface,
104 -                                &ivi_surface_listener, window);
105 -}
106 -
107 -static void
108 -create_surface(struct window *window)
109 -{
110 -       struct display *display = window->display;
111 -       EGLBoolean ret;
112 -
113 -       window->surface = wl_compositor_create_surface(display->compositor);
114 -
115 -       window->native =
116 -               wl_egl_window_create(window->surface,
117 -                                    window->geometry.width,
118 -                                    window->geometry.height);
119 -       window->egl_surface =
120 -               weston_platform_create_egl_surface(display->egl.dpy,
121 -                                                  display->egl.conf,
122 -                                                  window->native, NULL);
123 -
124 -
125 -       if (display->shell) {
126 -               create_xdg_surface(window, display);
127 -       } else if (display->ivi_application ) {
128 -               create_ivi_surface(window, display);
129 -       } else {
130 -               assert(0);
131 -       }
132  
133         ret = eglMakeCurrent(window->display->egl.dpy, window->egl_surface,
134                              window->egl_surface, window->display->egl.ctx);
135 @@ -465,8 +412,6 @@ destroy_surface(struct window *window)
136                 zxdg_toplevel_v6_destroy(window->xdg_toplevel);
137         if (window->xdg_surface)
138                 zxdg_surface_v6_destroy(window->xdg_surface);
139 -       if (window->display->ivi_application)
140 -               ivi_surface_destroy(window->ivi_surface);
141         wl_surface_destroy(window->surface);
142  
143         if (window->callback)
144 @@ -821,10 +766,6 @@ registry_handle_global(void *data, struct wl_registry *registry,
145                         fprintf(stderr, "unable to load default left pointer\n");
146                         // TODO: abort ?
147                 }
148 -       } else if (strcmp(interface, "ivi_application") == 0) {
149 -               d->ivi_application =
150 -                       wl_registry_bind(registry, name,
151 -                                        &ivi_application_interface, 1);
152         }
153  }
154  
155 @@ -939,9 +880,6 @@ main(int argc, char **argv)
156         if (display.shell)
157                 zxdg_shell_v6_destroy(display.shell);
158  
159 -       if (display.ivi_application)
160 -               ivi_application_destroy(display.ivi_application);
161 -
162         if (display.compositor)
163                 wl_compositor_destroy(display.compositor);
164