Merge lp:~alan-griffiths/mir/nested-server-uses-host-graphics-platform into lp:mir
- nested-server-uses-host-graphics-platform
- Merge into development-branch
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Alexandros Frantzis | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 3244 | ||||
Proposed branch: | lp:~alan-griffiths/mir/nested-server-uses-host-graphics-platform | ||||
Merge into: | lp:mir | ||||
Prerequisite: | lp:~alan-griffiths/mir/merge-0.18 | ||||
Diff against target: |
851 lines (+335/-33) 31 files modified
examples/basic.c (+12/-0) include/client/mir_toolkit/client_types.h (+15/-0) include/client/mir_toolkit/mir_connection.h (+11/-0) include/common/mir/libname.h (+35/-0) include/platform/mir/graphics/platform_ipc_package.h (+7/-0) include/platform/mir/module_properties.h (+7/-1) src/client/mir_connection.cpp (+26/-0) src/client/mir_connection.h (+1/-0) src/client/mir_connection_api.cpp (+14/-0) src/client/symbols.map (+7/-1) src/common/CMakeLists.txt (+2/-1) src/common/libname.cpp (+29/-0) src/common/symbols.map (+3/-2) src/platforms/android/server/ipc_operations.cpp (+17/-2) src/platforms/android/server/platform.cpp (+7/-2) src/platforms/evdev/platform_factory.cpp (+6/-2) src/platforms/mesa/server/common/ipc_operations.cpp (+12/-1) src/platforms/mesa/server/kms/platform_symbols.cpp (+7/-2) src/platforms/mesa/server/x11/graphics/graphics.cpp (+9/-3) src/platforms/mesa/server/x11/input/input.cpp (+4/-2) src/protobuf/mir_protobuf.proto (+11/-0) src/protobuf/symbols.map (+27/-0) src/server/frontend/session_mediator.cpp (+12/-0) src/server/graphics/default_configuration.cpp (+16/-10) src/server/graphics/nested/host_connection.h (+1/-0) src/server/graphics/nested/mir_client_host_connection.cpp (+14/-0) src/server/graphics/nested/mir_client_host_connection.h (+1/-0) tests/include/mir/test/doubles/stub_host_connection.h (+2/-0) tests/mir_test_framework/platform_graphics_dummy.cpp (+2/-1) tests/mir_test_framework/stub_input.cpp (+5/-2) tests/mir_test_framework/stubbed_graphics_platform.cpp (+13/-1) |
||||
To merge this branch: | bzr merge lp:~alan-griffiths/mir/nested-server-uses-host-graphics-platform | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Brandon Schaefer (community) | Approve | ||
Alberto Aguirre (community) | Approve | ||
Kevin DuBois (community) | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Alexandros Frantzis (community) | Approve | ||
Cemil Azizoglu (community) | Approve | ||
Review via email:
|
Commit message
Provide information on the selected graphics platform through the client API and use it in nested servers to select the same module. (LP:1515558)
Description of the change
Provide information on the selected graphics platform through the client API and use it in nested servers to select the same module.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3237
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3239
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3240
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3240
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
I'm liking the implication of the branch name. Haven't got to a review yet.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3241
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3241
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alexandros Frantzis (afrantzis) wrote : | # |
+#if 0
+ printf("Graphics module: %s (%d.%d%d) - file: %s\n",
+ properties.name,
+ properties.
+ properties.
+ properties.
+ properties.file);
+#endif
Not needed.
+ "mir:android"
Does the "mir:..." prefix denote that the module is provided by the mir team, or does it have some other meaning?
Looks good otherwise.
Needs fixing/info
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alexandros Frantzis (afrantzis) wrote : | # |
Looks good.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3243
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Kevin DuBois (kdub) wrote : | # |
44: + char const *file;
I guess a minor needs fixing, its not immediately obvious what the contents of 'file' are. (maybe rename to "library_filename" ?)
A followup (nonblocking) question (and maybe a followup MP) would be: would it be helpful to send both the server and client module names for the graphics platform? Perhaps by having:
mir_connection_
mir_connection_
mir_connection_
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3243
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alan Griffiths (alan-griffiths) wrote : | # |
> 44: + char const *file;
>
> I guess a minor needs fixing, its not immediately obvious what the contents of
> 'file' are. (maybe rename to "library_filename" ?)
It ought to be "module" rather than "library", but that is somewhat redundant in a struct called MirModuleProper
I guess "filename" is a little clearer than "file" though.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3244
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Brandon Schaefer (brandontschaefer) wrote : | # |
lgtm
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3244
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'examples/basic.c' | |||
2 | --- examples/basic.c 2015-09-17 20:32:32 +0000 | |||
3 | +++ examples/basic.c 2016-01-14 15:13:04 +0000 | |||
4 | @@ -117,6 +117,18 @@ | |||
5 | 117 | assert(0 <= platform_package.fd_items); | 117 | assert(0 <= platform_package.fd_items); |
6 | 118 | } | 118 | } |
7 | 119 | 119 | ||
8 | 120 | { | ||
9 | 121 | MirModuleProperties properties = { NULL, -1, -1, -1, NULL }; | ||
10 | 122 | |||
11 | 123 | mir_connection_get_graphics_module(mcd.connection, &properties); | ||
12 | 124 | |||
13 | 125 | assert(NULL != properties.name); | ||
14 | 126 | assert(0 <= properties.major_version); | ||
15 | 127 | assert(0 <= properties.minor_version); | ||
16 | 128 | assert(0 <= properties.micro_version); | ||
17 | 129 | assert(NULL != properties.filename); | ||
18 | 130 | } | ||
19 | 131 | |||
20 | 120 | // Identify a supported pixel format | 132 | // Identify a supported pixel format |
21 | 121 | MirPixelFormat pixel_format = mir_pixel_format_invalid; | 133 | MirPixelFormat pixel_format = mir_pixel_format_invalid; |
22 | 122 | unsigned int valid_formats; | 134 | unsigned int valid_formats; |
23 | 123 | 135 | ||
24 | === modified file 'include/client/mir_toolkit/client_types.h' | |||
25 | --- include/client/mir_toolkit/client_types.h 2015-09-02 16:33:14 +0000 | |||
26 | +++ include/client/mir_toolkit/client_types.h 2016-01-14 15:13:04 +0000 | |||
27 | @@ -192,6 +192,21 @@ | |||
28 | 192 | int fd[mir_platform_package_max]; | 192 | int fd[mir_platform_package_max]; |
29 | 193 | } MirPlatformPackage; | 193 | } MirPlatformPackage; |
30 | 194 | 194 | ||
31 | 195 | /** | ||
32 | 196 | * Retrieved information about a loadable module. This allows clients to | ||
33 | 197 | * identify the underlying platform. E.g. whether the graphics are | ||
34 | 198 | * "mir:android" or "mir:mesa". | ||
35 | 199 | * Third party graphics platforms do not currently exist but should be | ||
36 | 200 | * named according to the vendor and platform. Vis: "<vendor>:<platform>" | ||
37 | 201 | */ | ||
38 | 202 | typedef struct MirModuleProperties | ||
39 | 203 | { | ||
40 | 204 | char const *name; | ||
41 | 205 | int major_version; | ||
42 | 206 | int minor_version; | ||
43 | 207 | int micro_version; | ||
44 | 208 | char const *filename; | ||
45 | 209 | } MirModuleProperties; | ||
46 | 195 | 210 | ||
47 | 196 | /** | 211 | /** |
48 | 197 | * Retrieved information about a MirSurface. This is most useful for learning | 212 | * Retrieved information about a MirSurface. This is most useful for learning |
49 | 198 | 213 | ||
50 | === modified file 'include/client/mir_toolkit/mir_connection.h' | |||
51 | --- include/client/mir_toolkit/mir_connection.h 2015-11-17 12:46:14 +0000 | |||
52 | +++ include/client/mir_toolkit/mir_connection.h 2016-01-14 15:13:04 +0000 | |||
53 | @@ -95,6 +95,17 @@ | |||
54 | 95 | void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package); | 95 | void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package); |
55 | 96 | 96 | ||
56 | 97 | /** | 97 | /** |
57 | 98 | * Query graphics platform module. | ||
58 | 99 | * | ||
59 | 100 | * \note The char pointers in MirModuleProperties are owned by the connection and should not be | ||
60 | 101 | * freed. They remain valid until the connection is released. | ||
61 | 102 | * | ||
62 | 103 | * \param [in] connection The connection | ||
63 | 104 | * \param [out] properties Structure to be populated | ||
64 | 105 | */ | ||
65 | 106 | void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties); | ||
66 | 107 | |||
67 | 108 | /** | ||
68 | 98 | * Register a callback to be called when a Lifecycle state change occurs. | 109 | * Register a callback to be called when a Lifecycle state change occurs. |
69 | 99 | * \param [in] connection The connection | 110 | * \param [in] connection The connection |
70 | 100 | * \param [in] callback The function to be called when the state change occurs | 111 | * \param [in] callback The function to be called when the state change occurs |
71 | 101 | 112 | ||
72 | === added file 'include/common/mir/libname.h' | |||
73 | --- include/common/mir/libname.h 1970-01-01 00:00:00 +0000 | |||
74 | +++ include/common/mir/libname.h 2016-01-14 15:13:04 +0000 | |||
75 | @@ -0,0 +1,35 @@ | |||
76 | 1 | /* | ||
77 | 2 | * Copyright © 2016 Canonical Ltd. | ||
78 | 3 | * | ||
79 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
80 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
81 | 6 | * as published by the Free Software Foundation. | ||
82 | 7 | * | ||
83 | 8 | * This program is distributed in the hope that it will be useful, | ||
84 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
85 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
86 | 11 | * GNU Lesser General Public License for more details. | ||
87 | 12 | * | ||
88 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
89 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
90 | 15 | * | ||
91 | 16 | * Authored by: Alan Griffiths <alan@octopull.co.uk> | ||
92 | 17 | */ | ||
93 | 18 | |||
94 | 19 | #ifndef MIR_LIBNAME_H | ||
95 | 20 | #define MIR_LIBNAME_H | ||
96 | 21 | |||
97 | 22 | namespace mir | ||
98 | 23 | { | ||
99 | 24 | namespace detail { char const* libname_impl(void* libname); } | ||
100 | 25 | |||
101 | 26 | namespace | ||
102 | 27 | { | ||
103 | 28 | inline char const* libname() | ||
104 | 29 | { | ||
105 | 30 | return detail::libname_impl(reinterpret_cast<void*>(&libname)); | ||
106 | 31 | } | ||
107 | 32 | } | ||
108 | 33 | } | ||
109 | 34 | |||
110 | 35 | #endif //MIR_LIBNAME_H_H | ||
111 | 0 | 36 | ||
112 | === modified file 'include/platform/mir/graphics/platform_ipc_package.h' | |||
113 | --- include/platform/mir/graphics/platform_ipc_package.h 2015-02-22 07:46:25 +0000 | |||
114 | +++ include/platform/mir/graphics/platform_ipc_package.h 2016-01-14 15:13:04 +0000 | |||
115 | @@ -24,6 +24,8 @@ | |||
116 | 24 | 24 | ||
117 | 25 | namespace mir | 25 | namespace mir |
118 | 26 | { | 26 | { |
119 | 27 | struct ModuleProperties; | ||
120 | 28 | |||
121 | 27 | namespace graphics | 29 | namespace graphics |
122 | 28 | { | 30 | { |
123 | 29 | 31 | ||
124 | @@ -32,8 +34,13 @@ | |||
125 | 32 | */ | 34 | */ |
126 | 33 | struct PlatformIPCPackage | 35 | struct PlatformIPCPackage |
127 | 34 | { | 36 | { |
128 | 37 | PlatformIPCPackage() : graphics_module(nullptr) {} | ||
129 | 38 | explicit PlatformIPCPackage(ModuleProperties const* graphics_module) : graphics_module(graphics_module) {} | ||
130 | 39 | |||
131 | 35 | std::vector<int32_t> ipc_data; | 40 | std::vector<int32_t> ipc_data; |
132 | 36 | std::vector<int32_t> ipc_fds; | 41 | std::vector<int32_t> ipc_fds; |
133 | 42 | |||
134 | 43 | ModuleProperties const* graphics_module; | ||
135 | 37 | }; | 44 | }; |
136 | 38 | 45 | ||
137 | 39 | } | 46 | } |
138 | 40 | 47 | ||
139 | === modified file 'include/platform/mir/module_properties.h' | |||
140 | --- include/platform/mir/module_properties.h 2015-04-28 07:54:10 +0000 | |||
141 | +++ include/platform/mir/module_properties.h 2016-01-14 15:13:04 +0000 | |||
142 | @@ -23,7 +23,12 @@ | |||
143 | 23 | { | 23 | { |
144 | 24 | 24 | ||
145 | 25 | /** | 25 | /** |
147 | 26 | * Describes a platform module | 26 | * Describes a platform module. Mir provides the following graphics platforms: |
148 | 27 | * "mir:mesa-kms", "mir:mesa-x11" and "mir:android". | ||
149 | 28 | * Mir provides "mir:evdev-input" input platform. | ||
150 | 29 | * | ||
151 | 30 | * Third party platforms should be named according to the vendor and platform: | ||
152 | 31 | * "<vendor>:<platform>" | ||
153 | 27 | */ | 32 | */ |
154 | 28 | struct ModuleProperties | 33 | struct ModuleProperties |
155 | 29 | { | 34 | { |
156 | @@ -31,6 +36,7 @@ | |||
157 | 31 | int major_version; | 36 | int major_version; |
158 | 32 | int minor_version; | 37 | int minor_version; |
159 | 33 | int micro_version; | 38 | int micro_version; |
160 | 39 | char const* file; | ||
161 | 34 | }; | 40 | }; |
162 | 35 | } | 41 | } |
163 | 36 | 42 | ||
164 | 37 | 43 | ||
165 | === modified file 'src/client/mir_connection.cpp' | |||
166 | --- src/client/mir_connection.cpp 2016-01-13 19:08:38 +0000 | |||
167 | +++ src/client/mir_connection.cpp 2016-01-14 15:13:04 +0000 | |||
168 | @@ -643,6 +643,32 @@ | |||
169 | 643 | } | 643 | } |
170 | 644 | } | 644 | } |
171 | 645 | 645 | ||
172 | 646 | void MirConnection::populate_graphics_module(MirModuleProperties& properties) | ||
173 | 647 | { | ||
174 | 648 | // connect_result is write-once: once it's valid, we don't need to lock | ||
175 | 649 | // to use it. | ||
176 | 650 | if (connect_done && | ||
177 | 651 | !connect_result->has_error() && | ||
178 | 652 | connect_result->has_platform() && | ||
179 | 653 | connect_result->platform().has_graphics_module()) | ||
180 | 654 | { | ||
181 | 655 | auto const& graphics_module = connect_result->platform().graphics_module(); | ||
182 | 656 | properties.name = graphics_module.name().c_str(); | ||
183 | 657 | properties.major_version = graphics_module.major_version(); | ||
184 | 658 | properties.minor_version = graphics_module.minor_version(); | ||
185 | 659 | properties.micro_version = graphics_module.micro_version(); | ||
186 | 660 | properties.filename = graphics_module.file().c_str(); | ||
187 | 661 | } | ||
188 | 662 | else | ||
189 | 663 | { | ||
190 | 664 | properties.name = "(unknown)"; | ||
191 | 665 | properties.major_version = 0; | ||
192 | 666 | properties.minor_version = 0; | ||
193 | 667 | properties.micro_version = 0; | ||
194 | 668 | properties.filename = nullptr; | ||
195 | 669 | } | ||
196 | 670 | } | ||
197 | 671 | |||
198 | 646 | MirDisplayConfiguration* MirConnection::create_copy_of_display_config() | 672 | MirDisplayConfiguration* MirConnection::create_copy_of_display_config() |
199 | 647 | { | 673 | { |
200 | 648 | std::lock_guard<decltype(mutex)> lock(mutex); | 674 | std::lock_guard<decltype(mutex)> lock(mutex); |
201 | 649 | 675 | ||
202 | === modified file 'src/client/mir_connection.h' | |||
203 | --- src/client/mir_connection.h 2016-01-11 14:27:36 +0000 | |||
204 | +++ src/client/mir_connection.h 2016-01-14 15:13:04 +0000 | |||
205 | @@ -129,6 +129,7 @@ | |||
206 | 129 | void register_display_change_callback(mir_display_config_callback callback, void* context); | 129 | void register_display_change_callback(mir_display_config_callback callback, void* context); |
207 | 130 | 130 | ||
208 | 131 | void populate(MirPlatformPackage& platform_package); | 131 | void populate(MirPlatformPackage& platform_package); |
209 | 132 | void populate_graphics_module(MirModuleProperties& properties); | ||
210 | 132 | MirDisplayConfiguration* create_copy_of_display_config(); | 133 | MirDisplayConfiguration* create_copy_of_display_config(); |
211 | 133 | void available_surface_formats(MirPixelFormat* formats, | 134 | void available_surface_formats(MirPixelFormat* formats, |
212 | 134 | unsigned int formats_size, unsigned int& valid_formats); | 135 | unsigned int formats_size, unsigned int& valid_formats); |
213 | 135 | 136 | ||
214 | === modified file 'src/client/mir_connection_api.cpp' | |||
215 | --- src/client/mir_connection_api.cpp 2015-11-11 11:50:42 +0000 | |||
216 | +++ src/client/mir_connection_api.cpp 2016-01-14 15:13:04 +0000 | |||
217 | @@ -22,6 +22,7 @@ | |||
218 | 22 | #include "mir_toolkit/mir_connection.h" | 22 | #include "mir_toolkit/mir_connection.h" |
219 | 23 | #include "mir/default_configuration.h" | 23 | #include "mir/default_configuration.h" |
220 | 24 | #include "mir/raii.h" | 24 | #include "mir/raii.h" |
221 | 25 | #include "mir/require.h" | ||
222 | 25 | 26 | ||
223 | 26 | #include "mir_connection.h" | 27 | #include "mir_connection.h" |
224 | 27 | #include "default_connection_configuration.h" | 28 | #include "default_connection_configuration.h" |
225 | @@ -186,6 +187,19 @@ | |||
226 | 186 | connection->populate(*platform_package); | 187 | connection->populate(*platform_package); |
227 | 187 | } | 188 | } |
228 | 188 | 189 | ||
229 | 190 | void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties) | ||
230 | 191 | try | ||
231 | 192 | { | ||
232 | 193 | mir::require(mir_connection_is_valid(connection)); | ||
233 | 194 | mir::require(properties != nullptr); | ||
234 | 195 | |||
235 | 196 | connection->populate_graphics_module(*properties); | ||
236 | 197 | } | ||
237 | 198 | catch (std::exception const& ex) | ||
238 | 199 | { | ||
239 | 200 | MIR_LOG_UNCAUGHT_EXCEPTION(ex); | ||
240 | 201 | } | ||
241 | 202 | |||
242 | 189 | void mir_connection_set_lifecycle_event_callback( | 203 | void mir_connection_set_lifecycle_event_callback( |
243 | 190 | MirConnection* connection, | 204 | MirConnection* connection, |
244 | 191 | mir_lifecycle_event_callback callback, | 205 | mir_lifecycle_event_callback callback, |
245 | 192 | 206 | ||
246 | === modified file 'src/client/symbols.map' | |||
247 | --- src/client/symbols.map 2016-01-08 09:23:17 +0000 | |||
248 | +++ src/client/symbols.map 2016-01-14 15:13:04 +0000 | |||
249 | @@ -207,6 +207,13 @@ | |||
250 | 207 | *; | 207 | *; |
251 | 208 | } MIR_CLIENT_9v17; | 208 | } MIR_CLIENT_9v17; |
252 | 209 | 209 | ||
253 | 210 | MIR_CLIENT_unreleased { | ||
254 | 211 | global: | ||
255 | 212 | mir_connection_get_graphics_module; | ||
256 | 213 | local: | ||
257 | 214 | *; | ||
258 | 215 | } MIR_CLIENT_9v18; | ||
259 | 216 | |||
260 | 210 | MIR_CLIENT_DETAIL_9 { | 217 | MIR_CLIENT_DETAIL_9 { |
261 | 211 | global: | 218 | global: |
262 | 212 | extern "C++" { | 219 | extern "C++" { |
263 | @@ -261,4 +268,3 @@ | |||
264 | 261 | local: | 268 | local: |
265 | 262 | *; | 269 | *; |
266 | 263 | } MIR_CLIENT_DETAIL_9v18; | 270 | } MIR_CLIENT_DETAIL_9v18; |
267 | 264 | |||
268 | 265 | 271 | ||
269 | === modified file 'src/common/CMakeLists.txt' | |||
270 | --- src/common/CMakeLists.txt 2015-11-13 20:48:52 +0000 | |||
271 | +++ src/common/CMakeLists.txt 2016-01-14 15:13:04 +0000 | |||
272 | @@ -20,7 +20,8 @@ | |||
273 | 20 | $<TARGET_OBJECTS:mirfatal> | 20 | $<TARGET_OBJECTS:mirfatal> |
274 | 21 | $<TARGET_OBJECTS:android-input-common> | 21 | $<TARGET_OBJECTS:android-input-common> |
275 | 22 | ${CMAKE_CURRENT_SOURCE_DIR}/log.cpp | 22 | ${CMAKE_CURRENT_SOURCE_DIR}/log.cpp |
277 | 23 | ) | 23 | ${CMAKE_CURRENT_SOURCE_DIR}/libname.cpp ${PROJECT_SOURCE_DIR}/include/common/mir/libname.h |
278 | 24 | ) | ||
279 | 24 | 25 | ||
280 | 25 | set(PREFIX "${CMAKE_INSTALL_PREFIX}") | 26 | set(PREFIX "${CMAKE_INSTALL_PREFIX}") |
281 | 26 | set(EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}") | 27 | set(EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}") |
282 | 27 | 28 | ||
283 | === added file 'src/common/libname.cpp' | |||
284 | --- src/common/libname.cpp 1970-01-01 00:00:00 +0000 | |||
285 | +++ src/common/libname.cpp 2016-01-14 15:13:04 +0000 | |||
286 | @@ -0,0 +1,29 @@ | |||
287 | 1 | /* | ||
288 | 2 | * Copyright © 2016 Canonical Ltd. | ||
289 | 3 | * | ||
290 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
291 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
292 | 6 | * as published by the Free Software Foundation. | ||
293 | 7 | * | ||
294 | 8 | * This program is distributed in the hope that it will be useful, | ||
295 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
296 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
297 | 11 | * GNU Lesser General Public License for more details. | ||
298 | 12 | * | ||
299 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
300 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
301 | 15 | * | ||
302 | 16 | * Authored by: Alan Griffiths <alan@octopull.co.uk> | ||
303 | 17 | */ | ||
304 | 18 | |||
305 | 19 | #include "mir/libname.h" | ||
306 | 20 | |||
307 | 21 | #include <dlfcn.h> | ||
308 | 22 | |||
309 | 23 | char const* mir::detail::libname_impl(void* libname) | ||
310 | 24 | { | ||
311 | 25 | Dl_info info; | ||
312 | 26 | |||
313 | 27 | dladdr(libname, &info); | ||
314 | 28 | return info.dli_fname; | ||
315 | 29 | } | ||
316 | 0 | 30 | ||
317 | === modified file 'src/common/symbols.map' | |||
318 | --- src/common/symbols.map 2015-12-17 12:25:31 +0000 | |||
319 | +++ src/common/symbols.map 2016-01-14 15:13:04 +0000 | |||
320 | @@ -201,12 +201,13 @@ | |||
321 | 201 | local: *; | 201 | local: *; |
322 | 202 | } MIR_COMMON_5; | 202 | } MIR_COMMON_5; |
323 | 203 | 203 | ||
325 | 204 | MIR_COMMON_unreleased { | 204 | MIR_COMMON_unreleased { # New functions in Mir 0.19 |
326 | 205 | global: | 205 | global: |
327 | 206 | extern "C++" { | 206 | extern "C++" { |
328 | 207 | typeinfo?for?mir::logging::SharedLibraryProberReport; | 207 | typeinfo?for?mir::logging::SharedLibraryProberReport; |
329 | 208 | typeinfo?for?mir::time::SteadyClock; | 208 | typeinfo?for?mir::time::SteadyClock; |
330 | 209 | typeinfo?for?android::InputChannel; | 209 | typeinfo?for?android::InputChannel; |
331 | 210 | typeinfo?for?mir::logging::DumbConsoleLogger; | 210 | typeinfo?for?mir::logging::DumbConsoleLogger; |
332 | 211 | mir::detail::libname_impl*; | ||
333 | 211 | }; | 212 | }; |
335 | 212 | } MIR_COMMON_5; | 213 | } MIR_COMMON_5.1; |
336 | 213 | 214 | ||
337 | === modified file 'src/platforms/android/server/ipc_operations.cpp' | |||
338 | --- src/platforms/android/server/ipc_operations.cpp 2016-01-07 11:55:03 +0000 | |||
339 | +++ src/platforms/android/server/ipc_operations.cpp 2016-01-14 15:13:04 +0000 | |||
340 | @@ -17,13 +17,17 @@ | |||
341 | 17 | */ | 17 | */ |
342 | 18 | 18 | ||
343 | 19 | #include "mir/graphics/platform_ipc_package.h" | 19 | #include "mir/graphics/platform_ipc_package.h" |
344 | 20 | #include "mir/module_properties.h" | ||
345 | 20 | #include "mir/graphics/buffer.h" | 21 | #include "mir/graphics/buffer.h" |
346 | 21 | #include "mir/graphics/buffer_ipc_message.h" | 22 | #include "mir/graphics/buffer_ipc_message.h" |
347 | 22 | #include "mir/graphics/platform_operation_message.h" | 23 | #include "mir/graphics/platform_operation_message.h" |
348 | 24 | #include "mir/libname.h" | ||
349 | 23 | #include "android_native_buffer.h" | 25 | #include "android_native_buffer.h" |
350 | 24 | #include "ipc_operations.h" | 26 | #include "ipc_operations.h" |
351 | 27 | |||
352 | 28 | #include <boost/throw_exception.hpp> | ||
353 | 29 | |||
354 | 25 | #include <stdexcept> | 30 | #include <stdexcept> |
355 | 26 | #include <boost/throw_exception.hpp> | ||
356 | 27 | 31 | ||
357 | 28 | namespace mg = mir::graphics; | 32 | namespace mg = mir::graphics; |
358 | 29 | namespace mga = mir::graphics::android; | 33 | namespace mga = mir::graphics::android; |
359 | @@ -66,9 +70,20 @@ | |||
360 | 66 | { | 70 | { |
361 | 67 | } | 71 | } |
362 | 68 | 72 | ||
363 | 73 | namespace | ||
364 | 74 | { | ||
365 | 75 | mir::ModuleProperties const properties = { | ||
366 | 76 | "mir:android", | ||
367 | 77 | MIR_VERSION_MAJOR, | ||
368 | 78 | MIR_VERSION_MINOR, | ||
369 | 79 | MIR_VERSION_MICRO, | ||
370 | 80 | mir::libname() | ||
371 | 81 | }; | ||
372 | 82 | } | ||
373 | 83 | |||
374 | 69 | std::shared_ptr<mg::PlatformIPCPackage> mga::IpcOperations::connection_ipc_package() | 84 | std::shared_ptr<mg::PlatformIPCPackage> mga::IpcOperations::connection_ipc_package() |
375 | 70 | { | 85 | { |
377 | 71 | return std::make_shared<mg::PlatformIPCPackage>(); | 86 | return std::make_shared<mg::PlatformIPCPackage>(&properties); |
378 | 72 | } | 87 | } |
379 | 73 | 88 | ||
380 | 74 | mg::PlatformOperationMessage mga::IpcOperations::platform_operation( | 89 | mg::PlatformOperationMessage mga::IpcOperations::platform_operation( |
381 | 75 | 90 | ||
382 | === modified file 'src/platforms/android/server/platform.cpp' | |||
383 | --- src/platforms/android/server/platform.cpp 2016-01-07 11:55:03 +0000 | |||
384 | +++ src/platforms/android/server/platform.cpp 2016-01-14 15:13:04 +0000 | |||
385 | @@ -37,6 +37,7 @@ | |||
386 | 37 | #include "mir/options/configuration.h" | 37 | #include "mir/options/configuration.h" |
387 | 38 | #include "mir/abnormal_exit.h" | 38 | #include "mir/abnormal_exit.h" |
388 | 39 | #include "mir/assert_module_entry_point.h" | 39 | #include "mir/assert_module_entry_point.h" |
389 | 40 | #include "mir/libname.h" | ||
390 | 40 | 41 | ||
391 | 41 | #include <boost/throw_exception.hpp> | 42 | #include <boost/throw_exception.hpp> |
392 | 42 | #include <stdexcept> | 43 | #include <stdexcept> |
393 | @@ -197,12 +198,16 @@ | |||
394 | 197 | return err < 0 ? mg::PlatformPriority::unsupported : mg::PlatformPriority::best; | 198 | return err < 0 ? mg::PlatformPriority::unsupported : mg::PlatformPriority::best; |
395 | 198 | } | 199 | } |
396 | 199 | 200 | ||
397 | 201 | namespace | ||
398 | 202 | { | ||
399 | 200 | mir::ModuleProperties const description = { | 203 | mir::ModuleProperties const description = { |
401 | 201 | "android", | 204 | "mir:android", |
402 | 202 | MIR_VERSION_MAJOR, | 205 | MIR_VERSION_MAJOR, |
403 | 203 | MIR_VERSION_MINOR, | 206 | MIR_VERSION_MINOR, |
405 | 204 | MIR_VERSION_MICRO | 207 | MIR_VERSION_MICRO, |
406 | 208 | mir::libname() | ||
407 | 205 | }; | 209 | }; |
408 | 210 | } | ||
409 | 206 | 211 | ||
410 | 207 | mir::ModuleProperties const* describe_graphics_module() | 212 | mir::ModuleProperties const* describe_graphics_module() |
411 | 208 | { | 213 | { |
412 | 209 | 214 | ||
413 | === modified file 'src/platforms/evdev/platform_factory.cpp' | |||
414 | --- src/platforms/evdev/platform_factory.cpp 2015-11-25 20:26:59 +0000 | |||
415 | +++ src/platforms/evdev/platform_factory.cpp 2016-01-14 15:13:04 +0000 | |||
416 | @@ -20,6 +20,7 @@ | |||
417 | 20 | #include "mir/udev/wrapper.h" | 20 | #include "mir/udev/wrapper.h" |
418 | 21 | #include "mir/fd.h" | 21 | #include "mir/fd.h" |
419 | 22 | #include "mir/assert_module_entry_point.h" | 22 | #include "mir/assert_module_entry_point.h" |
420 | 23 | #include "mir/libname.h" | ||
421 | 23 | 24 | ||
422 | 24 | #include <sys/types.h> | 25 | #include <sys/types.h> |
423 | 25 | #include <sys/stat.h> | 26 | #include <sys/stat.h> |
424 | @@ -37,12 +38,15 @@ | |||
425 | 37 | namespace | 38 | namespace |
426 | 38 | { | 39 | { |
427 | 39 | char const* const host_socket_opt = "host-socket"; | 40 | char const* const host_socket_opt = "host-socket"; |
428 | 41 | |||
429 | 40 | mir::ModuleProperties const description = { | 42 | mir::ModuleProperties const description = { |
431 | 41 | "evdev-input", | 43 | "mir:evdev-input", |
432 | 42 | MIR_VERSION_MAJOR, | 44 | MIR_VERSION_MAJOR, |
433 | 43 | MIR_VERSION_MINOR, | 45 | MIR_VERSION_MINOR, |
435 | 44 | MIR_VERSION_MICRO | 46 | MIR_VERSION_MICRO, |
436 | 47 | mir::libname() | ||
437 | 45 | }; | 48 | }; |
438 | 49 | |||
439 | 46 | bool can_open_input_devices() | 50 | bool can_open_input_devices() |
440 | 47 | { | 51 | { |
441 | 48 | mu::Enumerator input_enumerator{std::make_shared<mu::Context>()}; | 52 | mu::Enumerator input_enumerator{std::make_shared<mu::Context>()}; |
442 | 49 | 53 | ||
443 | === modified file 'src/platforms/mesa/server/common/ipc_operations.cpp' | |||
444 | --- src/platforms/mesa/server/common/ipc_operations.cpp 2015-07-23 02:39:20 +0000 | |||
445 | +++ src/platforms/mesa/server/common/ipc_operations.cpp 2016-01-14 15:13:04 +0000 | |||
446 | @@ -19,8 +19,10 @@ | |||
447 | 19 | #include "mir/graphics/buffer.h" | 19 | #include "mir/graphics/buffer.h" |
448 | 20 | #include "mir/graphics/buffer_ipc_message.h" | 20 | #include "mir/graphics/buffer_ipc_message.h" |
449 | 21 | #include "mir/graphics/platform_ipc_package.h" | 21 | #include "mir/graphics/platform_ipc_package.h" |
450 | 22 | #include "mir/graphics/platform.h" | ||
451 | 22 | #include "mir/graphics/nested_context.h" | 23 | #include "mir/graphics/nested_context.h" |
452 | 23 | #include "mir/graphics/platform_operation_message.h" | 24 | #include "mir/graphics/platform_operation_message.h" |
453 | 25 | #include "mir/libname.h" | ||
454 | 24 | #include "display_helpers.h" | 26 | #include "display_helpers.h" |
455 | 25 | #include "drm_authentication.h" | 27 | #include "drm_authentication.h" |
456 | 26 | #include "drm_close_threadsafe.h" | 28 | #include "drm_close_threadsafe.h" |
457 | @@ -38,9 +40,18 @@ | |||
458 | 38 | 40 | ||
459 | 39 | namespace | 41 | namespace |
460 | 40 | { | 42 | { |
461 | 43 | mir::ModuleProperties const description = { | ||
462 | 44 | "mir:mesa", | ||
463 | 45 | MIR_VERSION_MAJOR, | ||
464 | 46 | MIR_VERSION_MINOR, | ||
465 | 47 | MIR_VERSION_MICRO, | ||
466 | 48 | mir::libname() | ||
467 | 49 | }; | ||
468 | 50 | |||
469 | 41 | struct MesaPlatformIPCPackage : public mg::PlatformIPCPackage | 51 | struct MesaPlatformIPCPackage : public mg::PlatformIPCPackage |
470 | 42 | { | 52 | { |
472 | 43 | MesaPlatformIPCPackage(int drm_auth_fd) | 53 | MesaPlatformIPCPackage(int drm_auth_fd) : |
473 | 54 | mg::PlatformIPCPackage(&description) | ||
474 | 44 | { | 55 | { |
475 | 45 | ipc_fds.push_back(drm_auth_fd); | 56 | ipc_fds.push_back(drm_auth_fd); |
476 | 46 | } | 57 | } |
477 | 47 | 58 | ||
478 | === modified file 'src/platforms/mesa/server/kms/platform_symbols.cpp' | |||
479 | --- src/platforms/mesa/server/kms/platform_symbols.cpp 2016-01-07 11:55:03 +0000 | |||
480 | +++ src/platforms/mesa/server/kms/platform_symbols.cpp 2016-01-14 15:13:04 +0000 | |||
481 | @@ -24,6 +24,7 @@ | |||
482 | 24 | #include "mir/udev/wrapper.h" | 24 | #include "mir/udev/wrapper.h" |
483 | 25 | #include "mir/module_deleter.h" | 25 | #include "mir/module_deleter.h" |
484 | 26 | #include "mir/assert_module_entry_point.h" | 26 | #include "mir/assert_module_entry_point.h" |
485 | 27 | #include "mir/libname.h" | ||
486 | 27 | 28 | ||
487 | 28 | #include <fcntl.h> | 29 | #include <fcntl.h> |
488 | 29 | #include <sys/ioctl.h> | 30 | #include <sys/ioctl.h> |
489 | @@ -211,12 +212,16 @@ | |||
490 | 211 | mg::PlatformPriority::supported - 1); | 212 | mg::PlatformPriority::supported - 1); |
491 | 212 | } | 213 | } |
492 | 213 | 214 | ||
493 | 215 | namespace | ||
494 | 216 | { | ||
495 | 214 | mir::ModuleProperties const description = { | 217 | mir::ModuleProperties const description = { |
497 | 215 | "mesa-kms", | 218 | "mir:mesa-kms", |
498 | 216 | MIR_VERSION_MAJOR, | 219 | MIR_VERSION_MAJOR, |
499 | 217 | MIR_VERSION_MINOR, | 220 | MIR_VERSION_MINOR, |
501 | 218 | MIR_VERSION_MICRO | 221 | MIR_VERSION_MICRO, |
502 | 222 | mir::libname() | ||
503 | 219 | }; | 223 | }; |
504 | 224 | } | ||
505 | 220 | 225 | ||
506 | 221 | mir::ModuleProperties const* describe_graphics_module() | 226 | mir::ModuleProperties const* describe_graphics_module() |
507 | 222 | { | 227 | { |
508 | 223 | 228 | ||
509 | === modified file 'src/platforms/mesa/server/x11/graphics/graphics.cpp' | |||
510 | --- src/platforms/mesa/server/x11/graphics/graphics.cpp 2016-01-07 11:55:03 +0000 | |||
511 | +++ src/platforms/mesa/server/x11/graphics/graphics.cpp 2016-01-14 15:13:04 +0000 | |||
512 | @@ -20,9 +20,11 @@ | |||
513 | 20 | #include "platform.h" | 20 | #include "platform.h" |
514 | 21 | #include "guest_platform.h" | 21 | #include "guest_platform.h" |
515 | 22 | #include "../X11_resources.h" | 22 | #include "../X11_resources.h" |
516 | 23 | #include <boost/throw_exception.hpp> | ||
517 | 24 | #include "mir/module_deleter.h" | 23 | #include "mir/module_deleter.h" |
518 | 25 | #include "mir/assert_module_entry_point.h" | 24 | #include "mir/assert_module_entry_point.h" |
519 | 25 | #include "mir/libname.h" | ||
520 | 26 | |||
521 | 27 | #include <boost/throw_exception.hpp> | ||
522 | 26 | 28 | ||
523 | 27 | namespace mo = mir::options; | 29 | namespace mo = mir::options; |
524 | 28 | namespace mg = mir::graphics; | 30 | namespace mg = mir::graphics; |
525 | @@ -96,12 +98,16 @@ | |||
526 | 96 | return mg::PlatformPriority::unsupported; | 98 | return mg::PlatformPriority::unsupported; |
527 | 97 | } | 99 | } |
528 | 98 | 100 | ||
529 | 101 | namespace | ||
530 | 102 | { | ||
531 | 99 | mir::ModuleProperties const description = { | 103 | mir::ModuleProperties const description = { |
533 | 100 | "mesa-x11", | 104 | "mir:mesa-x11", |
534 | 101 | MIR_VERSION_MAJOR, | 105 | MIR_VERSION_MAJOR, |
535 | 102 | MIR_VERSION_MINOR, | 106 | MIR_VERSION_MINOR, |
537 | 103 | MIR_VERSION_MICRO | 107 | MIR_VERSION_MICRO, |
538 | 108 | mir::libname() | ||
539 | 104 | }; | 109 | }; |
540 | 110 | } | ||
541 | 105 | 111 | ||
542 | 106 | mir::ModuleProperties const* describe_graphics_module() | 112 | mir::ModuleProperties const* describe_graphics_module() |
543 | 107 | { | 113 | { |
544 | 108 | 114 | ||
545 | === modified file 'src/platforms/mesa/server/x11/input/input.cpp' | |||
546 | --- src/platforms/mesa/server/x11/input/input.cpp 2015-12-02 13:06:44 +0000 | |||
547 | +++ src/platforms/mesa/server/x11/input/input.cpp 2016-01-14 15:13:04 +0000 | |||
548 | @@ -20,6 +20,7 @@ | |||
549 | 20 | #include "../X11_resources.h" | 20 | #include "../X11_resources.h" |
550 | 21 | #include "mir/module_properties.h" | 21 | #include "mir/module_properties.h" |
551 | 22 | #include "mir/assert_module_entry_point.h" | 22 | #include "mir/assert_module_entry_point.h" |
552 | 23 | #include "mir/libname.h" | ||
553 | 23 | 24 | ||
554 | 24 | namespace mo = mir::options; | 25 | namespace mo = mir::options; |
555 | 25 | namespace mi = mir::input; | 26 | namespace mi = mir::input; |
556 | @@ -61,10 +62,11 @@ | |||
557 | 61 | namespace | 62 | namespace |
558 | 62 | { | 63 | { |
559 | 63 | mir::ModuleProperties const description = { | 64 | mir::ModuleProperties const description = { |
561 | 64 | "x11-input", | 65 | "mir:x11-input", |
562 | 65 | MIR_VERSION_MAJOR, | 66 | MIR_VERSION_MAJOR, |
563 | 66 | MIR_VERSION_MINOR, | 67 | MIR_VERSION_MINOR, |
565 | 67 | MIR_VERSION_MICRO | 68 | MIR_VERSION_MICRO, |
566 | 69 | mir::libname() | ||
567 | 68 | }; | 70 | }; |
568 | 69 | } | 71 | } |
569 | 70 | 72 | ||
570 | 71 | 73 | ||
571 | === modified file 'src/protobuf/mir_protobuf.proto' | |||
572 | --- src/protobuf/mir_protobuf.proto 2015-10-16 17:34:48 +0000 | |||
573 | +++ src/protobuf/mir_protobuf.proto 2016-01-14 15:13:04 +0000 | |||
574 | @@ -142,10 +142,21 @@ | |||
575 | 142 | optional string error = 127; | 142 | optional string error = 127; |
576 | 143 | } | 143 | } |
577 | 144 | 144 | ||
578 | 145 | message ModuleProperties | ||
579 | 146 | { | ||
580 | 147 | required string name = 1; | ||
581 | 148 | required uint32 major_version = 2; | ||
582 | 149 | required uint32 minor_version = 3; | ||
583 | 150 | required uint32 micro_version = 4; | ||
584 | 151 | required string file = 5; | ||
585 | 152 | }; | ||
586 | 153 | |||
587 | 154 | |||
588 | 145 | message Platform { | 155 | message Platform { |
589 | 146 | repeated sint32 fd = 1; | 156 | repeated sint32 fd = 1; |
590 | 147 | repeated int32 data = 2; | 157 | repeated int32 data = 2; |
591 | 148 | optional int32 fds_on_side_channel = 3; | 158 | optional int32 fds_on_side_channel = 3; |
592 | 159 | optional ModuleProperties graphics_module = 4; | ||
593 | 149 | 160 | ||
594 | 150 | optional string error = 127; | 161 | optional string error = 127; |
595 | 151 | } | 162 | } |
596 | 152 | 163 | ||
597 | === modified file 'src/protobuf/symbols.map' | |||
598 | --- src/protobuf/symbols.map 2015-11-02 17:40:57 +0000 | |||
599 | +++ src/protobuf/symbols.map 2016-01-14 15:13:04 +0000 | |||
600 | @@ -975,3 +975,30 @@ | |||
601 | 975 | }; | 975 | }; |
602 | 976 | local: *; | 976 | local: *; |
603 | 977 | }; | 977 | }; |
604 | 978 | |||
605 | 979 | MIR_PROTOBUF_3_unreleased { | ||
606 | 980 | global: | ||
607 | 981 | extern "C++" { | ||
608 | 982 | mir::protobuf::ModuleProperties::ByteSize*; | ||
609 | 983 | mir::protobuf::ModuleProperties::CheckTypeAndMergeFrom*; | ||
610 | 984 | mir::protobuf::ModuleProperties::Clear*; | ||
611 | 985 | mir::protobuf::ModuleProperties::?ModuleProperties*; | ||
612 | 986 | mir::protobuf::ModuleProperties::ModuleProperties*; | ||
613 | 987 | mir::protobuf::ModuleProperties::CopyFrom*; | ||
614 | 988 | mir::protobuf::ModuleProperties::default_instance*; | ||
615 | 989 | mir::protobuf::ModuleProperties::DiscardUnknownFields*; | ||
616 | 990 | mir::protobuf::ModuleProperties::GetTypeName*; | ||
617 | 991 | mir::protobuf::ModuleProperties::IsInitialized*; | ||
618 | 992 | mir::protobuf::ModuleProperties::kDisplayConfigurationFieldNumber*; | ||
619 | 993 | mir::protobuf::ModuleProperties::kDisplayOutputFieldNumber*; | ||
620 | 994 | mir::protobuf::ModuleProperties::kErrorFieldNumber*; | ||
621 | 995 | mir::protobuf::ModuleProperties::kPlatformFieldNumber*; | ||
622 | 996 | mir::protobuf::ModuleProperties::kSurfacePixelFormatFieldNumber*; | ||
623 | 997 | mir::protobuf::ModuleProperties::MergeFrom*; | ||
624 | 998 | mir::protobuf::ModuleProperties::MergePartialFromCodedStream*; | ||
625 | 999 | mir::protobuf::ModuleProperties::New*; | ||
626 | 1000 | mir::protobuf::ModuleProperties::SerializeWithCachedSizes*; | ||
627 | 1001 | mir::protobuf::ModuleProperties::Swap*; | ||
628 | 1002 | typeinfo?for?mir::protobuf::ModuleProperties; | ||
629 | 1003 | }; | ||
630 | 1004 | } MIR_PROTOBUF_3; | ||
631 | 978 | 1005 | ||
632 | === modified file 'src/server/frontend/session_mediator.cpp' | |||
633 | --- src/server/frontend/session_mediator.cpp 2015-12-16 11:57:27 +0000 | |||
634 | +++ src/server/frontend/session_mediator.cpp 2016-01-14 15:13:04 +0000 | |||
635 | @@ -50,6 +50,7 @@ | |||
636 | 50 | #include "mir/scene/prompt_session_creation_parameters.h" | 50 | #include "mir/scene/prompt_session_creation_parameters.h" |
637 | 51 | #include "mir/fd.h" | 51 | #include "mir/fd.h" |
638 | 52 | #include "mir/cookie_factory.h" | 52 | #include "mir/cookie_factory.h" |
639 | 53 | #include "mir/module_properties.h" | ||
640 | 53 | 54 | ||
641 | 54 | #include "mir/geometry/rectangles.h" | 55 | #include "mir/geometry/rectangles.h" |
642 | 55 | #include "buffer_stream_tracker.h" | 56 | #include "buffer_stream_tracker.h" |
643 | @@ -144,6 +145,17 @@ | |||
644 | 144 | for (auto& ipc_fds : ipc_package->ipc_fds) | 145 | for (auto& ipc_fds : ipc_package->ipc_fds) |
645 | 145 | platform->add_fd(ipc_fds); | 146 | platform->add_fd(ipc_fds); |
646 | 146 | 147 | ||
647 | 148 | if (auto const graphics_module = ipc_package->graphics_module) | ||
648 | 149 | { | ||
649 | 150 | auto const module = platform->mutable_graphics_module(); | ||
650 | 151 | |||
651 | 152 | module->set_name(graphics_module->name); | ||
652 | 153 | module->set_major_version(graphics_module->major_version); | ||
653 | 154 | module->set_minor_version(graphics_module->minor_version); | ||
654 | 155 | module->set_micro_version(graphics_module->micro_version); | ||
655 | 156 | module->set_file(graphics_module->file); | ||
656 | 157 | } | ||
657 | 158 | |||
658 | 147 | auto display_config = display_changer->base_configuration(); | 159 | auto display_config = display_changer->base_configuration(); |
659 | 148 | auto protobuf_config = response->mutable_display_configuration(); | 160 | auto protobuf_config = response->mutable_display_configuration(); |
660 | 149 | mfd::pack_protobuf_display_configuration(*protobuf_config, *display_config); | 161 | mfd::pack_protobuf_display_configuration(*protobuf_config, *display_config); |
661 | 150 | 162 | ||
662 | === modified file 'src/server/graphics/default_configuration.cpp' | |||
663 | --- src/server/graphics/default_configuration.cpp 2015-11-05 18:24:29 +0000 | |||
664 | +++ src/server/graphics/default_configuration.cpp 2016-01-14 15:13:04 +0000 | |||
665 | @@ -73,6 +73,21 @@ | |||
666 | 73 | [this]()->std::shared_ptr<mg::Platform> | 73 | [this]()->std::shared_ptr<mg::Platform> |
667 | 74 | { | 74 | { |
668 | 75 | std::shared_ptr<mir::SharedLibrary> platform_library; | 75 | std::shared_ptr<mir::SharedLibrary> platform_library; |
669 | 76 | |||
670 | 77 | // if a host socket is set we should use the host graphics module to create a "guest" platform | ||
671 | 78 | if (the_options()->is_set(options::host_socket_opt)) | ||
672 | 79 | { | ||
673 | 80 | auto const host_connection = the_host_connection(); | ||
674 | 81 | |||
675 | 82 | platform_library = std::make_shared<mir::SharedLibrary>(host_connection->graphics_platform_library()); | ||
676 | 83 | |||
677 | 84 | auto create_guest_platform = platform_library->load_function<mg::CreateGuestPlatform>( | ||
678 | 85 | "create_guest_platform", | ||
679 | 86 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); | ||
680 | 87 | |||
681 | 88 | return create_guest_platform(the_display_report(), host_connection); | ||
682 | 89 | } | ||
683 | 90 | |||
684 | 76 | // fallback to standalone if host socket is unset | 91 | // fallback to standalone if host socket is unset |
685 | 77 | if (the_options()->is_set(options::platform_graphics_lib)) | 92 | if (the_options()->is_set(options::platform_graphics_lib)) |
686 | 78 | { | 93 | { |
687 | @@ -92,9 +107,6 @@ | |||
688 | 92 | auto create_host_platform = platform_library->load_function<mg::CreateHostPlatform>( | 107 | auto create_host_platform = platform_library->load_function<mg::CreateHostPlatform>( |
689 | 93 | "create_host_platform", | 108 | "create_host_platform", |
690 | 94 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); | 109 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); |
691 | 95 | auto create_guest_platform = platform_library->load_function<mg::CreateGuestPlatform>( | ||
692 | 96 | "create_guest_platform", | ||
693 | 97 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); | ||
694 | 98 | auto describe_module = platform_library->load_function<mg::DescribeModule>( | 110 | auto describe_module = platform_library->load_function<mg::DescribeModule>( |
695 | 99 | "describe_graphics_module", | 111 | "describe_graphics_module", |
696 | 100 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); | 112 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); |
697 | @@ -105,13 +117,7 @@ | |||
698 | 105 | description->minor_version, | 117 | description->minor_version, |
699 | 106 | description->micro_version); | 118 | description->micro_version); |
700 | 107 | 119 | ||
708 | 108 | if (!the_options()->is_set(options::host_socket_opt)) | 120 | return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report()); |
702 | 109 | return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report()); | ||
703 | 110 | else | ||
704 | 111 | return create_guest_platform( | ||
705 | 112 | the_display_report(), | ||
706 | 113 | the_host_connection()); | ||
707 | 114 | |||
709 | 115 | }); | 121 | }); |
710 | 116 | } | 122 | } |
711 | 117 | 123 | ||
712 | 118 | 124 | ||
713 | === modified file 'src/server/graphics/nested/host_connection.h' | |||
714 | --- src/server/graphics/nested/host_connection.h 2015-06-17 05:20:42 +0000 | |||
715 | +++ src/server/graphics/nested/host_connection.h 2016-01-14 15:13:04 +0000 | |||
716 | @@ -52,6 +52,7 @@ | |||
717 | 52 | 52 | ||
718 | 53 | virtual void set_cursor_image(CursorImage const& image) = 0; | 53 | virtual void set_cursor_image(CursorImage const& image) = 0; |
719 | 54 | virtual void hide_cursor() = 0; | 54 | virtual void hide_cursor() = 0; |
720 | 55 | virtual auto graphics_platform_library() -> std::string = 0; | ||
721 | 55 | 56 | ||
722 | 56 | protected: | 57 | protected: |
723 | 57 | HostConnection() = default; | 58 | HostConnection() = default; |
724 | 58 | 59 | ||
725 | === modified file 'src/server/graphics/nested/mir_client_host_connection.cpp' | |||
726 | --- src/server/graphics/nested/mir_client_host_connection.cpp 2015-10-07 19:22:52 +0000 | |||
727 | +++ src/server/graphics/nested/mir_client_host_connection.cpp 2016-01-14 15:13:04 +0000 | |||
728 | @@ -317,3 +317,17 @@ | |||
729 | 317 | surface->hide_cursor(); | 317 | surface->hide_cursor(); |
730 | 318 | } | 318 | } |
731 | 319 | } | 319 | } |
732 | 320 | |||
733 | 321 | auto mgn::MirClientHostConnection::graphics_platform_library() -> std::string | ||
734 | 322 | { | ||
735 | 323 | MirModuleProperties properties = { nullptr, 0, 0, 0, nullptr }; | ||
736 | 324 | |||
737 | 325 | mir_connection_get_graphics_module(mir_connection, &properties); | ||
738 | 326 | |||
739 | 327 | if (properties.filename == nullptr) | ||
740 | 328 | { | ||
741 | 329 | BOOST_THROW_EXCEPTION(std::runtime_error("Cannot identify host graphics platform")); | ||
742 | 330 | } | ||
743 | 331 | |||
744 | 332 | return properties.filename; | ||
745 | 333 | } | ||
746 | 320 | \ No newline at end of file | 334 | \ No newline at end of file |
747 | 321 | 335 | ||
748 | === modified file 'src/server/graphics/nested/mir_client_host_connection.h' | |||
749 | --- src/server/graphics/nested/mir_client_host_connection.h 2015-06-17 05:20:42 +0000 | |||
750 | +++ src/server/graphics/nested/mir_client_host_connection.h 2016-01-14 15:13:04 +0000 | |||
751 | @@ -53,6 +53,7 @@ | |||
752 | 53 | 53 | ||
753 | 54 | void set_cursor_image(CursorImage const& image) override; | 54 | void set_cursor_image(CursorImage const& image) override; |
754 | 55 | void hide_cursor() override; | 55 | void hide_cursor() override; |
755 | 56 | auto graphics_platform_library() -> std::string override; | ||
756 | 56 | 57 | ||
757 | 57 | virtual PlatformOperationMessage platform_operation( | 58 | virtual PlatformOperationMessage platform_operation( |
758 | 58 | unsigned int op, PlatformOperationMessage const& request) override; | 59 | unsigned int op, PlatformOperationMessage const& request) override; |
759 | 59 | 60 | ||
760 | === modified file 'tests/include/mir/test/doubles/stub_host_connection.h' | |||
761 | --- tests/include/mir/test/doubles/stub_host_connection.h 2015-06-17 05:20:42 +0000 | |||
762 | +++ tests/include/mir/test/doubles/stub_host_connection.h 2016-01-14 15:13:04 +0000 | |||
763 | @@ -76,6 +76,8 @@ | |||
764 | 76 | void hide_cursor() | 76 | void hide_cursor() |
765 | 77 | { | 77 | { |
766 | 78 | } | 78 | } |
767 | 79 | |||
768 | 80 | auto graphics_platform_library() -> std::string { return {}; } | ||
769 | 79 | }; | 81 | }; |
770 | 80 | 82 | ||
771 | 81 | 83 | ||
772 | 82 | 84 | ||
773 | === modified file 'tests/mir_test_framework/platform_graphics_dummy.cpp' | |||
774 | --- tests/mir_test_framework/platform_graphics_dummy.cpp 2015-11-12 14:21:39 +0000 | |||
775 | +++ tests/mir_test_framework/platform_graphics_dummy.cpp 2016-01-14 15:13:04 +0000 | |||
776 | @@ -37,7 +37,8 @@ | |||
777 | 37 | "dummy", | 37 | "dummy", |
778 | 38 | MIR_VERSION_MAJOR, | 38 | MIR_VERSION_MAJOR, |
779 | 39 | MIR_VERSION_MINOR, | 39 | MIR_VERSION_MINOR, |
781 | 40 | MIR_VERSION_MICRO | 40 | MIR_VERSION_MICRO, |
782 | 41 | "dummy" | ||
783 | 41 | }; | 42 | }; |
784 | 42 | 43 | ||
785 | 43 | mir::ModuleProperties const* describe_graphics_module() | 44 | mir::ModuleProperties const* describe_graphics_module() |
786 | 44 | 45 | ||
787 | === modified file 'tests/mir_test_framework/stub_input.cpp' | |||
788 | --- tests/mir_test_framework/stub_input.cpp 2015-11-25 20:26:59 +0000 | |||
789 | +++ tests/mir_test_framework/stub_input.cpp 2016-01-14 15:13:04 +0000 | |||
790 | @@ -20,6 +20,8 @@ | |||
791 | 20 | #include "fake_input_device_impl.h" | 20 | #include "fake_input_device_impl.h" |
792 | 21 | #include "mir/module_properties.h" | 21 | #include "mir/module_properties.h" |
793 | 22 | #include "mir/assert_module_entry_point.h" | 22 | #include "mir/assert_module_entry_point.h" |
794 | 23 | #include "mir/libname.h" | ||
795 | 24 | |||
796 | 23 | 25 | ||
797 | 24 | namespace mtf = mir_test_framework; | 26 | namespace mtf = mir_test_framework; |
798 | 25 | namespace mo = mir::options; | 27 | namespace mo = mir::options; |
799 | @@ -52,10 +54,11 @@ | |||
800 | 52 | namespace | 54 | namespace |
801 | 53 | { | 55 | { |
802 | 54 | mir::ModuleProperties const description = { | 56 | mir::ModuleProperties const description = { |
804 | 55 | "stub-input", | 57 | "mir:stub-input", |
805 | 56 | MIR_VERSION_MAJOR, | 58 | MIR_VERSION_MAJOR, |
806 | 57 | MIR_VERSION_MINOR, | 59 | MIR_VERSION_MINOR, |
808 | 58 | MIR_VERSION_MICRO | 60 | MIR_VERSION_MICRO, |
809 | 61 | mir::libname() | ||
810 | 59 | }; | 62 | }; |
811 | 60 | } | 63 | } |
812 | 61 | 64 | ||
813 | 62 | 65 | ||
814 | === modified file 'tests/mir_test_framework/stubbed_graphics_platform.cpp' | |||
815 | --- tests/mir_test_framework/stubbed_graphics_platform.cpp 2015-11-12 14:21:39 +0000 | |||
816 | +++ tests/mir_test_framework/stubbed_graphics_platform.cpp 2016-01-14 15:13:04 +0000 | |||
817 | @@ -28,6 +28,7 @@ | |||
818 | 28 | #include "mir/fd.h" | 28 | #include "mir/fd.h" |
819 | 29 | #include "mir/assert_module_entry_point.h" | 29 | #include "mir/assert_module_entry_point.h" |
820 | 30 | #include "mir/test/pipe.h" | 30 | #include "mir/test/pipe.h" |
821 | 31 | #include "mir/libname.h" | ||
822 | 31 | 32 | ||
823 | 32 | #ifdef ANDROID | 33 | #ifdef ANDROID |
824 | 33 | #include "mir/test/doubles/stub_android_native_buffer.h" | 34 | #include "mir/test/doubles/stub_android_native_buffer.h" |
825 | @@ -50,6 +51,17 @@ | |||
826 | 50 | 51 | ||
827 | 51 | namespace | 52 | namespace |
828 | 52 | { | 53 | { |
829 | 54 | namespace | ||
830 | 55 | { | ||
831 | 56 | mir::ModuleProperties const module_properties = { | ||
832 | 57 | "mir:stub-graphics", | ||
833 | 58 | MIR_VERSION_MAJOR, | ||
834 | 59 | MIR_VERSION_MINOR, | ||
835 | 60 | MIR_VERSION_MICRO, | ||
836 | 61 | mir::libname() | ||
837 | 62 | }; | ||
838 | 63 | } | ||
839 | 64 | |||
840 | 53 | class StubFDBuffer : public mtd::StubBuffer | 65 | class StubFDBuffer : public mtd::StubBuffer |
841 | 54 | { | 66 | { |
842 | 55 | public: | 67 | public: |
843 | @@ -203,7 +215,7 @@ | |||
844 | 203 | 215 | ||
845 | 204 | std::shared_ptr<mg::PlatformIPCPackage> connection_ipc_package() override | 216 | std::shared_ptr<mg::PlatformIPCPackage> connection_ipc_package() override |
846 | 205 | { | 217 | { |
848 | 206 | auto package = std::make_shared<mg::PlatformIPCPackage>(); | 218 | auto package = std::make_shared<mg::PlatformIPCPackage>(&module_properties); |
849 | 207 | mtf::pack_stub_ipc_package(*package); | 219 | mtf::pack_stub_ipc_package(*package); |
850 | 208 | return package; | 220 | return package; |
851 | 209 | } | 221 | } |
FAILED: Continuous integration, rev:3236 jenkins. qa.ubuntu. com/job/ mir-ci/ 5951/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/5452/ console jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/4359/ console jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/5408/ console jenkins. qa.ubuntu. com/job/ mir-xenial- amd64-ci/ 275/console jenkins. qa.ubuntu. com/job/ mir-xenial- i386-ci/ 275/console jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 5405/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/5951/ rebuild
http://