Merge lp:~kdub/mir/real-nested-platform into lp:mir
- real-nested-platform
- Merge into development-branch
Status: | Work in progress |
---|---|
Proposed branch: | lp:~kdub/mir/real-nested-platform |
Merge into: | lp:mir |
Diff against target: |
1096 lines (+312/-160) 42 files modified
debian/control (+16/-0) debian/mir-platform-graphics-nested11.install (+1/-0) include/platform/mir/graphics/gl_extensions_base.h (+3/-3) include/platform/mir/graphics/platform.h (+14/-12) include/platform/mir/graphics/surfaceless_egl_context.h (+3/-3) src/include/server/mir/default_server_configuration.h (+0/-1) src/platform/graphics/CMakeLists.txt (+5/-1) src/platform/graphics/gl_extensions_base.cpp (+3/-3) src/platform/graphics/surfaceless_egl_context.cpp (+3/-3) src/platform/symbols.map (+1/-0) src/platforms/CMakeLists.txt (+1/-0) src/platforms/android/server/platform.cpp (+2/-1) src/platforms/android/utils/render_overlays.cpp (+1/-1) src/platforms/eglstream-kms/server/platform_symbols.cpp (+2/-1) src/platforms/mesa/server/kms/platform_symbols.cpp (+2/-1) src/platforms/mesa/server/x11/graphics/graphics.cpp (+2/-1) src/platforms/nested/CMakeLists.txt (+42/-0) src/platforms/nested/display.cpp (+3/-3) src/platforms/nested/platform.cpp (+140/-0) src/platforms/nested/symbols.map.in (+20/-0) src/server/CMakeLists.txt (+0/-1) src/server/graphics/CMakeLists.txt (+0/-4) src/server/graphics/default_configuration.cpp (+7/-74) src/server/input/default_configuration.cpp (+0/-12) src/server/symbols.map (+0/-1) tests/acceptance-tests/test_nested_mir.cpp (+1/-0) tests/include/mir/test/doubles/stub_host_connection.h (+7/-5) tests/mir_test_framework/headless_nested_server_runner.cpp (+1/-1) tests/mir_test_framework/platform_graphics_throw.cpp (+3/-2) tests/mir_test_framework/stubbed_graphics_platform.cpp (+2/-1) tests/unit-tests/input/CMakeLists.txt (+0/-1) tests/unit-tests/platforms/android/server/test_display_generic.cpp (+4/-8) tests/unit-tests/platforms/android/server/test_graphics_platform.cpp (+2/-1) tests/unit-tests/platforms/nested/CMakeLists.txt (+2/-0) tests/unit-tests/platforms/nested/test_buffer.cpp (+5/-2) tests/unit-tests/platforms/nested/test_ipc_operations.cpp (+2/-2) tests/unit-tests/platforms/nested/test_nested_cursor.cpp (+1/-1) tests/unit-tests/platforms/nested/test_nested_display.cpp (+3/-3) tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp (+5/-5) tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp (+1/-1) tests/unit-tests/platforms/nested/test_nested_input_platform.cpp (+1/-1) tools/update_package_abis.sh (+1/-0) |
To merge this branch: | bzr merge lp:~kdub/mir/real-nested-platform |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Cemil Azizoglu (community) | Needs Fixing | ||
Andreas Pokorny (community) | Needs Fixing | ||
Review via email: mp+304261@code.launchpad.net |
Commit message
Make the nested platform into a proper platform that's loaded via the standard platform loading interfaces. Split the nested code into its own platform and package.
Description of the change
Make the nested platform into a proper platform that's loaded via the standard platform loading interfaces. Split the nested code into its own platform and package.
Tested package building, installation, and running on yakkety.
Future cleanups that we can do as a result of this:
1) remove libmirclient dependency from mirserver
2) remove the concept of 'guest platforms' from the platform interface
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3682
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Kevin DuBois (kdub) wrote : | # |
^could be problem with the MP, investigating further
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3682
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 3683. By Kevin DuBois
-
merge in mir
- 3684. By Kevin DuBois
-
increase timeouts for lp:#1523621 for some tests that were still set to a low value
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3684
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 3685. By Kevin DuBois
-
correct silent or undetected merge errors with new files
Andreas Pokorny (andreas-pokorny) wrote : | # |
tests/mir_
No need to append the ABI counter to the call, mtf::server_
Please rename the server module to be server-nested instead of graphics-nested, as it also contains the input platform ABI.
Mild needs fixing - as apart from that it works fine here.
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3685
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
I know it's legacy but I don't think 'nested' is the right name. It should be named 'mir' as that's the platform it's running under. 'nested' as a generic term applies to others also like mir running under X11 is also "nested".
-------
+1 on the name change that Andreas has mentioned
Kevin DuBois (kdub) wrote : | # |
not actively working on this, wip
- 3686. By Kevin DuBois
-
remove timeout increases, they didnt help with CI
- 3687. By Kevin DuBois
-
merge in mir
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3687
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 3688. By Kevin DuBois
-
merge in base, fix many conflicts
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3688
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unmerged revisions
- 3688. By Kevin DuBois
-
merge in base, fix many conflicts
- 3687. By Kevin DuBois
-
merge in mir
- 3686. By Kevin DuBois
-
remove timeout increases, they didnt help with CI
- 3685. By Kevin DuBois
-
correct silent or undetected merge errors with new files
- 3684. By Kevin DuBois
-
increase timeouts for lp:#1523621 for some tests that were still set to a low value
- 3683. By Kevin DuBois
-
merge in mir
- 3682. By Kevin DuBois
-
fix up test
- 3681. By Kevin DuBois
-
merge in mir
- 3680. By Kevin DuBois
-
merge in mir
- 3679. By Kevin DuBois
-
clean up probing a bit
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2016-11-11 07:56:09 +0000 |
3 | +++ debian/control 2016-11-23 13:17:56 +0000 |
4 | @@ -375,6 +375,20 @@ |
5 | Contains the shared libraries required for the Mir server to interact with |
6 | the hardware platform using the Android drivers. |
7 | |
8 | +Package: mir-platform-graphics-nested11 |
9 | +Section: libs |
10 | +Architecture: linux-any |
11 | +Multi-Arch: same |
12 | +Pre-Depends: ${misc:Pre-Depends} |
13 | +Depends: ${misc:Depends}, |
14 | + ${shlibs:Depends}, |
15 | +Description: Display server for Ubuntu - platform library for Nested servers |
16 | + Mir is a display server running on linux systems, with a focus on efficiency, |
17 | + robust operation and a well-defined driver model. |
18 | + . |
19 | + Contains the shared libraries required for the Mir server to connect to |
20 | + another Mir server. |
21 | + |
22 | Package: mir-platform-input-evdev6 |
23 | Section: libs |
24 | Architecture: linux-any |
25 | @@ -441,6 +455,7 @@ |
26 | mir-platform-graphics-mesa-x11, |
27 | mir-client-platform-mesa5, |
28 | mir-platform-input-evdev6, |
29 | + mir-platform-graphics-nested11, |
30 | Description: Display server for Ubuntu - desktop driver metapackage |
31 | Mir is a display server running on linux systems, with a focus on efficiency, |
32 | robust operation and a well-defined driver model. |
33 | @@ -457,6 +472,7 @@ |
34 | mir-platform-graphics-android11, |
35 | mir-client-platform-android5, |
36 | mir-platform-input-evdev6, |
37 | + mir-platform-graphics-nested11, |
38 | Description: Display server for Ubuntu - android driver metapackage |
39 | Mir is a display server running on linux systems, with a focus on efficiency, |
40 | robust operation and a well-defined driver model. |
41 | |
42 | === added file 'debian/mir-platform-graphics-nested11.install' |
43 | --- debian/mir-platform-graphics-nested11.install 1970-01-01 00:00:00 +0000 |
44 | +++ debian/mir-platform-graphics-nested11.install 2016-11-23 13:17:56 +0000 |
45 | @@ -0,0 +1,1 @@ |
46 | +usr/lib/*/mir/server-platform/graphics-nested.so.11 |
47 | |
48 | === renamed file 'src/include/server/mir/graphics/gl_extensions_base.h' => 'include/platform/mir/graphics/gl_extensions_base.h' |
49 | --- src/include/server/mir/graphics/gl_extensions_base.h 2015-02-22 07:46:25 +0000 |
50 | +++ include/platform/mir/graphics/gl_extensions_base.h 2016-11-23 13:17:56 +0000 |
51 | @@ -2,15 +2,15 @@ |
52 | * Copyright © 2013 Canonical Ltd. |
53 | * |
54 | * This program is free software: you can redistribute it and/or modify it |
55 | - * under the terms of the GNU General Public License version 3, |
56 | + * under the terms of the GNU Lesser General Public License version 3, |
57 | * as published by the Free Software Foundation. |
58 | * |
59 | * This program is distributed in the hope that it will be useful, |
60 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
61 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
62 | - * GNU General Public License for more details. |
63 | + * GNU Lesser General Public License for more details. |
64 | * |
65 | - * You should have received a copy of the GNU General Public License |
66 | + * You should have received a copy of the GNU Lesser General Public License |
67 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
68 | * |
69 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
70 | |
71 | === modified file 'include/platform/mir/graphics/platform.h' |
72 | --- include/platform/mir/graphics/platform.h 2016-10-21 07:53:23 +0000 |
73 | +++ include/platform/mir/graphics/platform.h 2016-11-23 13:17:56 +0000 |
74 | @@ -28,6 +28,7 @@ |
75 | namespace mir |
76 | { |
77 | class EmergencyCleanupRegistry; |
78 | +namespace shell { class HostLifecycleEventListener; } |
79 | |
80 | namespace logging { class Logger; } |
81 | |
82 | @@ -95,29 +96,28 @@ |
83 | /** |
84 | * A measure of how well a platform supports a device |
85 | * |
86 | - * \note This is compared as an integer; best + 1 is a valid PlatformPriority that |
87 | - * will be used in preference to a module that reports best. |
88 | + * \note This is compared as an integer; request + 1 is a valid PlatformPriority that |
89 | + * will be used in preference to a module that reports request. |
90 | * Platform modules distributed with Mir will never use a priority higher |
91 | - * than best. |
92 | + * than request. |
93 | */ |
94 | enum PlatformPriority : uint32_t |
95 | { |
96 | unsupported = 0, /**< Unable to function at all on this device */ |
97 | - dummy = 1, /**< Used only for dummy or stub platforms. |
98 | - */ |
99 | + dummy = 1, /**< Used only for dummy or stub platforms. */ |
100 | supported = 128, /**< Capable of providing a functioning Platform on this device, |
101 | - * possibly with degraded performance or features. |
102 | - */ |
103 | - best = 256 /**< Capable of providing a Platform with the best features and |
104 | - * performance this device is capable of. |
105 | - */ |
106 | + * possibly with degraded performance or features. */ |
107 | + best = 192, /**< Capable of providing a Platform with the best features and |
108 | + * performance this device is capable of.*/ |
109 | + requested = 256 /**< Provides a Platform that satisfies a user request. */ |
110 | }; |
111 | |
112 | typedef mir::UniqueModulePtr<mir::graphics::Platform>(*CreateHostPlatform)( |
113 | std::shared_ptr<mir::options::Option> const& options, |
114 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, |
115 | std::shared_ptr<mir::graphics::DisplayReport> const& report, |
116 | - std::shared_ptr<mir::logging::Logger> const& logger); |
117 | + std::shared_ptr<mir::logging::Logger> const& logger, |
118 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener); |
119 | |
120 | typedef mir::UniqueModulePtr<mir::graphics::Platform>(*CreateGuestPlatform)( |
121 | std::shared_ptr<mir::graphics::DisplayReport> const& report, |
122 | @@ -149,6 +149,7 @@ |
123 | * \param [in] options options to use for this platform |
124 | * \param [in] emergency_cleanup_registry object to register emergency shutdown handlers with |
125 | * \param [in] report the object to use to report interesting events from the display subsystem |
126 | + * \param [in] host_lifecycle_event_listener the object to use to listen to events from a host server |
127 | * |
128 | * This factory function needs to be implemented by each platform. |
129 | * |
130 | @@ -158,7 +159,8 @@ |
131 | std::shared_ptr<mir::options::Option> const& options, |
132 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, |
133 | std::shared_ptr<mir::graphics::DisplayReport> const& report, |
134 | - std::shared_ptr<mir::logging::Logger> const& logger); |
135 | + std::shared_ptr<mir::logging::Logger> const& logger, |
136 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener); |
137 | |
138 | /** |
139 | * Function prototype used to return a new guest graphics platform. The guest graphics platform |
140 | |
141 | === renamed file 'src/include/server/mir/graphics/surfaceless_egl_context.h' => 'include/platform/mir/graphics/surfaceless_egl_context.h' |
142 | --- src/include/server/mir/graphics/surfaceless_egl_context.h 2016-07-28 09:10:43 +0000 |
143 | +++ include/platform/mir/graphics/surfaceless_egl_context.h 2016-11-23 13:17:56 +0000 |
144 | @@ -2,15 +2,15 @@ |
145 | * Copyright © 2013 Canonical Ltd. |
146 | * |
147 | * This program is free software: you can redistribute it and/or modify it |
148 | - * under the terms of the GNU General Public License version 3, |
149 | + * under the terms of the GNU Lesser General Public License version 3, |
150 | * as published by the Free Software Foundation. |
151 | * |
152 | * This program is distributed in the hope that it will be useful, |
153 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
154 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
155 | - * GNU General Public License for more details. |
156 | + * GNU Lesser General Public License for more details. |
157 | * |
158 | - * You should have received a copy of the GNU General Public License |
159 | + * You should have received a copy of the GNU Lesser General Public License |
160 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
161 | * |
162 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
163 | |
164 | === modified file 'src/include/server/mir/default_server_configuration.h' |
165 | --- src/include/server/mir/default_server_configuration.h 2016-11-02 05:07:18 +0000 |
166 | +++ src/include/server/mir/default_server_configuration.h 2016-11-23 13:17:56 +0000 |
167 | @@ -210,7 +210,6 @@ |
168 | virtual std::shared_ptr<renderer::RendererFactory> the_renderer_factory(); |
169 | virtual std::shared_ptr<shell::DisplayConfigurationController> the_display_configuration_controller(); |
170 | virtual std::shared_ptr<graphics::DisplayConfigurationPolicy> the_display_configuration_policy(); |
171 | - virtual std::shared_ptr<graphics::nested::HostConnection> the_host_connection(); |
172 | virtual std::shared_ptr<graphics::GLConfig> the_gl_config(); |
173 | /** @} */ |
174 | |
175 | |
176 | === modified file 'src/platform/graphics/CMakeLists.txt' |
177 | --- src/platform/graphics/CMakeLists.txt 2016-11-09 02:30:14 +0000 |
178 | +++ src/platform/graphics/CMakeLists.txt 2016-11-23 13:17:56 +0000 |
179 | @@ -1,4 +1,6 @@ |
180 | -include_directories(${GL_INCLUDE_DIRS}) |
181 | +include_directories( |
182 | + ${GL_INCLUDE_DIRS} |
183 | + ${PROJECT_SOURCE_DIR}/include/renderers/gl) |
184 | |
185 | set( |
186 | GRAPHICS_SOURCES |
187 | @@ -6,6 +8,8 @@ |
188 | egl_extensions.cpp |
189 | egl_resources.cpp |
190 | egl_error.cpp |
191 | + surfaceless_egl_context.cpp |
192 | + gl_extensions_base.cpp |
193 | display_configuration.cpp |
194 | gamma_curves.cpp |
195 | buffer_basic.cpp |
196 | |
197 | === renamed file 'src/server/graphics/gl_extensions_base.cpp' => 'src/platform/graphics/gl_extensions_base.cpp' |
198 | --- src/server/graphics/gl_extensions_base.cpp 2013-12-13 05:24:22 +0000 |
199 | +++ src/platform/graphics/gl_extensions_base.cpp 2016-11-23 13:17:56 +0000 |
200 | @@ -2,15 +2,15 @@ |
201 | * Copyright © 2013 Canonical Ltd. |
202 | * |
203 | * This program is free software: you can redistribute it and/or modify it |
204 | - * under the terms of the GNU General Public License version 3, |
205 | + * under the terms of the GNU Lesser General Public License version 3, |
206 | * as published by the Free Software Foundation. |
207 | * |
208 | * This program is distributed in the hope that it will be useful, |
209 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
210 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
211 | - * GNU General Public License for more details. |
212 | + * GNU Lesser General Public License for more details. |
213 | * |
214 | - * You should have received a copy of the GNU General Public License |
215 | + * You should have received a copy of the GNU Lesser General Public License |
216 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
217 | * |
218 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
219 | |
220 | === renamed file 'src/server/graphics/surfaceless_egl_context.cpp' => 'src/platform/graphics/surfaceless_egl_context.cpp' |
221 | --- src/server/graphics/surfaceless_egl_context.cpp 2016-05-27 07:54:00 +0000 |
222 | +++ src/platform/graphics/surfaceless_egl_context.cpp 2016-11-23 13:17:56 +0000 |
223 | @@ -2,15 +2,15 @@ |
224 | * Copyright © 2013 Canonical Ltd. |
225 | * |
226 | * This program is free software: you can redistribute it and/or modify it |
227 | - * under the terms of the GNU General Public License version 3, |
228 | + * under the terms of the GNU Lesser General Public License version 3, |
229 | * as published by the Free Software Foundation. |
230 | * |
231 | * This program is distributed in the hope that it will be useful, |
232 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
233 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
234 | - * GNU General Public License for more details. |
235 | + * GNU Lesser General Public License for more details. |
236 | * |
237 | - * You should have received a copy of the GNU General Public License |
238 | + * You should have received a copy of the GNU Lesser General Public License |
239 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
240 | * |
241 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
242 | |
243 | === modified file 'src/platform/symbols.map' |
244 | --- src/platform/symbols.map 2016-11-16 13:24:41 +0000 |
245 | +++ src/platform/symbols.map 2016-11-23 13:17:56 +0000 |
246 | @@ -90,6 +90,7 @@ |
247 | mir::graphics::Renderable::screen_position*; |
248 | mir::graphics::Renderable::shaped*; |
249 | mir::graphics::Renderable::transformation*; |
250 | + mir::graphics::SurfacelessEGLContext::SurfacelessEGLContext*; |
251 | mir::graphics::Renderable::swap_interval*; |
252 | mir::graphics::UserDisplayConfigurationOutput::extents*; |
253 | mir::graphics::UserDisplayConfigurationOutput::UserDisplayConfigurationOutput*; |
254 | |
255 | === modified file 'src/platforms/CMakeLists.txt' |
256 | --- src/platforms/CMakeLists.txt 2016-11-09 02:30:14 +0000 |
257 | +++ src/platforms/CMakeLists.txt 2016-11-23 13:17:56 +0000 |
258 | @@ -74,4 +74,5 @@ |
259 | add_subdirectory(eglstream-kms) |
260 | endif() |
261 | |
262 | +add_subdirectory(nested/) |
263 | add_subdirectory(evdev/) |
264 | |
265 | === modified file 'src/platforms/android/server/platform.cpp' |
266 | --- src/platforms/android/server/platform.cpp 2016-11-09 02:30:14 +0000 |
267 | +++ src/platforms/android/server/platform.cpp 2016-11-23 13:17:56 +0000 |
268 | @@ -155,7 +155,8 @@ |
269 | std::shared_ptr<mo::Option> const& options, |
270 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
271 | std::shared_ptr<mg::DisplayReport> const& display_report, |
272 | - std::shared_ptr<mir::logging::Logger> const& logger) |
273 | + std::shared_ptr<mir::logging::Logger> const& logger, |
274 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) |
275 | { |
276 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
277 | auto quirks = std::make_shared<mga::DeviceQuirks>(mga::PropertiesOps{}, *options); |
278 | |
279 | === modified file 'src/platforms/android/utils/render_overlays.cpp' |
280 | --- src/platforms/android/utils/render_overlays.cpp 2016-11-16 13:24:41 +0000 |
281 | +++ src/platforms/android/utils/render_overlays.cpp 2016-11-23 13:17:56 +0000 |
282 | @@ -272,7 +272,7 @@ |
283 | |
284 | auto platform_fn = platform_library->load_function<mg::CreateHostPlatform>( |
285 | "create_host_platform", MIR_SERVER_GRAPHICS_PLATFORM_VERSION); |
286 | - auto platform = platform_fn(options, nullptr, std::make_shared<DisplayReport>(), logger); |
287 | + auto platform = platform_fn(options, nullptr, std::make_shared<DisplayReport>(), logger, nullptr); |
288 | |
289 | //Strange issues going on here with dlopen() + hybris (which uses gnu_indirect_functions) |
290 | //https://github.com/libhybris/libhybris/issues/315 |
291 | |
292 | === modified file 'src/platforms/eglstream-kms/server/platform_symbols.cpp' |
293 | --- src/platforms/eglstream-kms/server/platform_symbols.cpp 2016-10-20 14:35:09 +0000 |
294 | +++ src/platforms/eglstream-kms/server/platform_symbols.cpp 2016-11-23 13:17:56 +0000 |
295 | @@ -42,7 +42,8 @@ |
296 | std::shared_ptr<mo::Option> const&, |
297 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, |
298 | std::shared_ptr<mg::DisplayReport> const& report, |
299 | - std::shared_ptr<mir::logging::Logger> const& /*logger*/) |
300 | + std::shared_ptr<mir::logging::Logger> const& /*logger*/, |
301 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) |
302 | { |
303 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
304 | |
305 | |
306 | === modified file 'src/platforms/mesa/server/kms/platform_symbols.cpp' |
307 | --- src/platforms/mesa/server/kms/platform_symbols.cpp 2016-10-20 14:35:09 +0000 |
308 | +++ src/platforms/mesa/server/kms/platform_symbols.cpp 2016-11-23 13:17:56 +0000 |
309 | @@ -106,7 +106,8 @@ |
310 | std::shared_ptr<mo::Option> const& options, |
311 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, |
312 | std::shared_ptr<mg::DisplayReport> const& report, |
313 | - std::shared_ptr<mir::logging::Logger> const& /*logger*/) |
314 | + std::shared_ptr<mir::logging::Logger> const& /*logger*/, |
315 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) |
316 | { |
317 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
318 | // ensure mesa finds the mesa mir-platform symbols |
319 | |
320 | === modified file 'src/platforms/mesa/server/x11/graphics/graphics.cpp' |
321 | --- src/platforms/mesa/server/x11/graphics/graphics.cpp 2016-10-20 14:35:09 +0000 |
322 | +++ src/platforms/mesa/server/x11/graphics/graphics.cpp 2016-11-23 13:17:56 +0000 |
323 | @@ -44,7 +44,8 @@ |
324 | std::shared_ptr<mo::Option> const& options, |
325 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
326 | std::shared_ptr<mg::DisplayReport> const& report, |
327 | - std::shared_ptr<mir::logging::Logger> const& /*logger*/) |
328 | + std::shared_ptr<mir::logging::Logger> const& /*logger*/, |
329 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) |
330 | { |
331 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
332 | if (!x11_resources.get_conn()) |
333 | |
334 | === renamed directory 'src/server/graphics/nested' => 'src/platforms/nested' |
335 | === modified file 'src/platforms/nested/CMakeLists.txt' |
336 | --- src/server/graphics/nested/CMakeLists.txt 2016-10-12 10:29:45 +0000 |
337 | +++ src/platforms/nested/CMakeLists.txt 2016-11-23 13:17:56 +0000 |
338 | @@ -1,5 +1,16 @@ |
339 | +add_definitions(-DMIR_SERVER_GRAPHICS_PLATFORM_VERSION="${MIR_SERVER_GRAPHICS_PLATFORM_VERSION}") |
340 | + |
341 | include_directories( |
342 | ${PROJECT_SOURCE_DIR}/include/renderers/gl |
343 | + ${PROJECT_SOURCE_DIR}/include/renderers/sw |
344 | + ${PROJECT_SOURCE_DIR}/include/platform |
345 | + ${PROJECT_SOURCE_DIR}/include/client |
346 | + ${PROJECT_SOURCE_DIR}/include/server |
347 | + ${PROJECT_SOURCE_DIR}/src/include/platform |
348 | + ${PROJECT_SOURCE_DIR}/src/include/server |
349 | + ${PROJECT_SOURCE_DIR}/src/include/common |
350 | + ${PROJECT_SOURCE_DIR}/src/include/cookie |
351 | + ${PROJECT_SOURCE_DIR}/src/include/client |
352 | ) |
353 | |
354 | add_library( |
355 | @@ -15,3 +26,34 @@ |
356 | buffer.cpp |
357 | ipc_operations.cpp |
358 | ) |
359 | + |
360 | +add_library(mirplatformgraphicsnested SHARED |
361 | + $<TARGET_OBJECTS:mirnestedgraphics> |
362 | + $<TARGET_OBJECTS:mirgl> |
363 | +) |
364 | + |
365 | +target_link_libraries( |
366 | + mirplatformgraphicsnested |
367 | + |
368 | + mirplatform |
369 | + mirclient |
370 | + ${EGL_LDFLAGS} ${EGL_LIBRARIES} |
371 | + ${GLESv2_LDFLAGS} ${GLESv2_LIBRARIES} |
372 | + ${Boost_PROGRAM_OPTIONS_LIBRARY} |
373 | +) |
374 | + |
375 | +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/symbols.map.in |
376 | + ${CMAKE_CURRENT_BINARY_DIR}/symbols.map) |
377 | +set(symbol_map ${CMAKE_CURRENT_BINARY_DIR}/symbols.map) |
378 | + |
379 | +set_target_properties( |
380 | + mirplatformgraphicsnested PROPERTIES |
381 | + OUTPUT_NAME graphics-nested |
382 | + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/server-modules |
383 | + PREFIX "" |
384 | + SUFFIX ".so.${MIR_SERVER_GRAPHICS_PLATFORM_ABI}" |
385 | + LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}" |
386 | + LINK_DEPENDS ${symbol_map} |
387 | +) |
388 | + |
389 | +install(TARGETS mirplatformgraphicsnested LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH}) |
390 | |
391 | === modified file 'src/platforms/nested/display.cpp' |
392 | --- src/server/graphics/nested/display.cpp 2016-11-11 07:56:09 +0000 |
393 | +++ src/platforms/nested/display.cpp 2016-11-23 13:17:56 +0000 |
394 | @@ -17,6 +17,7 @@ |
395 | */ |
396 | |
397 | #include "display.h" |
398 | +#include "cursor.h" |
399 | #include "nested_display_configuration.h" |
400 | #include "display_buffer.h" |
401 | #include "host_connection.h" |
402 | @@ -349,10 +350,9 @@ |
403 | // No need to do anything |
404 | } |
405 | |
406 | -auto mgn::Display::create_hardware_cursor(std::shared_ptr<mg::CursorImage> const& /*initial_image*/) -> std::shared_ptr<mg::Cursor> |
407 | +auto mgn::Display::create_hardware_cursor(std::shared_ptr<mg::CursorImage> const& initial_image) -> std::shared_ptr<mg::Cursor> |
408 | { |
409 | - BOOST_THROW_EXCEPTION(std::logic_error("Initialization loop: we already need the Cursor when creating the Display")); |
410 | - // So we can't do this: return std::make_shared<Cursor>(connection, initial_image); |
411 | + return std::make_shared<Cursor>(connection, initial_image); |
412 | } |
413 | |
414 | std::unique_ptr<mg::VirtualOutput> mgn::Display::create_virtual_output(int /*width*/, int /*height*/) |
415 | |
416 | === modified file 'src/platforms/nested/platform.cpp' |
417 | --- src/server/graphics/nested/platform.cpp 2016-10-11 17:04:43 +0000 |
418 | +++ src/platforms/nested/platform.cpp 2016-11-23 13:17:56 +0000 |
419 | @@ -19,19 +19,31 @@ |
420 | #include "platform.h" |
421 | #include "host_connection.h" |
422 | #include "display.h" |
423 | +#include "mir_client_host_connection.h" |
424 | #include "buffer.h" |
425 | #include "native_buffer.h" |
426 | #include "ipc_operations.h" |
427 | #include "mir/shared_library.h" |
428 | +#include "mir/module_deleter.h" |
429 | +#include "mir/options/option.h" |
430 | +#include "mir/options/configuration.h" |
431 | +#include "mir/options/program_option.h" |
432 | +#include "mir/options/default_configuration.h" |
433 | #include "mir/graphics/graphic_buffer_allocator.h" |
434 | #include "mir/graphics/display.h" |
435 | #include "mir/graphics/platform_ipc_operations.h" |
436 | +#include "mir/input/platform.h" |
437 | +#include "input_platform.h" |
438 | +#include "mir/libname.h" |
439 | +#include "mir/assert_module_entry_point.h" |
440 | +#include "mir/abnormal_exit.h" |
441 | #include "mir/options/option.h" |
442 | #include "mir/options/configuration.h" |
443 | #include "mir/graphics/buffer_ipc_message.h" |
444 | #include "mir/graphics/platform_ipc_operations.h" |
445 | #include "mir/graphics/platform_operation_message.h" |
446 | |
447 | +namespace mi = mir::input; |
448 | namespace mg = mir::graphics; |
449 | namespace mgn = mir::graphics::nested; |
450 | namespace mo = mir::options; |
451 | @@ -126,3 +138,131 @@ |
452 | { |
453 | return mir::make_module_ptr<mgn::IpcOperations>(guest_platform->make_ipc_operations()); |
454 | } |
455 | + |
456 | +namespace |
457 | +{ |
458 | +std::shared_ptr<mgn::MirClientHostConnection> global_conn = nullptr; |
459 | + |
460 | +mir::ModuleProperties const graphics_description = { |
461 | + "mir:nested", |
462 | + MIR_VERSION_MAJOR, |
463 | + MIR_VERSION_MINOR, |
464 | + MIR_VERSION_MICRO, |
465 | + mir::libname() |
466 | +}; |
467 | + |
468 | +mir::ModuleProperties const input_description = { |
469 | + "mir:nested-input", |
470 | + MIR_VERSION_MAJOR, |
471 | + MIR_VERSION_MINOR, |
472 | + MIR_VERSION_MICRO, |
473 | + mir::libname() |
474 | +}; |
475 | +} |
476 | + |
477 | +mir::UniqueModulePtr<mg::Platform> create_host_platform( |
478 | + std::shared_ptr<mo::Option> const& options, |
479 | + std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
480 | + std::shared_ptr<mir::graphics::DisplayReport> const& display_report, |
481 | + std::shared_ptr<mir::logging::Logger> const&, |
482 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener) |
483 | +{ |
484 | + mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
485 | + |
486 | + if (!options->is_set(mo::host_socket_opt)) |
487 | + BOOST_THROW_EXCEPTION(mir::AbnormalExit( |
488 | + std::string("Exiting Mir! Reason: Nested Mir needs either $MIR_SOCKET or --") + |
489 | + mo::host_socket_opt)); |
490 | + |
491 | + auto host_socket = options->get<std::string>(mo::host_socket_opt); |
492 | + |
493 | + std::string server_socket{"none"}; |
494 | + |
495 | + if (!options->is_set(mir::options::no_server_socket_opt)) |
496 | + { |
497 | + server_socket = options->get<std::string>(mo::server_socket_opt); |
498 | + |
499 | + if (server_socket == host_socket) |
500 | + BOOST_THROW_EXCEPTION(mir::AbnormalExit( |
501 | + "Exiting Mir! Reason: Nested Mir and Host Mir cannot use " |
502 | + "the same socket file to accept connections!")); |
503 | + } |
504 | + |
505 | + auto const my_name = options->is_set(mo::name_opt) ? |
506 | + options->get<std::string>(mo::name_opt) : |
507 | + "nested-mir@:" + server_socket; |
508 | + |
509 | + auto connection = std::make_shared<mgn::MirClientHostConnection>( |
510 | + host_socket, |
511 | + my_name, |
512 | + host_lifecycle_event_listener); |
513 | + |
514 | + global_conn = connection; |
515 | + return mir::make_module_ptr<mgn::Platform>( |
516 | + std::make_shared<mir::SharedLibrary>(connection->graphics_platform_library()), |
517 | + connection, |
518 | + display_report, |
519 | + *options); |
520 | +} |
521 | + |
522 | +mir::UniqueModulePtr<mg::Platform> create_guest_platform( |
523 | + std::shared_ptr<mg::DisplayReport> const&, |
524 | + std::shared_ptr<mg::NestedContext> const&) |
525 | +{ |
526 | + mir::assert_entry_point_signature<mg::CreateGuestPlatform>(&create_guest_platform); |
527 | + BOOST_THROW_EXCEPTION(mir::AbnormalExit( |
528 | + std::string("Exiting Mir! Cannot load nested platform"))); |
529 | +} |
530 | + |
531 | +void add_graphics_platform_options(boost::program_options::options_description&) |
532 | +{ |
533 | + mir::assert_entry_point_signature<mg::AddPlatformOptions>(&add_graphics_platform_options); |
534 | +} |
535 | + |
536 | +mg::PlatformPriority probe_graphics_platform(mo::ProgramOption const& options) |
537 | +{ |
538 | + mir::assert_entry_point_signature<mg::PlatformProbe>(&probe_graphics_platform); |
539 | + |
540 | + bool option_present = false; |
541 | + for (auto &s : options.unparsed_command_line()) |
542 | + option_present |= (s.find(mo::host_socket_opt) != std::string::npos); |
543 | + option_present |= options.is_set(mo::host_socket_opt); |
544 | + option_present |= (nullptr != getenv("MIR_SERVER_HOST_SOCKET")); |
545 | + |
546 | + if (option_present) |
547 | + return mg::PlatformPriority::requested; |
548 | + else |
549 | + return mg::PlatformPriority::unsupported; |
550 | +} |
551 | + |
552 | +mir::ModuleProperties const* describe_graphics_module() |
553 | +{ |
554 | + mir::assert_entry_point_signature<mg::DescribeModule>(&describe_graphics_module); |
555 | + return &graphics_description; |
556 | +} |
557 | + |
558 | +mi::PlatformPriority probe_input_platform( |
559 | + mo::Option const& options) |
560 | +{ |
561 | + mir::assert_entry_point_signature<mi::ProbePlatform>(&probe_input_platform); |
562 | + if (options.is_set("host-socket")) |
563 | + return mi::PlatformPriority::best; |
564 | + return mi::PlatformPriority::unsupported; |
565 | +} |
566 | + |
567 | +mir::UniqueModulePtr<mi::Platform> create_input_platform( |
568 | + mo::Option const& /*options*/, |
569 | + std::shared_ptr<mir::EmergencyCleanupRegistry> const& /*emergency_cleanup_registry*/, |
570 | + std::shared_ptr<mi::InputDeviceRegistry> const& input_device_registry, |
571 | + std::shared_ptr<mi::InputReport> const& input_report) |
572 | +{ |
573 | + mir::assert_entry_point_signature<mi::CreatePlatform>(&create_input_platform); |
574 | + return mir::make_module_ptr<mgn::InputPlatform>(global_conn, input_device_registry, input_report); |
575 | +} |
576 | + |
577 | +mir::ModuleProperties const* describe_input_module() |
578 | +{ |
579 | + mir::assert_entry_point_signature<mi::DescribeModule>(&describe_input_module); |
580 | + return &input_description; |
581 | +} |
582 | + |
583 | |
584 | === added file 'src/platforms/nested/symbols.map.in' |
585 | --- src/platforms/nested/symbols.map.in 1970-01-01 00:00:00 +0000 |
586 | +++ src/platforms/nested/symbols.map.in 2016-11-23 13:17:56 +0000 |
587 | @@ -0,0 +1,20 @@ |
588 | +@MIR_SERVER_GRAPHICS_PLATFORM_VERSION@ { |
589 | + global: |
590 | + add_graphics_platform_options; |
591 | + create_host_platform; |
592 | + create_guest_platform; |
593 | + probe_graphics_platform; |
594 | + describe_graphics_module; |
595 | + local: |
596 | + *; |
597 | +}; |
598 | + |
599 | +@MIR_SERVER_INPUT_PLATFORM_VERSION@ { |
600 | + global: |
601 | + add_input_platform_options; |
602 | + create_input_platform; |
603 | + probe_input_platform; |
604 | + describe_input_module; |
605 | + local: |
606 | + *; |
607 | +}; |
608 | |
609 | === modified file 'src/server/CMakeLists.txt' |
610 | --- src/server/CMakeLists.txt 2016-11-15 23:48:01 +0000 |
611 | +++ src/server/CMakeLists.txt 2016-11-23 13:17:56 +0000 |
612 | @@ -80,7 +80,6 @@ |
613 | $<TARGET_OBJECTS:mirreport> |
614 | $<TARGET_OBJECTS:mirlogging> |
615 | $<TARGET_OBJECTS:mirnullreport> |
616 | - $<TARGET_OBJECTS:mirnestedgraphics> |
617 | $<TARGET_OBJECTS:mirthread> |
618 | |
619 | $<TARGET_OBJECTS:mirrenderergl> |
620 | |
621 | === modified file 'src/server/graphics/CMakeLists.txt' |
622 | --- src/server/graphics/CMakeLists.txt 2016-11-02 05:07:18 +0000 |
623 | +++ src/server/graphics/CMakeLists.txt 2016-11-23 13:17:56 +0000 |
624 | @@ -8,12 +8,8 @@ |
625 | |
626 | default_configuration.cpp |
627 | default_display_configuration_policy.cpp |
628 | - gl_extensions_base.cpp |
629 | - surfaceless_egl_context.cpp |
630 | software_cursor.cpp |
631 | ${PROJECT_SOURCE_DIR}/include/server/mir/graphics/display_configuration_observer.h |
632 | display_configuration_observer_multiplexer.cpp |
633 | display_configuration_observer_multiplexer.h |
634 | ) |
635 | - |
636 | -add_subdirectory(nested/) |
637 | |
638 | === modified file 'src/server/graphics/default_configuration.cpp' |
639 | --- src/server/graphics/default_configuration.cpp 2016-11-02 05:07:18 +0000 |
640 | +++ src/server/graphics/default_configuration.cpp 2016-11-23 13:17:56 +0000 |
641 | @@ -22,15 +22,12 @@ |
642 | |
643 | #include "mir/graphics/default_display_configuration_policy.h" |
644 | #include "mir/graphics/graphic_buffer_allocator.h" |
645 | -#include "nested/mir_client_host_connection.h" |
646 | -#include "nested/cursor.h" |
647 | -#include "nested/display.h" |
648 | -#include "nested/platform.h" |
649 | #include "software_cursor.h" |
650 | |
651 | #include "mir/graphics/gl_config.h" |
652 | #include "mir/graphics/platform.h" |
653 | #include "mir/graphics/cursor.h" |
654 | +#include "mir/graphics/display.h" |
655 | #include "mir/graphics/platform_probe.h" |
656 | #include "display_configuration_observer_multiplexer.h" |
657 | |
658 | @@ -51,7 +48,6 @@ |
659 | |
660 | namespace mg = mir::graphics; |
661 | namespace ml = mir::logging; |
662 | -namespace mgn = mir::graphics::nested; |
663 | |
664 | std::shared_ptr<mg::DisplayConfigurationPolicy> |
665 | mir::DefaultServerConfiguration::the_display_configuration_policy() |
666 | @@ -80,20 +76,6 @@ |
667 | std::stringstream error_report; |
668 | try |
669 | { |
670 | - // if a host socket is set we should use the host graphics module to create a "guest" platform |
671 | - if (the_options()->is_set(options::host_socket_opt)) |
672 | - { |
673 | - auto const host_connection = the_host_connection(); |
674 | - |
675 | - platform_library = std::make_shared<mir::SharedLibrary>(host_connection->graphics_platform_library()); |
676 | - return std::make_shared<mgn::Platform>( |
677 | - platform_library, |
678 | - host_connection, |
679 | - the_display_report(), |
680 | - *the_options()); |
681 | - } |
682 | - |
683 | - // fallback to standalone if host socket is unset |
684 | if (the_options()->is_set(options::platform_graphics_lib)) |
685 | { |
686 | platform_library = std::make_shared<mir::SharedLibrary>(the_options()->get<std::string>(options::platform_graphics_lib)); |
687 | @@ -122,7 +104,12 @@ |
688 | description->minor_version, |
689 | description->micro_version); |
690 | |
691 | - return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report(), the_logger()); |
692 | + return create_host_platform( |
693 | + the_options(), |
694 | + the_emergency_cleanup(), |
695 | + the_display_report(), |
696 | + the_logger(), |
697 | + the_host_lifecycle_event_listener()); |
698 | } |
699 | catch(...) |
700 | { |
701 | @@ -162,21 +149,12 @@ |
702 | return cursor( |
703 | [this]() -> std::shared_ptr<mg::Cursor> |
704 | { |
705 | - // In nested mode we delegate cursor presentation to the host |
706 | - if (the_options()->is_set(options::host_socket_opt)) |
707 | - { |
708 | - mir::log_info("Using nested cursor"); |
709 | - return wrap_cursor(std::make_shared<mgn::Cursor>(the_host_connection(), the_default_cursor_image())); |
710 | - } |
711 | - |
712 | - // Otherwise we try to create a hardware cursor |
713 | if (auto hardware_cursor = the_display()->create_hardware_cursor(the_default_cursor_image())) |
714 | { |
715 | mir::log_info("Using hardware cursor"); |
716 | return wrap_cursor(hardware_cursor); |
717 | } |
718 | |
719 | - // If other options fail we use a software cursor |
720 | mir::log_info("Using software cursor"); |
721 | auto const cursor = wrap_cursor(std::make_shared<mg::SoftwareCursor>( |
722 | the_buffer_allocator(), |
723 | @@ -194,51 +172,6 @@ |
724 | return wrapped; |
725 | } |
726 | |
727 | -auto mir::DefaultServerConfiguration::the_host_connection() |
728 | --> std::shared_ptr<graphics::nested::HostConnection> |
729 | -{ |
730 | - return the_mir_client_host_connection(); |
731 | -} |
732 | - |
733 | -auto mir::DefaultServerConfiguration::the_mir_client_host_connection() |
734 | --> std::shared_ptr<graphics::nested::MirClientHostConnection> |
735 | -{ |
736 | - return host_connection( |
737 | - [this]() |
738 | - { |
739 | - auto const options = the_options(); |
740 | - |
741 | - if (!options->is_set(options::host_socket_opt)) |
742 | - BOOST_THROW_EXCEPTION(mir::AbnormalExit( |
743 | - std::string("Exiting Mir! Reason: Nested Mir needs either $MIR_SOCKET or --") + |
744 | - options::host_socket_opt)); |
745 | - |
746 | - auto host_socket = options->get<std::string>(options::host_socket_opt); |
747 | - |
748 | - std::string server_socket{"none"}; |
749 | - |
750 | - if (!the_options()->is_set(options::no_server_socket_opt)) |
751 | - { |
752 | - server_socket = the_socket_file(); |
753 | - |
754 | - if (server_socket == host_socket) |
755 | - BOOST_THROW_EXCEPTION(mir::AbnormalExit( |
756 | - "Exiting Mir! Reason: Nested Mir and Host Mir cannot use " |
757 | - "the same socket file to accept connections!")); |
758 | - } |
759 | - |
760 | - auto const my_name = options->is_set(options::name_opt) ? |
761 | - options->get<std::string>(options::name_opt) : |
762 | - "nested-mir@:" + server_socket; |
763 | - |
764 | - return std::make_shared<graphics::nested::MirClientHostConnection>( |
765 | - host_socket, |
766 | - my_name, |
767 | - the_host_lifecycle_event_listener() |
768 | - ); |
769 | - }); |
770 | -} |
771 | - |
772 | std::shared_ptr<mg::GLConfig> |
773 | mir::DefaultServerConfiguration::the_gl_config() |
774 | { |
775 | |
776 | === modified file 'src/server/input/default_configuration.cpp' |
777 | --- src/server/input/default_configuration.cpp 2016-11-15 23:48:01 +0000 |
778 | +++ src/server/input/default_configuration.cpp 2016-11-23 13:17:56 +0000 |
779 | @@ -35,7 +35,6 @@ |
780 | #include "surface_input_dispatcher.h" |
781 | #include "basic_seat.h" |
782 | #include "seat_observer_multiplexer.h" |
783 | -#include "../graphics/nested/input_platform.h" |
784 | |
785 | #include "mir/input/touch_visualizer.h" |
786 | #include "mir/input/input_probe.h" |
787 | @@ -60,7 +59,6 @@ |
788 | namespace mr = mir::report; |
789 | namespace ms = mir::scene; |
790 | namespace mg = mir::graphics; |
791 | -namespace mgn = mg::nested; |
792 | namespace msh = mir::shell; |
793 | namespace md = mir::dispatch; |
794 | |
795 | @@ -278,16 +276,6 @@ |
796 | { |
797 | return std::make_shared<mi::NullInputManager>(); |
798 | } |
799 | - else if (options->is_set(options::host_socket_opt)) |
800 | - { |
801 | - auto const device_registry = the_input_device_registry(); |
802 | - auto const input_report = the_input_report(); |
803 | - |
804 | - // TODO: move this into a nested graphics platform |
805 | - auto platform = std::make_shared<mgn::InputPlatform>(the_host_connection(), device_registry, input_report); |
806 | - |
807 | - return std::make_shared<mi::DefaultInputManager>(the_input_reading_multiplexer(), std::move(platform)); |
808 | - } |
809 | else |
810 | { |
811 | auto const emergency_cleanup = the_emergency_cleanup(); |
812 | |
813 | === modified file 'src/server/symbols.map' |
814 | --- src/server/symbols.map 2016-11-15 23:48:01 +0000 |
815 | +++ src/server/symbols.map 2016-11-23 13:17:56 +0000 |
816 | @@ -749,7 +749,6 @@ |
817 | mir::DefaultServerConfiguration::the_gl_config*; |
818 | mir::DefaultServerConfiguration::the_global_event_sink*; |
819 | mir::DefaultServerConfiguration::the_graphics_platform*; |
820 | - mir::DefaultServerConfiguration::the_host_connection*; |
821 | mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*; |
822 | mir::DefaultServerConfiguration::the_input_channel_factory*; |
823 | mir::DefaultServerConfiguration::the_input_device_hub*; |
824 | |
825 | === modified file 'tests/acceptance-tests/test_nested_mir.cpp' |
826 | --- tests/acceptance-tests/test_nested_mir.cpp 2016-11-15 23:48:01 +0000 |
827 | +++ tests/acceptance-tests/test_nested_mir.cpp 2016-11-23 13:17:56 +0000 |
828 | @@ -398,6 +398,7 @@ |
829 | |
830 | virtual ~NestedMirRunner() |
831 | { |
832 | + cursor_wrapper.reset(); |
833 | stop_server(); |
834 | } |
835 | |
836 | |
837 | === modified file 'tests/include/mir/test/doubles/stub_host_connection.h' |
838 | --- tests/include/mir/test/doubles/stub_host_connection.h 2016-11-18 15:53:29 +0000 |
839 | +++ tests/include/mir/test/doubles/stub_host_connection.h 2016-11-23 13:17:56 +0000 |
840 | @@ -19,11 +19,13 @@ |
841 | #ifndef MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_ |
842 | #define MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_ |
843 | |
844 | -#include "src/server/graphics/nested/host_connection.h" |
845 | -#include "src/server/graphics/nested/host_surface.h" |
846 | -#include "src/server/graphics/nested/host_stream.h" |
847 | -#include "src/server/graphics/nested/host_chain.h" |
848 | -#include "src/server/graphics/nested/host_surface_spec.h" |
849 | +#include "src/platforms/nested/host_connection.h" |
850 | +#include "src/platforms/nested/host_surface.h" |
851 | +#include "src/platforms/nested/host_connection.h" |
852 | +#include "src/platforms/nested/host_surface.h" |
853 | +#include "src/platforms/nested/host_stream.h" |
854 | +#include "src/platforms/nested/host_chain.h" |
855 | +#include "src/platforms/nested/host_surface_spec.h" |
856 | #include "src/include/client/mir/input/input_devices.h" |
857 | #include "mir/graphics/platform_operation_message.h" |
858 | |
859 | |
860 | === modified file 'tests/mir_test_framework/headless_nested_server_runner.cpp' |
861 | --- tests/mir_test_framework/headless_nested_server_runner.cpp 2016-10-31 02:37:31 +0000 |
862 | +++ tests/mir_test_framework/headless_nested_server_runner.cpp 2016-11-23 13:17:56 +0000 |
863 | @@ -25,7 +25,7 @@ |
864 | mtf::HeadlessNestedServerRunner::HeadlessNestedServerRunner(std::string const& connect_string) : |
865 | passthrough_tracker(std::make_shared<mtf::PassthroughTracker>()) |
866 | { |
867 | - add_to_environment("MIR_SERVER_PLATFORM_GRAPHICS_LIB", mtf::server_platform("graphics-dummy.so").c_str()); |
868 | + add_to_environment("MIR_SERVER_PLATFORM_GRAPHICS_LIB", mtf::server_platform("graphics-nested.so.11").c_str()); |
869 | add_to_environment("MIR_SERVER_HOST_SOCKET", connect_string.c_str()); |
870 | server.override_the_display_buffer_compositor_factory([this] |
871 | { |
872 | |
873 | === modified file 'tests/mir_test_framework/platform_graphics_throw.cpp' |
874 | --- tests/mir_test_framework/platform_graphics_throw.cpp 2016-10-20 14:35:09 +0000 |
875 | +++ tests/mir_test_framework/platform_graphics_throw.cpp 2016-11-23 13:17:56 +0000 |
876 | @@ -55,7 +55,7 @@ |
877 | mir::SharedLibrary stub_platform_library{std::string(platform_path) + "/graphics-dummy.so"}; |
878 | auto create_stub_platform = stub_platform_library.load_function<mg::CreateHostPlatform>("create_host_platform"); |
879 | |
880 | - stub_platform = create_stub_platform(nullptr, nullptr, nullptr, nullptr); |
881 | + stub_platform = create_stub_platform(nullptr, nullptr, nullptr, nullptr, nullptr); |
882 | } |
883 | |
884 | mir::UniqueModulePtr<mg::GraphicBufferAllocator> create_buffer_allocator() override |
885 | @@ -143,7 +143,8 @@ |
886 | std::shared_ptr<mo::Option> const&, |
887 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
888 | std::shared_ptr<mg::DisplayReport> const&, |
889 | - std::shared_ptr<mir::logging::Logger> const&) |
890 | + std::shared_ptr<mir::logging::Logger> const&, |
891 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) |
892 | { |
893 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
894 | return mir::make_module_ptr<ExceptionThrowingPlatform>(); |
895 | |
896 | === modified file 'tests/mir_test_framework/stubbed_graphics_platform.cpp' |
897 | --- tests/mir_test_framework/stubbed_graphics_platform.cpp 2016-11-15 02:23:00 +0000 |
898 | +++ tests/mir_test_framework/stubbed_graphics_platform.cpp 2016-11-23 13:17:56 +0000 |
899 | @@ -316,7 +316,8 @@ |
900 | std::shared_ptr<mo::Option> const&, |
901 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
902 | std::shared_ptr<mg::DisplayReport> const&, |
903 | - std::shared_ptr<mir::logging::Logger> const&) |
904 | + std::shared_ptr<mir::logging::Logger> const&, |
905 | + std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) |
906 | { |
907 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
908 | std::shared_ptr<mg::Platform> result{}; |
909 | |
910 | === modified file 'tests/unit-tests/input/CMakeLists.txt' |
911 | --- tests/unit-tests/input/CMakeLists.txt 2016-07-18 07:38:38 +0000 |
912 | +++ tests/unit-tests/input/CMakeLists.txt 2016-11-23 13:17:56 +0000 |
913 | @@ -17,7 +17,6 @@ |
914 | ${CMAKE_CURRENT_SOURCE_DIR}/test_seat_input_device_tracker.cpp |
915 | ${CMAKE_CURRENT_SOURCE_DIR}/test_key_repeat_dispatcher.cpp |
916 | ${CMAKE_CURRENT_SOURCE_DIR}/test_validator.cpp |
917 | - ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_input_platform.cpp |
918 | ) |
919 | |
920 | list(APPEND UMOCK_UNIT_TEST_SOURCES |
921 | |
922 | === modified file 'tests/unit-tests/platforms/android/server/test_display_generic.cpp' |
923 | --- tests/unit-tests/platforms/android/server/test_display_generic.cpp 2016-10-20 14:35:09 +0000 |
924 | +++ tests/unit-tests/platforms/android/server/test_display_generic.cpp 2016-11-23 13:17:56 +0000 |
925 | @@ -44,14 +44,10 @@ |
926 | public: |
927 | DisplayTestGeneric() : |
928 | logger{std::make_shared<mir::logging::DumbConsoleLogger>()}, |
929 | - platform{ |
930 | - create_host_platform( |
931 | - std::make_shared<mir::options::ProgramOption>(), |
932 | - std::make_shared<mtd::NullEmergencyCleanup>(), |
933 | - mir::report::null_display_report(), |
934 | - logger) |
935 | - } |
936 | - |
937 | + platform{create_host_platform( |
938 | + std::make_shared<mir::options::ProgramOption>(), |
939 | + std::make_shared<mtd::NullEmergencyCleanup>(), |
940 | + mir::report::null_display_report(), logger, nullptr)} |
941 | { |
942 | using namespace testing; |
943 | |
944 | |
945 | === modified file 'tests/unit-tests/platforms/android/server/test_graphics_platform.cpp' |
946 | --- tests/unit-tests/platforms/android/server/test_graphics_platform.cpp 2016-10-20 14:35:09 +0000 |
947 | +++ tests/unit-tests/platforms/android/server/test_graphics_platform.cpp 2016-11-23 13:17:56 +0000 |
948 | @@ -54,7 +54,8 @@ |
949 | std::make_shared<mir::options::ProgramOption>(), |
950 | std::make_shared<mtd::NullEmergencyCleanup>(), |
951 | mir::report::null_display_report(), |
952 | - logger); |
953 | + logger, |
954 | + nullptr); |
955 | } |
956 | |
957 | std::shared_ptr<ml::Logger> logger; |
958 | |
959 | === modified file 'tests/unit-tests/platforms/nested/CMakeLists.txt' |
960 | --- tests/unit-tests/platforms/nested/CMakeLists.txt 2016-11-09 02:30:14 +0000 |
961 | +++ tests/unit-tests/platforms/nested/CMakeLists.txt 2016-11-23 13:17:56 +0000 |
962 | @@ -5,10 +5,12 @@ |
963 | ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_cursor.cpp |
964 | ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer.cpp |
965 | ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_display_buffer.cpp |
966 | + ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_input_platform.cpp |
967 | ${CMAKE_CURRENT_SOURCE_DIR}/test_ipc_operations.cpp |
968 | $<TARGET_OBJECTS:mir-test-doubles-udev> |
969 | ${MIR_PLATFORM_OBJECTS} |
970 | ${MIR_SERVER_OBJECTS} |
971 | + $<TARGET_OBJECTS:mirnestedgraphics> |
972 | ) |
973 | |
974 | target_link_libraries( |
975 | |
976 | === modified file 'tests/unit-tests/platforms/nested/test_buffer.cpp' |
977 | --- tests/unit-tests/platforms/nested/test_buffer.cpp 2016-10-31 02:37:31 +0000 |
978 | +++ tests/unit-tests/platforms/nested/test_buffer.cpp 2016-11-23 13:17:56 +0000 |
979 | @@ -16,8 +16,11 @@ |
980 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
981 | */ |
982 | |
983 | -#include "src/server/graphics/nested/native_buffer.h" |
984 | -#include "src/server/graphics/nested/buffer.h" |
985 | +#include "src/platforms/nested/buffer.h" |
986 | +#include "src/platforms/nested/native_buffer.h" |
987 | +#include "src/platforms/nested/buffer.h" |
988 | +#include "src/platforms/nested/native_buffer.h" |
989 | +#include "src/platforms/nested/buffer.h" |
990 | #include "src/client/buffer.h" |
991 | #include "mir/graphics/buffer_properties.h" |
992 | #include "mir/test/doubles/stub_host_connection.h" |
993 | |
994 | === modified file 'tests/unit-tests/platforms/nested/test_ipc_operations.cpp' |
995 | --- tests/unit-tests/platforms/nested/test_ipc_operations.cpp 2016-10-11 17:04:43 +0000 |
996 | +++ tests/unit-tests/platforms/nested/test_ipc_operations.cpp 2016-11-23 13:17:56 +0000 |
997 | @@ -16,8 +16,8 @@ |
998 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
999 | */ |
1000 | |
1001 | -#include "src/server/graphics/nested/ipc_operations.h" |
1002 | -#include "src/server/graphics/nested/native_buffer.h" |
1003 | +#include "src/platforms/nested/ipc_operations.h" |
1004 | +#include "src/platforms/nested/native_buffer.h" |
1005 | #include "mir/test/doubles/stub_buffer.h" |
1006 | #include "mir/test/doubles/mock_buffer_ipc_message.h" |
1007 | #include "mir/test/fake_shared.h" |
1008 | |
1009 | === modified file 'tests/unit-tests/platforms/nested/test_nested_cursor.cpp' |
1010 | --- tests/unit-tests/platforms/nested/test_nested_cursor.cpp 2016-01-29 08:18:22 +0000 |
1011 | +++ tests/unit-tests/platforms/nested/test_nested_cursor.cpp 2016-11-23 13:17:56 +0000 |
1012 | @@ -16,7 +16,7 @@ |
1013 | * Authored by: Robert Carr <robert.carr@canonical.com> |
1014 | */ |
1015 | |
1016 | -#include "src/server/graphics/nested/cursor.h" |
1017 | +#include "src/platforms/nested/cursor.h" |
1018 | #include "mir/graphics/cursor_image.h" |
1019 | |
1020 | #include "mir/test/fake_shared.h" |
1021 | |
1022 | === modified file 'tests/unit-tests/platforms/nested/test_nested_display.cpp' |
1023 | --- tests/unit-tests/platforms/nested/test_nested_display.cpp 2016-08-24 14:03:18 +0000 |
1024 | +++ tests/unit-tests/platforms/nested/test_nested_display.cpp 2016-11-23 13:17:56 +0000 |
1025 | @@ -16,9 +16,9 @@ |
1026 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
1027 | */ |
1028 | |
1029 | -#include "src/server/graphics/nested/display.h" |
1030 | -#include "src/server/graphics/nested/host_connection.h" |
1031 | -#include "src/server/graphics/nested/host_surface.h" |
1032 | +#include "src/platforms/nested/display.h" |
1033 | +#include "src/platforms/nested/host_connection.h" |
1034 | +#include "src/platforms/nested/host_surface.h" |
1035 | #include "src/server/report/null/display_report.h" |
1036 | #include "mir/graphics/default_display_configuration_policy.h" |
1037 | #include "src/server/input/null_input_dispatcher.h" |
1038 | |
1039 | === modified file 'tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp' |
1040 | --- tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp 2016-11-16 13:24:41 +0000 |
1041 | +++ tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp 2016-11-23 13:17:56 +0000 |
1042 | @@ -16,11 +16,11 @@ |
1043 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
1044 | */ |
1045 | |
1046 | -#include "src/server/graphics/nested/display_buffer.h" |
1047 | -#include "src/server/graphics/nested/native_buffer.h" |
1048 | -#include "src/server/graphics/nested/host_stream.h" |
1049 | -#include "src/server/graphics/nested/host_chain.h" |
1050 | -#include "src/server/graphics/nested/host_surface_spec.h" |
1051 | +#include "src/platforms/nested/display_buffer.h" |
1052 | +#include "src/platforms/nested/native_buffer.h" |
1053 | +#include "src/platforms/nested/host_stream.h" |
1054 | +#include "src/platforms/nested/host_chain.h" |
1055 | +#include "src/platforms/nested/host_surface_spec.h" |
1056 | |
1057 | #include "mir/events/event_builders.h" |
1058 | |
1059 | |
1060 | === modified file 'tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp' |
1061 | --- tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2016-01-29 08:18:22 +0000 |
1062 | +++ tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2016-11-23 13:17:56 +0000 |
1063 | @@ -16,7 +16,7 @@ |
1064 | * Authored by: Alan Griffiths <alan@octopull.co.uk> |
1065 | */ |
1066 | |
1067 | -#include "src/server/graphics/nested/nested_display_configuration.h" |
1068 | +#include "src/platforms/nested/nested_display_configuration.h" |
1069 | #include "mir_display_configuration_builder.h" |
1070 | |
1071 | #include "mir/test/display_config_matchers.h" |
1072 | |
1073 | === renamed file 'tests/unit-tests/input/test_nested_input_platform.cpp' => 'tests/unit-tests/platforms/nested/test_nested_input_platform.cpp' |
1074 | --- tests/unit-tests/input/test_nested_input_platform.cpp 2016-10-27 14:31:48 +0000 |
1075 | +++ tests/unit-tests/platforms/nested/test_nested_input_platform.cpp 2016-11-23 13:17:56 +0000 |
1076 | @@ -16,7 +16,7 @@ |
1077 | * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com> |
1078 | */ |
1079 | |
1080 | -#include "src/server/graphics/nested/input_platform.h" |
1081 | +#include "src/platforms/nested/input_platform.h" |
1082 | #include "src/server/report/null_report_factory.h" |
1083 | #include "src/include/client/mir/input/input_devices.h" |
1084 | #include "src/server/input/default_event_builder.h" |
1085 | |
1086 | === modified file 'tools/update_package_abis.sh' |
1087 | --- tools/update_package_abis.sh 2016-10-07 14:24:28 +0000 |
1088 | +++ tools/update_package_abis.sh 2016-11-23 13:17:56 +0000 |
1089 | @@ -23,6 +23,7 @@ |
1090 | mir-platform-graphics-android:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ |
1091 | mir-platform-graphics-mesa-x:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ |
1092 | mir-platform-graphics-mesa-kms:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ |
1093 | + mir-platform-graphics-nested:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ |
1094 | mir-platform-input-evdev:MIR_SERVER_INPUT_PLATFORM_ABI" |
1095 | |
1096 | package_name() |
381 + OUTPUT_NAME graphics-nested
Shouldn't that be server-nested? I.e like server-mesa-x11. Otherwise looks good. Will try later.