Merge lp:~alan-griffiths/mir/mir-on-mir-platform into lp:mir
- mir-on-mir-platform
- Merge into development-branch
Status: | Work in progress |
---|---|
Proposed branch: | lp:~alan-griffiths/mir/mir-on-mir-platform |
Merge into: | lp:mir |
Diff against target: |
1306 lines (+318/-225) 49 files modified
debian/control (+15/-0) debian/mir-platform-graphics-mir13.install (+1/-0) include/platform/mir/graphics/cursor.h (+0/-1) 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) include/test/mir/test/doubles/stub_cursor.h (+0/-1) 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 (+7/-0) src/platforms/CMakeLists.txt (+1/-0) src/platforms/eglstream-kms/server/platform_symbols.cpp (+2/-1) src/platforms/mesa/server/kms/cursor.cpp (+0/-11) src/platforms/mesa/server/kms/cursor.h (+0/-1) src/platforms/mesa/server/kms/platform_symbols.cpp (+2/-1) src/platforms/mesa/server/x11/graphics/graphics.cpp (+2/-1) src/platforms/mir/CMakeLists.txt (+41/-0) src/platforms/mir/cursor.cpp (+2/-8) src/platforms/mir/cursor.h (+2/-4) src/platforms/mir/display.cpp (+2/-2) src/platforms/mir/platform.cpp (+134/-0) src/platforms/mir/symbols.map.in (+20/-0) src/server/CMakeLists.txt (+0/-1) src/server/graphics/CMakeLists.txt (+0/-3) src/server/graphics/default_configuration.cpp (+9/-74) src/server/graphics/software_cursor.cpp (+0/-12) src/server/graphics/software_cursor.h (+0/-1) src/server/input/default_configuration.cpp (+0/-12) src/server/symbols.map (+0/-1) tests/acceptance-tests/test_nested_mir.cpp (+6/-13) 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/graphics/test_software_cursor.cpp (+0/-19) tests/unit-tests/input/CMakeLists.txt (+0/-1) tests/unit-tests/platforms/mesa/kms/test_cursor.cpp (+1/-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_host_buffer.cpp (+1/-1) tests/unit-tests/platforms/nested/test_ipc_operations.cpp (+2/-2) tests/unit-tests/platforms/nested/test_nested_cursor.cpp (+6/-6) 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:~alan-griffiths/mir/mir-on-mir-platform |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Needs Fixing | ||
Mir CI Bot | continuous-integration | Needs Fixing | |
Review via email: mp+325931@code.launchpad.net |
Commit message
Mir-on-Mir as a platform
Description of the change
Alan Griffiths (alan-griffiths) wrote : | # |
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:4199
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Alan Griffiths (alan-griffiths) wrote : | # |
Yep, that's the sort of thing I saw too:
16:24:57 11: [ RUN ] NestedInput.
16:24:57 11: [2017-06-19 16:24:56.684528] mirserver: Starting
16:24:57 11: [2017-06-19 16:24:56.687228] mirserver: Selected driver: mir:stub-graphics (version 0.27.0)
16:24:57 11: [2017-06-19 16:24:56.874292] mirserver: Using software cursor
16:24:57 11: [2017-06-19 16:24:56.904316] mirserver: Selected input driver: mir:stub-input (version: 0.27.0)
16:24:57 11: [2017-06-19 16:24:56.929421] mirserver: Mir version 0.27.0
16:24:57 11: [2017-06-19 16:24:57.085794] mirserver: Initial display configuration:
16:24:57 11: [2017-06-19 16:24:57.086460] mirserver: CMakeFiles CTestTestfile.cmake Makefile cmake_install.cmake mir_acceptance_
16:24:57 11: [2017-06-19 16:24:57.086656] mirserver: . |_ Physical size 0.0" 0x0mm
16:24:57 11: [2017-06-19 16:24:57.086807] mirserver: . |_ Power is on
16:24:57 11: [2017-06-19 16:24:57.086988] mirserver: . |_ Current mode 1920x1080 60.00Hz
16:24:57 11: [2017-06-19 16:24:57.087161] mirserver: . |_ Preferred mode 1920x1080 60.00Hz
16:24:57 11: [2017-06-19 16:24:57.087305] mirserver: . |_ Orientation normal
16:24:57 11: [2017-06-19 16:24:57.087465] mirserver: . |_ Logical size 1920x1080
16:24:57 11: [2017-06-19 16:24:57.087617] mirserver: . |_ Logical position +0+0
16:24:57 11: [2017-06-19 16:24:57.087773] mirserver: . |_ Scaling factor: 1.00
16:24:58 11: [2017-06-19 16:24:57.192869] mirserver: Starting
16:24:58 11: [2017-06-19 16:24:57.196132] mirserver: Selected driver: mir:mir (version 0.27.0)
16:24:59 11: [2017-06-19 16:24:58.279249] mirserver: Using hardware cursor
16:24:59 11: [2017-06-19 16:24:58.512087] mirserver: Selected input driver: mir:mir-input (version: 0.27.0)
16:24:59 11: [2017-06-19 16:24:58.579084] mirserver: Mir version 0.27.0
16:24:59 11: [2017-06-19 16:24:58.859170] mirserver: Initial display configuration:
16:24:59 11: [2017-06-19 16:24:58.860082] mirserver: CMakeFiles CTestTestfile.cmake Makefile cmake_install.cmake mir_acceptance_
16:24:59 11: [2017-06-19 16:24:58.860288] mirserver: . |_ Physical size 0.0" 0x0mm
16:24:59 11: [2017-06-19 16:24:58.860449] mirserver: . |_ Power is on
16:24:59 11: [2017-06-19 16:24:58.860644] mirserver: . |_ Current mode 1920x1080 60.00Hz
16:24:59 11: [2017-06-19 16:24:58.860829] mirserver: . |_ Preferred mode 1920x1080 60.00Hz
16:24:59 11: [2017-06-19 16:24:58.860989] mirserver: . |_ Orientation normal
16:24:59 11: [2017-06-19 16:24:58.861159] mirserver: . |_ Logical size 1920x1080
16:24:59 11: [2017-06-19 16:24:58.861321] mirserver: . |_ Logical position +0+0
16:24:59 11: [2017-06-19 16:24:58.861488] mirserver: . |_ Scaling factor: 1.00
16:24:59 11: [2017-06-19 16:24:58.917833] mirserver: Stopping
18:54:59 debian/rules:20: recipe for target 'override_
18:54:59 Makefile:130: recipe for target 'test' failed
18:54:59 make[1]: *** [override_
18...
Unmerged revisions
- 4199. By Alan Griffiths
-
Fix some tests of mir-on-mir cursor
- 4198. By Alan Griffiths
-
Ensure nested tests use nested platform
- 4197. By Alan Griffiths
-
Better naming for Mir-on-Mir
- 4196. By Alan Griffiths
-
merge & fixup ~kdub/mir/
real-nested- platform
Preview Diff
1 | === modified file 'debian/control' | |||
2 | --- debian/control 2017-05-25 08:58:03 +0000 | |||
3 | +++ debian/control 2017-06-19 15:01:38 +0000 | |||
4 | @@ -347,6 +347,20 @@ | |||
5 | 347 | Contains the shared libraries required for the Mir server to interact with | 347 | Contains the shared libraries required for the Mir server to interact with |
6 | 348 | the hardware platform using the Mesa drivers. | 348 | the hardware platform using the Mesa drivers. |
7 | 349 | 349 | ||
8 | 350 | Package: mir-platform-graphics-mir13 | ||
9 | 351 | Section: libs | ||
10 | 352 | Architecture: linux-any | ||
11 | 353 | Multi-Arch: same | ||
12 | 354 | Pre-Depends: ${misc:Pre-Depends} | ||
13 | 355 | Depends: ${misc:Depends}, | ||
14 | 356 | ${shlibs:Depends}, | ||
15 | 357 | Description: Display server for Ubuntu - platform library for Nested servers | ||
16 | 358 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
17 | 359 | robust operation and a well-defined driver model. | ||
18 | 360 | . | ||
19 | 361 | Contains the shared libraries required for the Mir server to connect to | ||
20 | 362 | another Mir server. | ||
21 | 363 | |||
22 | 350 | Package: mir-platform-input-evdev7 | 364 | Package: mir-platform-input-evdev7 |
23 | 351 | Section: libs | 365 | Section: libs |
24 | 352 | Architecture: linux-any | 366 | Architecture: linux-any |
25 | @@ -399,6 +413,7 @@ | |||
26 | 399 | mir-platform-graphics-mesa-x13, | 413 | mir-platform-graphics-mesa-x13, |
27 | 400 | mir-client-platform-mesa5, | 414 | mir-client-platform-mesa5, |
28 | 401 | mir-platform-input-evdev7, | 415 | mir-platform-input-evdev7, |
29 | 416 | mir-platform-graphics-mir13, | ||
30 | 402 | Description: Display server for Ubuntu - desktop driver metapackage | 417 | Description: Display server for Ubuntu - desktop driver metapackage |
31 | 403 | Mir is a display server running on linux systems, with a focus on efficiency, | 418 | Mir is a display server running on linux systems, with a focus on efficiency, |
32 | 404 | robust operation and a well-defined driver model. | 419 | robust operation and a well-defined driver model. |
33 | 405 | 420 | ||
34 | === added file 'debian/mir-platform-graphics-mir13.install' | |||
35 | --- debian/mir-platform-graphics-mir13.install 1970-01-01 00:00:00 +0000 | |||
36 | +++ debian/mir-platform-graphics-mir13.install 2017-06-19 15:01:38 +0000 | |||
37 | @@ -0,0 +1,1 @@ | |||
38 | 1 | usr/lib/*/mir/server-platform/server-mir.so.13 | ||
39 | 0 | 2 | ||
40 | === modified file 'include/platform/mir/graphics/cursor.h' | |||
41 | --- include/platform/mir/graphics/cursor.h 2015-04-28 07:54:10 +0000 | |||
42 | +++ include/platform/mir/graphics/cursor.h 2017-06-19 15:01:38 +0000 | |||
43 | @@ -33,7 +33,6 @@ | |||
44 | 33 | class Cursor | 33 | class Cursor |
45 | 34 | { | 34 | { |
46 | 35 | public: | 35 | public: |
47 | 36 | virtual void show() = 0; | ||
48 | 37 | virtual void show(CursorImage const& cursor_image) = 0; | 36 | virtual void show(CursorImage const& cursor_image) = 0; |
49 | 38 | virtual void hide() = 0; | 37 | virtual void hide() = 0; |
50 | 39 | 38 | ||
51 | 40 | 39 | ||
52 | === renamed file 'src/include/server/mir/graphics/gl_extensions_base.h' => 'include/platform/mir/graphics/gl_extensions_base.h' | |||
53 | --- src/include/server/mir/graphics/gl_extensions_base.h 2015-02-22 07:46:25 +0000 | |||
54 | +++ include/platform/mir/graphics/gl_extensions_base.h 2017-06-19 15:01:38 +0000 | |||
55 | @@ -2,15 +2,15 @@ | |||
56 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013 Canonical Ltd. |
57 | 3 | * | 3 | * |
58 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
60 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU Lesser General Public License version 3, |
61 | 6 | * as published by the Free Software Foundation. | 6 | * as published by the Free Software Foundation. |
62 | 7 | * | 7 | * |
63 | 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
64 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
65 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
67 | 11 | * GNU General Public License for more details. | 11 | * GNU Lesser General Public License for more details. |
68 | 12 | * | 12 | * |
70 | 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU Lesser General Public License |
71 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
72 | 15 | * | 15 | * |
73 | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
74 | 17 | 17 | ||
75 | === modified file 'include/platform/mir/graphics/platform.h' | |||
76 | --- include/platform/mir/graphics/platform.h 2017-06-09 11:19:23 +0000 | |||
77 | +++ include/platform/mir/graphics/platform.h 2017-06-19 15:01:38 +0000 | |||
78 | @@ -29,6 +29,7 @@ | |||
79 | 29 | namespace mir | 29 | namespace mir |
80 | 30 | { | 30 | { |
81 | 31 | class EmergencyCleanupRegistry; | 31 | class EmergencyCleanupRegistry; |
82 | 32 | namespace shell { class HostLifecycleEventListener; } | ||
83 | 32 | 33 | ||
84 | 33 | namespace logging { class Logger; } | 34 | namespace logging { class Logger; } |
85 | 34 | 35 | ||
86 | @@ -149,22 +150,20 @@ | |||
87 | 149 | /** | 150 | /** |
88 | 150 | * A measure of how well a platform supports a device | 151 | * A measure of how well a platform supports a device |
89 | 151 | * | 152 | * |
92 | 152 | * \note This is compared as an integer; best + 1 is a valid PlatformPriority that | 153 | * \note This is compared as an integer; request + 1 is a valid PlatformPriority that |
93 | 153 | * will be used in preference to a module that reports best. | 154 | * will be used in preference to a module that reports request. |
94 | 154 | * Platform modules distributed with Mir will never use a priority higher | 155 | * Platform modules distributed with Mir will never use a priority higher |
96 | 155 | * than best. | 156 | * than request. |
97 | 156 | */ | 157 | */ |
98 | 157 | enum PlatformPriority : uint32_t | 158 | enum PlatformPriority : uint32_t |
99 | 158 | { | 159 | { |
100 | 159 | unsupported = 0, /**< Unable to function at all on this device */ | 160 | unsupported = 0, /**< Unable to function at all on this device */ |
103 | 160 | dummy = 1, /**< Used only for dummy or stub platforms. | 161 | dummy = 1, /**< Used only for dummy or stub platforms. */ |
102 | 161 | */ | ||
104 | 162 | supported = 128, /**< Capable of providing a functioning Platform on this device, | 162 | supported = 128, /**< Capable of providing a functioning Platform on this device, |
110 | 163 | * possibly with degraded performance or features. | 163 | * possibly with degraded performance or features. */ |
111 | 164 | */ | 164 | best = 192, /**< Capable of providing a Platform with the best features and |
112 | 165 | best = 256 /**< Capable of providing a Platform with the best features and | 165 | * performance this device is capable of.*/ |
113 | 166 | * performance this device is capable of. | 166 | requested = 256 /**< Provides a Platform that satisfies a user request. */ |
109 | 167 | */ | ||
114 | 168 | }; | 167 | }; |
115 | 169 | 168 | ||
116 | 170 | //The host/guest platform concept is soon to be removed. Use CreateRenderingPlatform and | 169 | //The host/guest platform concept is soon to be removed. Use CreateRenderingPlatform and |
117 | @@ -173,7 +172,8 @@ | |||
118 | 173 | std::shared_ptr<mir::options::Option> const& options, | 172 | std::shared_ptr<mir::options::Option> const& options, |
119 | 174 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, | 173 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, |
120 | 175 | std::shared_ptr<mir::graphics::DisplayReport> const& report, | 174 | std::shared_ptr<mir::graphics::DisplayReport> const& report, |
122 | 176 | std::shared_ptr<mir::logging::Logger> const& logger); | 175 | std::shared_ptr<mir::logging::Logger> const& logger, |
123 | 176 | std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener); | ||
124 | 177 | 177 | ||
125 | 178 | typedef void(*AddPlatformOptions)( | 178 | typedef void(*AddPlatformOptions)( |
126 | 179 | boost::program_options::options_description& config); | 179 | boost::program_options::options_description& config); |
127 | @@ -210,6 +210,7 @@ | |||
128 | 210 | * \param [in] options options to use for this platform | 210 | * \param [in] options options to use for this platform |
129 | 211 | * \param [in] emergency_cleanup_registry object to register emergency shutdown handlers with | 211 | * \param [in] emergency_cleanup_registry object to register emergency shutdown handlers with |
130 | 212 | * \param [in] report the object to use to report interesting events from the display subsystem | 212 | * \param [in] report the object to use to report interesting events from the display subsystem |
131 | 213 | * \param [in] host_lifecycle_event_listener the object to use to listen to events from a host server | ||
132 | 213 | * | 214 | * |
133 | 214 | * This factory function needs to be implemented by each platform. | 215 | * This factory function needs to be implemented by each platform. |
134 | 215 | * | 216 | * |
135 | @@ -219,7 +220,8 @@ | |||
136 | 219 | std::shared_ptr<mir::options::Option> const& options, | 220 | std::shared_ptr<mir::options::Option> const& options, |
137 | 220 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, | 221 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, |
138 | 221 | std::shared_ptr<mir::graphics::DisplayReport> const& report, | 222 | std::shared_ptr<mir::graphics::DisplayReport> const& report, |
140 | 222 | std::shared_ptr<mir::logging::Logger> const& logger); | 223 | std::shared_ptr<mir::logging::Logger> const& logger, |
141 | 224 | std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener); | ||
142 | 223 | 225 | ||
143 | 224 | /** | 226 | /** |
144 | 225 | * Function prototype used to add platform specific options to the platform-independent server options. | 227 | * Function prototype used to add platform specific options to the platform-independent server options. |
145 | 226 | 228 | ||
146 | === renamed file 'src/include/server/mir/graphics/surfaceless_egl_context.h' => 'include/platform/mir/graphics/surfaceless_egl_context.h' | |||
147 | --- src/include/server/mir/graphics/surfaceless_egl_context.h 2016-07-28 09:10:43 +0000 | |||
148 | +++ include/platform/mir/graphics/surfaceless_egl_context.h 2017-06-19 15:01:38 +0000 | |||
149 | @@ -2,15 +2,15 @@ | |||
150 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013 Canonical Ltd. |
151 | 3 | * | 3 | * |
152 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
154 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU Lesser General Public License version 3, |
155 | 6 | * as published by the Free Software Foundation. | 6 | * as published by the Free Software Foundation. |
156 | 7 | * | 7 | * |
157 | 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
158 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
159 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
161 | 11 | * GNU General Public License for more details. | 11 | * GNU Lesser General Public License for more details. |
162 | 12 | * | 12 | * |
164 | 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU Lesser General Public License |
165 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
166 | 15 | * | 15 | * |
167 | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
168 | 17 | 17 | ||
169 | === modified file 'include/test/mir/test/doubles/stub_cursor.h' | |||
170 | --- include/test/mir/test/doubles/stub_cursor.h 2016-01-29 08:18:22 +0000 | |||
171 | +++ include/test/mir/test/doubles/stub_cursor.h 2017-06-19 15:01:38 +0000 | |||
172 | @@ -30,7 +30,6 @@ | |||
173 | 30 | 30 | ||
174 | 31 | struct StubCursor : public graphics::Cursor | 31 | struct StubCursor : public graphics::Cursor |
175 | 32 | { | 32 | { |
176 | 33 | void show() override {} | ||
177 | 34 | void show(graphics::CursorImage const&) override {} | 33 | void show(graphics::CursorImage const&) override {} |
178 | 35 | void hide() override {} | 34 | void hide() override {} |
179 | 36 | void move_to(geometry::Point) override {} | 35 | void move_to(geometry::Point) override {} |
180 | 37 | 36 | ||
181 | === modified file 'src/include/server/mir/default_server_configuration.h' | |||
182 | --- src/include/server/mir/default_server_configuration.h 2017-05-08 03:04:26 +0000 | |||
183 | +++ src/include/server/mir/default_server_configuration.h 2017-06-19 15:01:38 +0000 | |||
184 | @@ -208,7 +208,6 @@ | |||
185 | 208 | virtual std::shared_ptr<renderer::RendererFactory> the_renderer_factory(); | 208 | virtual std::shared_ptr<renderer::RendererFactory> the_renderer_factory(); |
186 | 209 | virtual std::shared_ptr<shell::DisplayConfigurationController> the_display_configuration_controller(); | 209 | virtual std::shared_ptr<shell::DisplayConfigurationController> the_display_configuration_controller(); |
187 | 210 | virtual std::shared_ptr<graphics::DisplayConfigurationPolicy> the_display_configuration_policy(); | 210 | virtual std::shared_ptr<graphics::DisplayConfigurationPolicy> the_display_configuration_policy(); |
188 | 211 | virtual std::shared_ptr<graphics::nested::HostConnection> the_host_connection(); | ||
189 | 212 | virtual std::shared_ptr<graphics::GLConfig> the_gl_config(); | 211 | virtual std::shared_ptr<graphics::GLConfig> the_gl_config(); |
190 | 213 | /** @} */ | 212 | /** @} */ |
191 | 214 | 213 | ||
192 | 215 | 214 | ||
193 | === modified file 'src/platform/graphics/CMakeLists.txt' | |||
194 | --- src/platform/graphics/CMakeLists.txt 2017-05-08 03:04:26 +0000 | |||
195 | +++ src/platform/graphics/CMakeLists.txt 2017-06-19 15:01:38 +0000 | |||
196 | @@ -1,4 +1,6 @@ | |||
198 | 1 | include_directories(${GL_INCLUDE_DIRS}) | 1 | include_directories( |
199 | 2 | ${GL_INCLUDE_DIRS} | ||
200 | 3 | ${PROJECT_SOURCE_DIR}/include/renderers/gl) | ||
201 | 2 | 4 | ||
202 | 3 | set( | 5 | set( |
203 | 4 | GRAPHICS_SOURCES | 6 | GRAPHICS_SOURCES |
204 | @@ -6,6 +8,8 @@ | |||
205 | 6 | egl_extensions.cpp | 8 | egl_extensions.cpp |
206 | 7 | egl_resources.cpp | 9 | egl_resources.cpp |
207 | 8 | egl_error.cpp | 10 | egl_error.cpp |
208 | 11 | surfaceless_egl_context.cpp | ||
209 | 12 | gl_extensions_base.cpp | ||
210 | 9 | display_configuration.cpp | 13 | display_configuration.cpp |
211 | 10 | gamma_curves.cpp | 14 | gamma_curves.cpp |
212 | 11 | buffer_basic.cpp | 15 | buffer_basic.cpp |
213 | 12 | 16 | ||
214 | === renamed file 'src/server/graphics/gl_extensions_base.cpp' => 'src/platform/graphics/gl_extensions_base.cpp' | |||
215 | --- src/server/graphics/gl_extensions_base.cpp 2013-12-13 05:24:22 +0000 | |||
216 | +++ src/platform/graphics/gl_extensions_base.cpp 2017-06-19 15:01:38 +0000 | |||
217 | @@ -2,15 +2,15 @@ | |||
218 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013 Canonical Ltd. |
219 | 3 | * | 3 | * |
220 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
222 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU Lesser General Public License version 3, |
223 | 6 | * as published by the Free Software Foundation. | 6 | * as published by the Free Software Foundation. |
224 | 7 | * | 7 | * |
225 | 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
226 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
227 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
229 | 11 | * GNU General Public License for more details. | 11 | * GNU Lesser General Public License for more details. |
230 | 12 | * | 12 | * |
232 | 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU Lesser General Public License |
233 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
234 | 15 | * | 15 | * |
235 | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
236 | 17 | 17 | ||
237 | === renamed file 'src/server/graphics/surfaceless_egl_context.cpp' => 'src/platform/graphics/surfaceless_egl_context.cpp' | |||
238 | --- src/server/graphics/surfaceless_egl_context.cpp 2017-05-08 03:04:26 +0000 | |||
239 | +++ src/platform/graphics/surfaceless_egl_context.cpp 2017-06-19 15:01:38 +0000 | |||
240 | @@ -2,15 +2,15 @@ | |||
241 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013 Canonical Ltd. |
242 | 3 | * | 3 | * |
243 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
245 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU Lesser General Public License version 3, |
246 | 6 | * as published by the Free Software Foundation. | 6 | * as published by the Free Software Foundation. |
247 | 7 | * | 7 | * |
248 | 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
249 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
250 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
252 | 11 | * GNU General Public License for more details. | 11 | * GNU Lesser General Public License for more details. |
253 | 12 | * | 12 | * |
255 | 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU Lesser General Public License |
256 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
257 | 15 | * | 15 | * |
258 | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
259 | 17 | 17 | ||
260 | === modified file 'src/platform/symbols.map' | |||
261 | --- src/platform/symbols.map 2017-05-25 08:58:03 +0000 | |||
262 | +++ src/platform/symbols.map 2017-06-19 15:01:38 +0000 | |||
263 | @@ -21,9 +21,16 @@ | |||
264 | 21 | mir::graphics::EventHandlerRegister::register_signal_handler*; | 21 | mir::graphics::EventHandlerRegister::register_signal_handler*; |
265 | 22 | mir::graphics::EventHandlerRegister::unregister_fd_handler*; | 22 | mir::graphics::EventHandlerRegister::unregister_fd_handler*; |
266 | 23 | mir::graphics::GammaCurves::GammaCurves*; | 23 | mir::graphics::GammaCurves::GammaCurves*; |
267 | 24 | mir::graphics::GLExtensionsBase::GLExtensionsBase*; | ||
268 | 25 | mir::graphics::GLExtensionsBase::support*; | ||
269 | 24 | mir::graphics::LinearGammaLUTs::LinearGammaLUTs*; | 26 | mir::graphics::LinearGammaLUTs::LinearGammaLUTs*; |
270 | 25 | mir::graphics::module_for_device*; | 27 | mir::graphics::module_for_device*; |
271 | 26 | mir::graphics::operator*; | 28 | mir::graphics::operator*; |
272 | 29 | mir::graphics::SurfacelessEGLContext::SurfacelessEGLContext*; | ||
273 | 30 | mir::graphics::SurfacelessEGLContext::make_current*; | ||
274 | 31 | mir::graphics::SurfacelessEGLContext::operator*; | ||
275 | 32 | mir::graphics::SurfacelessEGLContext::release_current*; | ||
276 | 33 | mir::graphics::SurfacelessEGLContext::?SurfacelessEGLContext*; | ||
277 | 27 | mir::graphics::UserDisplayConfigurationOutput::extents*; | 34 | mir::graphics::UserDisplayConfigurationOutput::extents*; |
278 | 28 | mir::graphics::UserDisplayConfigurationOutput::UserDisplayConfigurationOutput*; | 35 | mir::graphics::UserDisplayConfigurationOutput::UserDisplayConfigurationOutput*; |
279 | 29 | mir::options::arw_server_socket_opt*; | 36 | mir::options::arw_server_socket_opt*; |
280 | 30 | 37 | ||
281 | === modified file 'src/platforms/CMakeLists.txt' | |||
282 | --- src/platforms/CMakeLists.txt 2017-05-17 04:48:46 +0000 | |||
283 | +++ src/platforms/CMakeLists.txt 2017-06-19 15:01:38 +0000 | |||
284 | @@ -72,4 +72,5 @@ | |||
285 | 72 | add_subdirectory(eglstream-kms) | 72 | add_subdirectory(eglstream-kms) |
286 | 73 | endif() | 73 | endif() |
287 | 74 | 74 | ||
288 | 75 | add_subdirectory(mir/) | ||
289 | 75 | add_subdirectory(evdev/) | 76 | add_subdirectory(evdev/) |
290 | 76 | 77 | ||
291 | === modified file 'src/platforms/eglstream-kms/server/platform_symbols.cpp' | |||
292 | --- src/platforms/eglstream-kms/server/platform_symbols.cpp 2017-06-09 11:19:23 +0000 | |||
293 | +++ src/platforms/eglstream-kms/server/platform_symbols.cpp 2017-06-19 15:01:38 +0000 | |||
294 | @@ -74,7 +74,8 @@ | |||
295 | 74 | std::shared_ptr<mo::Option> const&, | 74 | std::shared_ptr<mo::Option> const&, |
296 | 75 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, | 75 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
297 | 76 | std::shared_ptr<mg::DisplayReport> const&, | 76 | std::shared_ptr<mg::DisplayReport> const&, |
299 | 77 | std::shared_ptr<mir::logging::Logger> const&) | 77 | std::shared_ptr<mir::logging::Logger> const&, |
300 | 78 | std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) | ||
301 | 78 | { | 79 | { |
302 | 79 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); | 80 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
303 | 80 | return mir::make_module_ptr<mge::Platform>( | 81 | return mir::make_module_ptr<mge::Platform>( |
304 | 81 | 82 | ||
305 | === modified file 'src/platforms/mesa/server/kms/cursor.cpp' | |||
306 | --- src/platforms/mesa/server/kms/cursor.cpp 2017-06-09 10:22:15 +0000 | |||
307 | +++ src/platforms/mesa/server/kms/cursor.cpp 2017-06-19 15:01:38 +0000 | |||
308 | @@ -216,17 +216,6 @@ | |||
309 | 216 | write_buffer_data_locked(lg, buffer, &padded[0], padded_size); | 216 | write_buffer_data_locked(lg, buffer, &padded[0], padded_size); |
310 | 217 | } | 217 | } |
311 | 218 | 218 | ||
312 | 219 | void mgm::Cursor::show() | ||
313 | 220 | { | ||
314 | 221 | std::lock_guard<std::mutex> lg(guard); | ||
315 | 222 | |||
316 | 223 | if (!visible) | ||
317 | 224 | { | ||
318 | 225 | visible = true; | ||
319 | 226 | place_cursor_at_locked(lg, current_position, ForceState); | ||
320 | 227 | } | ||
321 | 228 | } | ||
322 | 229 | |||
323 | 230 | void mgm::Cursor::show(CursorImage const& cursor_image) | 219 | void mgm::Cursor::show(CursorImage const& cursor_image) |
324 | 231 | { | 220 | { |
325 | 232 | std::lock_guard<std::mutex> lg(guard); | 221 | std::lock_guard<std::mutex> lg(guard); |
326 | 233 | 222 | ||
327 | === modified file 'src/platforms/mesa/server/kms/cursor.h' | |||
328 | --- src/platforms/mesa/server/kms/cursor.h 2017-06-08 08:34:56 +0000 | |||
329 | +++ src/platforms/mesa/server/kms/cursor.h 2017-06-19 15:01:38 +0000 | |||
330 | @@ -74,7 +74,6 @@ | |||
331 | 74 | 74 | ||
332 | 75 | ~Cursor() noexcept; | 75 | ~Cursor() noexcept; |
333 | 76 | 76 | ||
334 | 77 | void show() override; | ||
335 | 78 | void show(CursorImage const& cursor_image) override; | 77 | void show(CursorImage const& cursor_image) override; |
336 | 79 | void hide() override; | 78 | void hide() override; |
337 | 80 | 79 | ||
338 | 81 | 80 | ||
339 | === modified file 'src/platforms/mesa/server/kms/platform_symbols.cpp' | |||
340 | --- src/platforms/mesa/server/kms/platform_symbols.cpp 2017-06-09 15:10:57 +0000 | |||
341 | +++ src/platforms/mesa/server/kms/platform_symbols.cpp 2017-06-19 15:01:38 +0000 | |||
342 | @@ -106,7 +106,8 @@ | |||
343 | 106 | std::shared_ptr<mo::Option> const& options, | 106 | std::shared_ptr<mo::Option> const& options, |
344 | 107 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, | 107 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry, |
345 | 108 | std::shared_ptr<mg::DisplayReport> const& report, | 108 | std::shared_ptr<mg::DisplayReport> const& report, |
347 | 109 | std::shared_ptr<mir::logging::Logger> const& /*logger*/) | 109 | std::shared_ptr<mir::logging::Logger> const& /*logger*/, |
348 | 110 | std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) | ||
349 | 110 | { | 111 | { |
350 | 111 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); | 112 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
351 | 112 | // ensure mesa finds the mesa mir-platform symbols | 113 | // ensure mesa finds the mesa mir-platform symbols |
352 | 113 | 114 | ||
353 | === modified file 'src/platforms/mesa/server/x11/graphics/graphics.cpp' | |||
354 | --- src/platforms/mesa/server/x11/graphics/graphics.cpp 2017-06-09 11:24:39 +0000 | |||
355 | +++ src/platforms/mesa/server/x11/graphics/graphics.cpp 2017-06-19 15:01:38 +0000 | |||
356 | @@ -46,7 +46,8 @@ | |||
357 | 46 | std::shared_ptr<mo::Option> const& options, | 46 | std::shared_ptr<mo::Option> const& options, |
358 | 47 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, | 47 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
359 | 48 | std::shared_ptr<mg::DisplayReport> const& report, | 48 | std::shared_ptr<mg::DisplayReport> const& report, |
361 | 49 | std::shared_ptr<mir::logging::Logger> const& /*logger*/) | 49 | std::shared_ptr<mir::logging::Logger> const& /*logger*/, |
362 | 50 | std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) | ||
363 | 50 | { | 51 | { |
364 | 51 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); | 52 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
365 | 52 | if (!x11_resources.get_conn()) | 53 | if (!x11_resources.get_conn()) |
366 | 53 | 54 | ||
367 | === renamed directory 'src/server/graphics/nested' => 'src/platforms/mir' | |||
368 | === modified file 'src/platforms/mir/CMakeLists.txt' | |||
369 | --- src/server/graphics/nested/CMakeLists.txt 2017-05-08 03:04:26 +0000 | |||
370 | +++ src/platforms/mir/CMakeLists.txt 2017-06-19 15:01:38 +0000 | |||
371 | @@ -1,7 +1,16 @@ | |||
372 | 1 | add_definitions(-DMIR_SERVER_GRAPHICS_PLATFORM_VERSION="${MIR_SERVER_GRAPHICS_PLATFORM_VERSION}") | ||
373 | 2 | |||
374 | 1 | include_directories( | 3 | include_directories( |
375 | 4 | ${PROJECT_SOURCE_DIR}/include/client | ||
376 | 5 | ${PROJECT_SOURCE_DIR}/include/platform | ||
377 | 2 | ${PROJECT_SOURCE_DIR}/include/renderers/gl | 6 | ${PROJECT_SOURCE_DIR}/include/renderers/gl |
378 | 3 | ${PROJECT_SOURCE_DIR}/include/platforms/mesa | 7 | ${PROJECT_SOURCE_DIR}/include/platforms/mesa |
379 | 4 | ${PROJECT_SOURCE_DIR}/include/platforms/common | 8 | ${PROJECT_SOURCE_DIR}/include/platforms/common |
380 | 9 | ${PROJECT_SOURCE_DIR}/src/include/common # TODO platforms should not depend on private headers | ||
381 | 10 | ${PROJECT_SOURCE_DIR}/src/include/platform # TODO platforms should not depend on private headers | ||
382 | 11 | ${PROJECT_SOURCE_DIR}/src/include/client # TODO platforms should not depend on private headers | ||
383 | 12 | ${PROJECT_SOURCE_DIR}/include/server # TODO platforms should not depend on server | ||
384 | 13 | ${PROJECT_SOURCE_DIR}/src/include/server # TODO platforms should not depend on private headers | ||
385 | 5 | ) | 14 | ) |
386 | 6 | 15 | ||
387 | 7 | add_library( | 16 | add_library( |
388 | @@ -18,3 +27,35 @@ | |||
389 | 18 | ipc_operations.cpp | 27 | ipc_operations.cpp |
390 | 19 | host_buffer.cpp | 28 | host_buffer.cpp |
391 | 20 | ) | 29 | ) |
392 | 30 | |||
393 | 31 | add_library(mirplatformgraphicsnested SHARED | ||
394 | 32 | $<TARGET_OBJECTS:mirnestedgraphics> | ||
395 | 33 | $<TARGET_OBJECTS:mirgl> | ||
396 | 34 | ) | ||
397 | 35 | |||
398 | 36 | target_link_libraries( | ||
399 | 37 | mirplatformgraphicsnested | ||
400 | 38 | |||
401 | 39 | server_platform_common | ||
402 | 40 | mirplatform | ||
403 | 41 | mirclient | ||
404 | 42 | ${EGL_LDFLAGS} ${EGL_LIBRARIES} | ||
405 | 43 | ${GLESv2_LDFLAGS} ${GLESv2_LIBRARIES} | ||
406 | 44 | ${Boost_PROGRAM_OPTIONS_LIBRARY} | ||
407 | 45 | ) | ||
408 | 46 | |||
409 | 47 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/symbols.map.in | ||
410 | 48 | ${CMAKE_CURRENT_BINARY_DIR}/symbols.map) | ||
411 | 49 | set(symbol_map ${CMAKE_CURRENT_BINARY_DIR}/symbols.map) | ||
412 | 50 | |||
413 | 51 | set_target_properties( | ||
414 | 52 | mirplatformgraphicsnested PROPERTIES | ||
415 | 53 | OUTPUT_NAME server-mir | ||
416 | 54 | LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/server-modules | ||
417 | 55 | PREFIX "" | ||
418 | 56 | SUFFIX ".so.${MIR_SERVER_GRAPHICS_PLATFORM_ABI}" | ||
419 | 57 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}" | ||
420 | 58 | LINK_DEPENDS ${symbol_map} | ||
421 | 59 | ) | ||
422 | 60 | |||
423 | 61 | install(TARGETS mirplatformgraphicsnested LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH}) | ||
424 | 21 | 62 | ||
425 | === modified file 'src/platforms/mir/cursor.cpp' | |||
426 | --- src/server/graphics/nested/cursor.cpp 2017-05-08 03:04:26 +0000 | |||
427 | +++ src/platforms/mir/cursor.cpp 2017-06-19 15:01:38 +0000 | |||
428 | @@ -24,9 +24,8 @@ | |||
429 | 24 | namespace mgn = mir::graphics::nested; | 24 | namespace mgn = mir::graphics::nested; |
430 | 25 | namespace geom = mir::geometry; | 25 | namespace geom = mir::geometry; |
431 | 26 | 26 | ||
435 | 27 | mgn::Cursor::Cursor(std::shared_ptr<HostConnection> const& host_connection, std::shared_ptr<mg::CursorImage> const& default_image) | 27 | mgn::Cursor::Cursor(std::shared_ptr<HostConnection> const& host_connection) |
436 | 28 | : connection(host_connection), | 28 | : connection(host_connection) |
434 | 29 | default_image(default_image) | ||
437 | 30 | { | 29 | { |
438 | 31 | } | 30 | } |
439 | 32 | 31 | ||
440 | @@ -43,11 +42,6 @@ | |||
441 | 43 | connection->set_cursor_image(cursor_image); | 42 | connection->set_cursor_image(cursor_image); |
442 | 44 | } | 43 | } |
443 | 45 | 44 | ||
444 | 46 | void mgn::Cursor::show() | ||
445 | 47 | { | ||
446 | 48 | connection->set_cursor_image(*default_image); | ||
447 | 49 | } | ||
448 | 50 | |||
449 | 51 | void mgn::Cursor::hide() | 45 | void mgn::Cursor::hide() |
450 | 52 | { | 46 | { |
451 | 53 | connection->hide_cursor(); | 47 | connection->hide_cursor(); |
452 | 54 | 48 | ||
453 | === modified file 'src/platforms/mir/cursor.h' | |||
454 | --- src/server/graphics/nested/cursor.h 2016-01-29 08:18:22 +0000 | |||
455 | +++ src/platforms/mir/cursor.h 2017-06-19 15:01:38 +0000 | |||
456 | @@ -31,18 +31,16 @@ | |||
457 | 31 | class Cursor : public graphics::Cursor | 31 | class Cursor : public graphics::Cursor |
458 | 32 | { | 32 | { |
459 | 33 | public: | 33 | public: |
461 | 34 | Cursor(std::shared_ptr<HostConnection> const& host_connection, std::shared_ptr<CursorImage> const& default_image); | 34 | Cursor(std::shared_ptr<HostConnection> const& host_connection); |
462 | 35 | ~Cursor(); | 35 | ~Cursor(); |
463 | 36 | 36 | ||
464 | 37 | void show(CursorImage const& image) override; | 37 | void show(CursorImage const& image) override; |
467 | 38 | void show() override; | 38 | |
466 | 39 | |||
468 | 40 | void hide() override; | 39 | void hide() override; |
469 | 41 | 40 | ||
470 | 42 | void move_to(geometry::Point position) override; | 41 | void move_to(geometry::Point position) override; |
471 | 43 | private: | 42 | private: |
472 | 44 | std::shared_ptr<HostConnection> const connection; | 43 | std::shared_ptr<HostConnection> const connection; |
473 | 45 | std::shared_ptr<CursorImage> const default_image; | ||
474 | 46 | }; | 44 | }; |
475 | 47 | } | 45 | } |
476 | 48 | } | 46 | } |
477 | 49 | 47 | ||
478 | === modified file 'src/platforms/mir/display.cpp' | |||
479 | --- src/server/graphics/nested/display.cpp 2017-05-31 17:56:19 +0000 | |||
480 | +++ src/platforms/mir/display.cpp 2017-06-19 15:01:38 +0000 | |||
481 | @@ -17,6 +17,7 @@ | |||
482 | 17 | */ | 17 | */ |
483 | 18 | 18 | ||
484 | 19 | #include "display.h" | 19 | #include "display.h" |
485 | 20 | #include "cursor.h" | ||
486 | 20 | #include "nested_display_configuration.h" | 21 | #include "nested_display_configuration.h" |
487 | 21 | #include "display_buffer.h" | 22 | #include "display_buffer.h" |
488 | 22 | #include "host_connection.h" | 23 | #include "host_connection.h" |
489 | @@ -365,8 +366,7 @@ | |||
490 | 365 | 366 | ||
491 | 366 | auto mgn::Display::create_hardware_cursor() -> std::shared_ptr<mg::Cursor> | 367 | auto mgn::Display::create_hardware_cursor() -> std::shared_ptr<mg::Cursor> |
492 | 367 | { | 368 | { |
495 | 368 | BOOST_THROW_EXCEPTION(std::logic_error("Initialization loop: we already need the Cursor when creating the Display")); | 369 | return std::make_shared<Cursor>(connection); |
494 | 369 | // So we can't do this: return std::make_shared<Cursor>(connection); | ||
496 | 370 | } | 370 | } |
497 | 371 | 371 | ||
498 | 372 | std::unique_ptr<mg::VirtualOutput> mgn::Display::create_virtual_output(int /*width*/, int /*height*/) | 372 | std::unique_ptr<mg::VirtualOutput> mgn::Display::create_virtual_output(int /*width*/, int /*height*/) |
499 | 373 | 373 | ||
500 | === modified file 'src/platforms/mir/platform.cpp' | |||
501 | --- src/server/graphics/nested/platform.cpp 2017-06-09 14:16:54 +0000 | |||
502 | +++ src/platforms/mir/platform.cpp 2017-06-19 15:01:38 +0000 | |||
503 | @@ -19,13 +19,24 @@ | |||
504 | 19 | #include "platform.h" | 19 | #include "platform.h" |
505 | 20 | #include "host_connection.h" | 20 | #include "host_connection.h" |
506 | 21 | #include "display.h" | 21 | #include "display.h" |
507 | 22 | #include "mir_client_host_connection.h" | ||
508 | 22 | #include "buffer.h" | 23 | #include "buffer.h" |
509 | 23 | #include "native_buffer.h" | 24 | #include "native_buffer.h" |
510 | 24 | #include "ipc_operations.h" | 25 | #include "ipc_operations.h" |
511 | 25 | #include "mir/shared_library.h" | 26 | #include "mir/shared_library.h" |
512 | 27 | #include "mir/module_deleter.h" | ||
513 | 28 | #include "mir/options/option.h" | ||
514 | 29 | #include "mir/options/configuration.h" | ||
515 | 30 | #include "mir/options/program_option.h" | ||
516 | 31 | #include "mir/options/default_configuration.h" | ||
517 | 26 | #include "mir/graphics/graphic_buffer_allocator.h" | 32 | #include "mir/graphics/graphic_buffer_allocator.h" |
518 | 27 | #include "mir/graphics/display.h" | 33 | #include "mir/graphics/display.h" |
519 | 28 | #include "mir/graphics/platform_ipc_operations.h" | 34 | #include "mir/graphics/platform_ipc_operations.h" |
520 | 35 | #include "mir/input/platform.h" | ||
521 | 36 | #include "input_platform.h" | ||
522 | 37 | #include "mir/libname.h" | ||
523 | 38 | #include "mir/assert_module_entry_point.h" | ||
524 | 39 | #include "mir/abnormal_exit.h" | ||
525 | 29 | #include "mir/options/option.h" | 40 | #include "mir/options/option.h" |
526 | 30 | #include "mir/options/configuration.h" | 41 | #include "mir/options/configuration.h" |
527 | 31 | #include "mir/graphics/buffer_ipc_message.h" | 42 | #include "mir/graphics/buffer_ipc_message.h" |
528 | @@ -34,6 +45,7 @@ | |||
529 | 34 | #include "mir/graphics/platform_authentication_wrapper.h" | 45 | #include "mir/graphics/platform_authentication_wrapper.h" |
530 | 35 | #include "mir/renderer/gl/egl_platform.h" | 46 | #include "mir/renderer/gl/egl_platform.h" |
531 | 36 | 47 | ||
532 | 48 | namespace mi = mir::input; | ||
533 | 37 | namespace mg = mir::graphics; | 49 | namespace mg = mir::graphics; |
534 | 38 | namespace mgn = mir::graphics::nested; | 50 | namespace mgn = mir::graphics::nested; |
535 | 39 | namespace mo = mir::options; | 51 | namespace mo = mir::options; |
536 | @@ -222,3 +234,125 @@ | |||
537 | 222 | { | 234 | { |
538 | 223 | return display_platform->extensions(); | 235 | return display_platform->extensions(); |
539 | 224 | } | 236 | } |
540 | 237 | |||
541 | 238 | namespace | ||
542 | 239 | { | ||
543 | 240 | std::shared_ptr<mgn::MirClientHostConnection> global_conn = nullptr; | ||
544 | 241 | |||
545 | 242 | mir::ModuleProperties const graphics_description = { | ||
546 | 243 | "mir:mir", | ||
547 | 244 | MIR_VERSION_MAJOR, | ||
548 | 245 | MIR_VERSION_MINOR, | ||
549 | 246 | MIR_VERSION_MICRO, | ||
550 | 247 | mir::libname() | ||
551 | 248 | }; | ||
552 | 249 | |||
553 | 250 | mir::ModuleProperties const input_description = { | ||
554 | 251 | "mir:mir-input", | ||
555 | 252 | MIR_VERSION_MAJOR, | ||
556 | 253 | MIR_VERSION_MINOR, | ||
557 | 254 | MIR_VERSION_MICRO, | ||
558 | 255 | mir::libname() | ||
559 | 256 | }; | ||
560 | 257 | } | ||
561 | 258 | |||
562 | 259 | mir::UniqueModulePtr<mg::Platform> create_host_platform( | ||
563 | 260 | std::shared_ptr<mo::Option> const& options, | ||
564 | 261 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, | ||
565 | 262 | std::shared_ptr<mir::graphics::DisplayReport> const& display_report, | ||
566 | 263 | std::shared_ptr<mir::logging::Logger> const&, | ||
567 | 264 | std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener) | ||
568 | 265 | { | ||
569 | 266 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); | ||
570 | 267 | |||
571 | 268 | if (!options->is_set(mo::host_socket_opt)) | ||
572 | 269 | BOOST_THROW_EXCEPTION(mir::AbnormalExit( | ||
573 | 270 | std::string("Exiting Mir! Reason: Nested Mir needs either $MIR_SOCKET or --") + | ||
574 | 271 | mo::host_socket_opt)); | ||
575 | 272 | |||
576 | 273 | auto host_socket = options->get<std::string>(mo::host_socket_opt); | ||
577 | 274 | |||
578 | 275 | std::string server_socket{"none"}; | ||
579 | 276 | |||
580 | 277 | if (!options->is_set(mir::options::no_server_socket_opt)) | ||
581 | 278 | { | ||
582 | 279 | server_socket = options->get<std::string>(mo::server_socket_opt); | ||
583 | 280 | |||
584 | 281 | if (server_socket == host_socket) | ||
585 | 282 | BOOST_THROW_EXCEPTION(mir::AbnormalExit( | ||
586 | 283 | "Exiting Mir! Reason: Nested Mir and Host Mir cannot use " | ||
587 | 284 | "the same socket file to accept connections!")); | ||
588 | 285 | } | ||
589 | 286 | |||
590 | 287 | auto const my_name = options->is_set(mo::name_opt) ? | ||
591 | 288 | options->get<std::string>(mo::name_opt) : | ||
592 | 289 | "nested-mir@:" + server_socket; | ||
593 | 290 | |||
594 | 291 | auto connection = std::make_shared<mgn::MirClientHostConnection>( | ||
595 | 292 | host_socket, | ||
596 | 293 | my_name, | ||
597 | 294 | host_lifecycle_event_listener); | ||
598 | 295 | |||
599 | 296 | auto const platform_library = std::make_shared<mir::SharedLibrary>(connection->graphics_platform_library()); | ||
600 | 297 | |||
601 | 298 | auto const buffer_platform = std::make_shared<mgn::NestedBufferPlatform>( | ||
602 | 299 | platform_library, connection, display_report, options); | ||
603 | 300 | |||
604 | 301 | global_conn = connection; | ||
605 | 302 | return mir::make_module_ptr<mgn::Platform>( | ||
606 | 303 | buffer_platform, | ||
607 | 304 | std::make_unique<mgn::NestedDisplayPlatform>(buffer_platform, connection, display_report, *options)); | ||
608 | 305 | } | ||
609 | 306 | |||
610 | 307 | void add_graphics_platform_options(boost::program_options::options_description&) | ||
611 | 308 | { | ||
612 | 309 | mir::assert_entry_point_signature<mg::AddPlatformOptions>(&add_graphics_platform_options); | ||
613 | 310 | } | ||
614 | 311 | |||
615 | 312 | mg::PlatformPriority probe_graphics_platform(mo::ProgramOption const& options) | ||
616 | 313 | { | ||
617 | 314 | mir::assert_entry_point_signature<mg::PlatformProbe>(&probe_graphics_platform); | ||
618 | 315 | |||
619 | 316 | bool option_present = false; | ||
620 | 317 | for (auto &s : options.unparsed_command_line()) | ||
621 | 318 | option_present |= (s.find(mo::host_socket_opt) != std::string::npos); | ||
622 | 319 | option_present |= options.is_set(mo::host_socket_opt); | ||
623 | 320 | option_present |= (nullptr != getenv("MIR_SERVER_HOST_SOCKET")); | ||
624 | 321 | |||
625 | 322 | if (option_present) | ||
626 | 323 | return mg::PlatformPriority::requested; | ||
627 | 324 | else | ||
628 | 325 | return mg::PlatformPriority::unsupported; | ||
629 | 326 | } | ||
630 | 327 | |||
631 | 328 | mir::ModuleProperties const* describe_graphics_module() | ||
632 | 329 | { | ||
633 | 330 | mir::assert_entry_point_signature<mg::DescribeModule>(&describe_graphics_module); | ||
634 | 331 | return &graphics_description; | ||
635 | 332 | } | ||
636 | 333 | |||
637 | 334 | mi::PlatformPriority probe_input_platform( | ||
638 | 335 | mo::Option const& options) | ||
639 | 336 | { | ||
640 | 337 | mir::assert_entry_point_signature<mi::ProbePlatform>(&probe_input_platform); | ||
641 | 338 | if (options.is_set("host-socket")) | ||
642 | 339 | return mi::PlatformPriority::best; | ||
643 | 340 | return mi::PlatformPriority::unsupported; | ||
644 | 341 | } | ||
645 | 342 | |||
646 | 343 | mir::UniqueModulePtr<mi::Platform> create_input_platform( | ||
647 | 344 | mo::Option const& /*options*/, | ||
648 | 345 | std::shared_ptr<mir::EmergencyCleanupRegistry> const& /*emergency_cleanup_registry*/, | ||
649 | 346 | std::shared_ptr<mi::InputDeviceRegistry> const& input_device_registry, | ||
650 | 347 | std::shared_ptr<mi::InputReport> const& input_report) | ||
651 | 348 | { | ||
652 | 349 | mir::assert_entry_point_signature<mi::CreatePlatform>(&create_input_platform); | ||
653 | 350 | return mir::make_module_ptr<mgn::InputPlatform>(global_conn, input_device_registry, input_report); | ||
654 | 351 | } | ||
655 | 352 | |||
656 | 353 | mir::ModuleProperties const* describe_input_module() | ||
657 | 354 | { | ||
658 | 355 | mir::assert_entry_point_signature<mi::DescribeModule>(&describe_input_module); | ||
659 | 356 | return &input_description; | ||
660 | 357 | } | ||
661 | 358 | |||
662 | 225 | 359 | ||
663 | === added file 'src/platforms/mir/symbols.map.in' | |||
664 | --- src/platforms/mir/symbols.map.in 1970-01-01 00:00:00 +0000 | |||
665 | +++ src/platforms/mir/symbols.map.in 2017-06-19 15:01:38 +0000 | |||
666 | @@ -0,0 +1,20 @@ | |||
667 | 1 | @MIR_SERVER_GRAPHICS_PLATFORM_VERSION@ { | ||
668 | 2 | global: | ||
669 | 3 | add_graphics_platform_options; | ||
670 | 4 | create_host_platform; | ||
671 | 5 | create_guest_platform; | ||
672 | 6 | probe_graphics_platform; | ||
673 | 7 | describe_graphics_module; | ||
674 | 8 | local: | ||
675 | 9 | *; | ||
676 | 10 | }; | ||
677 | 11 | |||
678 | 12 | @MIR_SERVER_INPUT_PLATFORM_VERSION@ { | ||
679 | 13 | global: | ||
680 | 14 | add_input_platform_options; | ||
681 | 15 | create_input_platform; | ||
682 | 16 | probe_input_platform; | ||
683 | 17 | describe_input_module; | ||
684 | 18 | local: | ||
685 | 19 | *; | ||
686 | 20 | }; | ||
687 | 0 | 21 | ||
688 | === modified file 'src/server/CMakeLists.txt' | |||
689 | --- src/server/CMakeLists.txt 2017-05-08 03:04:26 +0000 | |||
690 | +++ src/server/CMakeLists.txt 2017-06-19 15:01:38 +0000 | |||
691 | @@ -81,7 +81,6 @@ | |||
692 | 81 | $<TARGET_OBJECTS:mirreport> | 81 | $<TARGET_OBJECTS:mirreport> |
693 | 82 | $<TARGET_OBJECTS:mirlogging> | 82 | $<TARGET_OBJECTS:mirlogging> |
694 | 83 | $<TARGET_OBJECTS:mirnullreport> | 83 | $<TARGET_OBJECTS:mirnullreport> |
695 | 84 | $<TARGET_OBJECTS:mirnestedgraphics> | ||
696 | 85 | $<TARGET_OBJECTS:miroffscreengraphics> | 84 | $<TARGET_OBJECTS:miroffscreengraphics> |
697 | 86 | $<TARGET_OBJECTS:mirthread> | 85 | $<TARGET_OBJECTS:mirthread> |
698 | 87 | 86 | ||
699 | 88 | 87 | ||
700 | === modified file 'src/server/graphics/CMakeLists.txt' | |||
701 | --- src/server/graphics/CMakeLists.txt 2017-05-08 03:04:26 +0000 | |||
702 | +++ src/server/graphics/CMakeLists.txt 2017-06-19 15:01:38 +0000 | |||
703 | @@ -8,13 +8,10 @@ | |||
704 | 8 | 8 | ||
705 | 9 | default_configuration.cpp | 9 | default_configuration.cpp |
706 | 10 | default_display_configuration_policy.cpp | 10 | default_display_configuration_policy.cpp |
707 | 11 | gl_extensions_base.cpp | ||
708 | 12 | surfaceless_egl_context.cpp | ||
709 | 13 | software_cursor.cpp | 11 | software_cursor.cpp |
710 | 14 | ${PROJECT_SOURCE_DIR}/include/server/mir/graphics/display_configuration_observer.h | 12 | ${PROJECT_SOURCE_DIR}/include/server/mir/graphics/display_configuration_observer.h |
711 | 15 | display_configuration_observer_multiplexer.cpp | 13 | display_configuration_observer_multiplexer.cpp |
712 | 16 | display_configuration_observer_multiplexer.h | 14 | display_configuration_observer_multiplexer.h |
713 | 17 | ) | 15 | ) |
714 | 18 | 16 | ||
715 | 19 | add_subdirectory(nested/) | ||
716 | 20 | add_subdirectory(offscreen/) | 17 | add_subdirectory(offscreen/) |
717 | 21 | 18 | ||
718 | === modified file 'src/server/graphics/default_configuration.cpp' | |||
719 | --- src/server/graphics/default_configuration.cpp 2017-05-31 17:56:19 +0000 | |||
720 | +++ src/server/graphics/default_configuration.cpp 2017-06-19 15:01:38 +0000 | |||
721 | @@ -22,16 +22,14 @@ | |||
722 | 22 | 22 | ||
723 | 23 | #include "mir/graphics/default_display_configuration_policy.h" | 23 | #include "mir/graphics/default_display_configuration_policy.h" |
724 | 24 | #include "mir/graphics/graphic_buffer_allocator.h" | 24 | #include "mir/graphics/graphic_buffer_allocator.h" |
729 | 25 | #include "nested/mir_client_host_connection.h" | 25 | #include "mir/renderer/gl/egl_platform.h" |
726 | 26 | #include "nested/cursor.h" | ||
727 | 27 | #include "nested/display.h" | ||
728 | 28 | #include "nested/platform.h" | ||
730 | 29 | #include "offscreen/display.h" | 26 | #include "offscreen/display.h" |
731 | 30 | #include "software_cursor.h" | 27 | #include "software_cursor.h" |
732 | 31 | 28 | ||
733 | 32 | #include "mir/graphics/gl_config.h" | 29 | #include "mir/graphics/gl_config.h" |
734 | 33 | #include "mir/graphics/platform.h" | 30 | #include "mir/graphics/platform.h" |
735 | 34 | #include "mir/graphics/cursor.h" | 31 | #include "mir/graphics/cursor.h" |
736 | 32 | #include "mir/graphics/display.h" | ||
737 | 35 | #include "mir/graphics/platform_probe.h" | 33 | #include "mir/graphics/platform_probe.h" |
738 | 36 | #include "display_configuration_observer_multiplexer.h" | 34 | #include "display_configuration_observer_multiplexer.h" |
739 | 37 | 35 | ||
740 | @@ -52,7 +50,6 @@ | |||
741 | 52 | 50 | ||
742 | 53 | namespace mg = mir::graphics; | 51 | namespace mg = mir::graphics; |
743 | 54 | namespace ml = mir::logging; | 52 | namespace ml = mir::logging; |
744 | 55 | namespace mgn = mir::graphics::nested; | ||
745 | 56 | 53 | ||
746 | 57 | std::shared_ptr<mg::DisplayConfigurationPolicy> | 54 | std::shared_ptr<mg::DisplayConfigurationPolicy> |
747 | 58 | mir::DefaultServerConfiguration::the_display_configuration_policy() | 55 | mir::DefaultServerConfiguration::the_display_configuration_policy() |
748 | @@ -81,21 +78,6 @@ | |||
749 | 81 | std::stringstream error_report; | 78 | std::stringstream error_report; |
750 | 82 | try | 79 | try |
751 | 83 | { | 80 | { |
752 | 84 | // if a host socket is set we should use the host graphics module to create a "guest" platform | ||
753 | 85 | if (the_options()->is_set(options::host_socket_opt)) | ||
754 | 86 | { | ||
755 | 87 | auto const host_connection = the_host_connection(); | ||
756 | 88 | |||
757 | 89 | platform_library = std::make_shared<mir::SharedLibrary>(host_connection->graphics_platform_library()); | ||
758 | 90 | auto buffer_platform = std::make_shared<mgn::NestedBufferPlatform>( | ||
759 | 91 | platform_library, host_connection, the_display_report(), the_options()); | ||
760 | 92 | return std::make_shared<mgn::Platform>( | ||
761 | 93 | buffer_platform, | ||
762 | 94 | std::make_unique<mgn::NestedDisplayPlatform>( | ||
763 | 95 | buffer_platform, host_connection, the_display_report(), *the_options())); | ||
764 | 96 | } | ||
765 | 97 | |||
766 | 98 | // fallback to standalone if host socket is unset | ||
767 | 99 | if (the_options()->is_set(options::platform_graphics_lib)) | 81 | if (the_options()->is_set(options::platform_graphics_lib)) |
768 | 100 | { | 82 | { |
769 | 101 | platform_library = std::make_shared<mir::SharedLibrary>(the_options()->get<std::string>(options::platform_graphics_lib)); | 83 | platform_library = std::make_shared<mir::SharedLibrary>(the_options()->get<std::string>(options::platform_graphics_lib)); |
770 | @@ -124,7 +106,12 @@ | |||
771 | 124 | description->minor_version, | 106 | description->minor_version, |
772 | 125 | description->micro_version); | 107 | description->micro_version); |
773 | 126 | 108 | ||
775 | 127 | return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report(), the_logger()); | 109 | return create_host_platform( |
776 | 110 | the_options(), | ||
777 | 111 | the_emergency_cleanup(), | ||
778 | 112 | the_display_report(), | ||
779 | 113 | the_logger(), | ||
780 | 114 | the_host_lifecycle_event_listener()); | ||
781 | 128 | } | 115 | } |
782 | 129 | catch(...) | 116 | catch(...) |
783 | 130 | { | 117 | { |
784 | @@ -186,14 +173,7 @@ | |||
785 | 186 | 173 | ||
786 | 187 | auto cursor_choice = the_options()->get<std::string>(options::cursor_opt); | 174 | auto cursor_choice = the_options()->get<std::string>(options::cursor_opt); |
787 | 188 | 175 | ||
796 | 189 | if (the_options()->is_set(options::host_socket_opt)) | 176 | if (cursor_choice != "software" && |
789 | 190 | { | ||
790 | 191 | mir::log_info("Using nested cursor"); | ||
791 | 192 | primary_cursor = std::make_shared<mgn::Cursor>( | ||
792 | 193 | the_host_connection(), | ||
793 | 194 | the_default_cursor_image()); | ||
794 | 195 | } | ||
795 | 196 | else if (cursor_choice != "software" && | ||
797 | 197 | (primary_cursor = the_display()->create_hardware_cursor())) | 177 | (primary_cursor = the_display()->create_hardware_cursor())) |
798 | 198 | { | 178 | { |
799 | 199 | mir::log_info("Using hardware cursor"); | 179 | mir::log_info("Using hardware cursor"); |
800 | @@ -217,51 +197,6 @@ | |||
801 | 217 | return wrapped; | 197 | return wrapped; |
802 | 218 | } | 198 | } |
803 | 219 | 199 | ||
804 | 220 | auto mir::DefaultServerConfiguration::the_host_connection() | ||
805 | 221 | -> std::shared_ptr<graphics::nested::HostConnection> | ||
806 | 222 | { | ||
807 | 223 | return the_mir_client_host_connection(); | ||
808 | 224 | } | ||
809 | 225 | |||
810 | 226 | auto mir::DefaultServerConfiguration::the_mir_client_host_connection() | ||
811 | 227 | -> std::shared_ptr<graphics::nested::MirClientHostConnection> | ||
812 | 228 | { | ||
813 | 229 | return host_connection( | ||
814 | 230 | [this]() | ||
815 | 231 | { | ||
816 | 232 | auto const options = the_options(); | ||
817 | 233 | |||
818 | 234 | if (!options->is_set(options::host_socket_opt)) | ||
819 | 235 | BOOST_THROW_EXCEPTION(mir::AbnormalExit( | ||
820 | 236 | std::string("Exiting Mir! Reason: Nested Mir needs either $MIR_SOCKET or --") + | ||
821 | 237 | options::host_socket_opt)); | ||
822 | 238 | |||
823 | 239 | auto host_socket = options->get<std::string>(options::host_socket_opt); | ||
824 | 240 | |||
825 | 241 | std::string server_socket{"none"}; | ||
826 | 242 | |||
827 | 243 | if (!the_options()->is_set(options::no_server_socket_opt)) | ||
828 | 244 | { | ||
829 | 245 | server_socket = the_socket_file(); | ||
830 | 246 | |||
831 | 247 | if (server_socket == host_socket) | ||
832 | 248 | BOOST_THROW_EXCEPTION(mir::AbnormalExit( | ||
833 | 249 | "Exiting Mir! Reason: Nested Mir and Host Mir cannot use " | ||
834 | 250 | "the same socket file to accept connections!")); | ||
835 | 251 | } | ||
836 | 252 | |||
837 | 253 | auto const my_name = options->is_set(options::name_opt) ? | ||
838 | 254 | options->get<std::string>(options::name_opt) : | ||
839 | 255 | "nested-mir@:" + server_socket; | ||
840 | 256 | |||
841 | 257 | return std::make_shared<graphics::nested::MirClientHostConnection>( | ||
842 | 258 | host_socket, | ||
843 | 259 | my_name, | ||
844 | 260 | the_host_lifecycle_event_listener() | ||
845 | 261 | ); | ||
846 | 262 | }); | ||
847 | 263 | } | ||
848 | 264 | |||
849 | 265 | std::shared_ptr<mg::GLConfig> | 200 | std::shared_ptr<mg::GLConfig> |
850 | 266 | mir::DefaultServerConfiguration::the_gl_config() | 201 | mir::DefaultServerConfiguration::the_gl_config() |
851 | 267 | { | 202 | { |
852 | 268 | 203 | ||
853 | === modified file 'src/server/graphics/software_cursor.cpp' | |||
854 | --- src/server/graphics/software_cursor.cpp 2017-05-08 03:04:26 +0000 | |||
855 | +++ src/server/graphics/software_cursor.cpp 2017-06-19 15:01:38 +0000 | |||
856 | @@ -129,18 +129,6 @@ | |||
857 | 129 | hide(); | 129 | hide(); |
858 | 130 | } | 130 | } |
859 | 131 | 131 | ||
860 | 132 | void mg::SoftwareCursor::show() | ||
861 | 133 | { | ||
862 | 134 | bool needs_scene_change = false; | ||
863 | 135 | { | ||
864 | 136 | std::lock_guard<std::mutex> lg{guard}; | ||
865 | 137 | if (!visible) | ||
866 | 138 | visible = needs_scene_change = true; | ||
867 | 139 | } | ||
868 | 140 | if (needs_scene_change && renderable) | ||
869 | 141 | scene->add_input_visualization(renderable); | ||
870 | 142 | } | ||
871 | 143 | |||
872 | 144 | void mg::SoftwareCursor::show(CursorImage const& cursor_image) | 132 | void mg::SoftwareCursor::show(CursorImage const& cursor_image) |
873 | 145 | { | 133 | { |
874 | 146 | std::shared_ptr<detail::CursorRenderable> new_renderable; | 134 | std::shared_ptr<detail::CursorRenderable> new_renderable; |
875 | 147 | 135 | ||
876 | === modified file 'src/server/graphics/software_cursor.h' | |||
877 | --- src/server/graphics/software_cursor.h 2015-06-17 05:20:42 +0000 | |||
878 | +++ src/server/graphics/software_cursor.h 2017-06-19 15:01:38 +0000 | |||
879 | @@ -45,7 +45,6 @@ | |||
880 | 45 | std::shared_ptr<input::Scene> const& scene); | 45 | std::shared_ptr<input::Scene> const& scene); |
881 | 46 | ~SoftwareCursor(); | 46 | ~SoftwareCursor(); |
882 | 47 | 47 | ||
883 | 48 | void show() override; | ||
884 | 49 | void show(CursorImage const& cursor_image) override; | 48 | void show(CursorImage const& cursor_image) override; |
885 | 50 | void hide() override; | 49 | void hide() override; |
886 | 51 | void move_to(geometry::Point position) override; | 50 | void move_to(geometry::Point position) override; |
887 | 52 | 51 | ||
888 | === modified file 'src/server/input/default_configuration.cpp' | |||
889 | --- src/server/input/default_configuration.cpp 2017-05-25 08:58:03 +0000 | |||
890 | +++ src/server/input/default_configuration.cpp 2017-06-19 15:01:38 +0000 | |||
891 | @@ -32,7 +32,6 @@ | |||
892 | 32 | #include "surface_input_dispatcher.h" | 32 | #include "surface_input_dispatcher.h" |
893 | 33 | #include "basic_seat.h" | 33 | #include "basic_seat.h" |
894 | 34 | #include "seat_observer_multiplexer.h" | 34 | #include "seat_observer_multiplexer.h" |
895 | 35 | #include "../graphics/nested/input_platform.h" | ||
896 | 36 | 35 | ||
897 | 37 | #include "mir/input/touch_visualizer.h" | 36 | #include "mir/input/touch_visualizer.h" |
898 | 38 | #include "mir/input/input_probe.h" | 37 | #include "mir/input/input_probe.h" |
899 | @@ -56,7 +55,6 @@ | |||
900 | 56 | namespace mr = mir::report; | 55 | namespace mr = mir::report; |
901 | 57 | namespace ms = mir::scene; | 56 | namespace ms = mir::scene; |
902 | 58 | namespace mg = mir::graphics; | 57 | namespace mg = mir::graphics; |
903 | 59 | namespace mgn = mg::nested; | ||
904 | 60 | namespace msh = mir::shell; | 58 | namespace msh = mir::shell; |
905 | 61 | namespace md = mir::dispatch; | 59 | namespace md = mir::dispatch; |
906 | 62 | 60 | ||
907 | @@ -200,16 +198,6 @@ | |||
908 | 200 | { | 198 | { |
909 | 201 | return std::make_shared<mi::NullInputManager>(); | 199 | return std::make_shared<mi::NullInputManager>(); |
910 | 202 | } | 200 | } |
911 | 203 | else if (options->is_set(options::host_socket_opt)) | ||
912 | 204 | { | ||
913 | 205 | auto const device_registry = the_input_device_registry(); | ||
914 | 206 | auto const input_report = the_input_report(); | ||
915 | 207 | |||
916 | 208 | // TODO: move this into a nested graphics platform | ||
917 | 209 | auto platform = std::make_shared<mgn::InputPlatform>(the_host_connection(), device_registry, input_report); | ||
918 | 210 | |||
919 | 211 | return std::make_shared<mi::DefaultInputManager>(the_input_reading_multiplexer(), std::move(platform)); | ||
920 | 212 | } | ||
921 | 213 | else | 201 | else |
922 | 214 | { | 202 | { |
923 | 215 | auto const emergency_cleanup = the_emergency_cleanup(); | 203 | auto const emergency_cleanup = the_emergency_cleanup(); |
924 | 216 | 204 | ||
925 | === modified file 'src/server/symbols.map' | |||
926 | --- src/server/symbols.map 2017-05-08 03:04:26 +0000 | |||
927 | +++ src/server/symbols.map 2017-06-19 15:01:38 +0000 | |||
928 | @@ -866,7 +866,6 @@ | |||
929 | 866 | mir::DefaultServerConfiguration::the_gl_config*; | 866 | mir::DefaultServerConfiguration::the_gl_config*; |
930 | 867 | mir::DefaultServerConfiguration::the_global_event_sink*; | 867 | mir::DefaultServerConfiguration::the_global_event_sink*; |
931 | 868 | mir::DefaultServerConfiguration::the_graphics_platform*; | 868 | mir::DefaultServerConfiguration::the_graphics_platform*; |
932 | 869 | mir::DefaultServerConfiguration::the_host_connection*; | ||
933 | 870 | mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*; | 869 | mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*; |
934 | 871 | mir::DefaultServerConfiguration::the_input_configuration_changer*; | 870 | mir::DefaultServerConfiguration::the_input_configuration_changer*; |
935 | 872 | mir::DefaultServerConfiguration::the_input_device_hub*; | 871 | mir::DefaultServerConfiguration::the_input_device_hub*; |
936 | 873 | 872 | ||
937 | === modified file 'tests/acceptance-tests/test_nested_mir.cpp' | |||
938 | --- tests/acceptance-tests/test_nested_mir.cpp 2017-05-08 03:04:26 +0000 | |||
939 | +++ tests/acceptance-tests/test_nested_mir.cpp 2017-06-19 15:01:38 +0000 | |||
940 | @@ -115,7 +115,8 @@ | |||
941 | 115 | 115 | ||
942 | 116 | struct MockCursor : public mtd::StubCursor | 116 | struct MockCursor : public mtd::StubCursor |
943 | 117 | { | 117 | { |
945 | 118 | MOCK_METHOD1(show, void(mg::CursorImage const&)); | 118 | MOCK_METHOD1(show, void(mg::CursorImage const&)); |
946 | 119 | MOCK_METHOD0(hide, void()); | ||
947 | 119 | }; | 120 | }; |
948 | 120 | 121 | ||
949 | 121 | struct MockHostLifecycleEventListener : msh::HostLifecycleEventListener | 122 | struct MockHostLifecycleEventListener : msh::HostLifecycleEventListener |
950 | @@ -200,22 +201,13 @@ | |||
951 | 200 | struct CursorWrapper : mg::Cursor | 201 | struct CursorWrapper : mg::Cursor |
952 | 201 | { | 202 | { |
953 | 202 | CursorWrapper(std::shared_ptr<mg::Cursor> const& wrapped) : wrapped{wrapped} {} | 203 | CursorWrapper(std::shared_ptr<mg::Cursor> const& wrapped) : wrapped{wrapped} {} |
956 | 203 | void show() override { if (!hidden) wrapped->show(); } | 204 | void show(mg::CursorImage const& cursor_image) override { wrapped->show(cursor_image); } |
955 | 204 | void show(mg::CursorImage const& cursor_image) override { if (!hidden) wrapped->show(cursor_image); } | ||
957 | 205 | void hide() override { wrapped->hide(); } | 205 | void hide() override { wrapped->hide(); } |
958 | 206 | 206 | ||
959 | 207 | void move_to(geom::Point position) override { wrapped->move_to(position); } | 207 | void move_to(geom::Point position) override { wrapped->move_to(position); } |
960 | 208 | 208 | ||
961 | 209 | void set_hidden(bool hidden) | ||
962 | 210 | { | ||
963 | 211 | this->hidden = hidden; | ||
964 | 212 | if (hidden) hide(); | ||
965 | 213 | else show(); | ||
966 | 214 | } | ||
967 | 215 | |||
968 | 216 | private: | 209 | private: |
969 | 217 | std::shared_ptr<mg::Cursor> const wrapped; | 210 | std::shared_ptr<mg::Cursor> const wrapped; |
970 | 218 | bool hidden{false}; | ||
971 | 219 | }; | 211 | }; |
972 | 220 | 212 | ||
973 | 221 | struct MockDisplayConfigurationPolicy : mg::DisplayConfigurationPolicy | 213 | struct MockDisplayConfigurationPolicy : mg::DisplayConfigurationPolicy |
974 | @@ -264,6 +256,7 @@ | |||
975 | 264 | 256 | ||
976 | 265 | virtual ~NestedMirRunner() | 257 | virtual ~NestedMirRunner() |
977 | 266 | { | 258 | { |
978 | 259 | cursor_wrapper.reset(); | ||
979 | 267 | stop_server(); | 260 | stop_server(); |
980 | 268 | } | 261 | } |
981 | 269 | 262 | ||
982 | @@ -1051,9 +1044,9 @@ | |||
983 | 1051 | condition.wait_for(timeout); | 1044 | condition.wait_for(timeout); |
984 | 1052 | Mock::VerifyAndClearExpectations(mock_cursor.get()); | 1045 | Mock::VerifyAndClearExpectations(mock_cursor.get()); |
985 | 1053 | 1046 | ||
987 | 1054 | nested_mir.cursor_wrapper->set_hidden(true); | 1047 | EXPECT_CALL(*mock_cursor, hide()).Times(AtLeast(1)); |
988 | 1055 | 1048 | ||
990 | 1056 | EXPECT_CALL(*mock_cursor, show(_)).Times(0); | 1049 | nested_mir.cursor_wrapper->hide(); |
991 | 1057 | 1050 | ||
992 | 1058 | for (int i = 0; i != frames; ++i) | 1051 | for (int i = 0; i != frames; ++i) |
993 | 1059 | { | 1052 | { |
994 | 1060 | 1053 | ||
995 | === modified file 'tests/include/mir/test/doubles/stub_host_connection.h' | |||
996 | --- tests/include/mir/test/doubles/stub_host_connection.h 2017-06-09 14:16:54 +0000 | |||
997 | +++ tests/include/mir/test/doubles/stub_host_connection.h 2017-06-19 15:01:38 +0000 | |||
998 | @@ -19,12 +19,14 @@ | |||
999 | 19 | #ifndef MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_ | 19 | #ifndef MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_ |
1000 | 20 | #define MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_ | 20 | #define MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_ |
1001 | 21 | 21 | ||
1002 | 22 | #include "src/server/graphics/nested/host_connection.h" | ||
1003 | 23 | #include "src/server/graphics/nested/host_surface.h" | ||
1004 | 24 | #include "src/server/graphics/nested/host_stream.h" | ||
1005 | 25 | #include "src/server/graphics/nested/host_chain.h" | ||
1006 | 26 | #include "src/server/graphics/nested/host_surface_spec.h" | ||
1007 | 27 | #include "src/client/display_configuration.h" | 22 | #include "src/client/display_configuration.h" |
1008 | 23 | #include "src/platforms/mir/host_connection.h" | ||
1009 | 24 | #include "src/platforms/mir/host_surface.h" | ||
1010 | 25 | #include "src/platforms/mir/host_connection.h" | ||
1011 | 26 | #include "src/platforms/mir/host_surface.h" | ||
1012 | 27 | #include "src/platforms/mir/host_stream.h" | ||
1013 | 28 | #include "src/platforms/mir/host_chain.h" | ||
1014 | 29 | #include "src/platforms/mir/host_surface_spec.h" | ||
1015 | 28 | #include "src/include/client/mir/input/input_devices.h" | 30 | #include "src/include/client/mir/input/input_devices.h" |
1016 | 29 | #include "mir/graphics/platform_operation_message.h" | 31 | #include "mir/graphics/platform_operation_message.h" |
1017 | 30 | 32 | ||
1018 | 31 | 33 | ||
1019 | === modified file 'tests/mir_test_framework/headless_nested_server_runner.cpp' | |||
1020 | --- tests/mir_test_framework/headless_nested_server_runner.cpp 2017-05-08 03:04:26 +0000 | |||
1021 | +++ tests/mir_test_framework/headless_nested_server_runner.cpp 2017-06-19 15:01:38 +0000 | |||
1022 | @@ -25,7 +25,7 @@ | |||
1023 | 25 | mtf::HeadlessNestedServerRunner::HeadlessNestedServerRunner(std::string const& connect_string) : | 25 | mtf::HeadlessNestedServerRunner::HeadlessNestedServerRunner(std::string const& connect_string) : |
1024 | 26 | passthrough_tracker(std::make_shared<mtf::PassthroughTracker>()) | 26 | passthrough_tracker(std::make_shared<mtf::PassthroughTracker>()) |
1025 | 27 | { | 27 | { |
1027 | 28 | add_to_environment("MIR_SERVER_PLATFORM_GRAPHICS_LIB", mtf::server_platform("graphics-dummy.so").c_str()); | 28 | add_to_environment("MIR_SERVER_PLATFORM_GRAPHICS_LIB", mtf::server_platform("server-mir.so.13").c_str()); |
1028 | 29 | add_to_environment("MIR_SERVER_HOST_SOCKET", connect_string.c_str()); | 29 | add_to_environment("MIR_SERVER_HOST_SOCKET", connect_string.c_str()); |
1029 | 30 | server.override_the_display_buffer_compositor_factory([this] | 30 | server.override_the_display_buffer_compositor_factory([this] |
1030 | 31 | { | 31 | { |
1031 | 32 | 32 | ||
1032 | === modified file 'tests/mir_test_framework/platform_graphics_throw.cpp' | |||
1033 | --- tests/mir_test_framework/platform_graphics_throw.cpp 2017-06-09 11:19:23 +0000 | |||
1034 | +++ tests/mir_test_framework/platform_graphics_throw.cpp 2017-06-19 15:01:38 +0000 | |||
1035 | @@ -55,7 +55,7 @@ | |||
1036 | 55 | mir::SharedLibrary stub_platform_library{std::string(platform_path) + "/graphics-dummy.so"}; | 55 | mir::SharedLibrary stub_platform_library{std::string(platform_path) + "/graphics-dummy.so"}; |
1037 | 56 | auto create_stub_platform = stub_platform_library.load_function<mg::CreateHostPlatform>("create_host_platform"); | 56 | auto create_stub_platform = stub_platform_library.load_function<mg::CreateHostPlatform>("create_host_platform"); |
1038 | 57 | 57 | ||
1040 | 58 | stub_platform = create_stub_platform(nullptr, nullptr, nullptr, nullptr); | 58 | stub_platform = create_stub_platform(nullptr, nullptr, nullptr, nullptr, nullptr); |
1041 | 59 | } | 59 | } |
1042 | 60 | 60 | ||
1043 | 61 | mir::UniqueModulePtr<mg::GraphicBufferAllocator> create_buffer_allocator() override | 61 | mir::UniqueModulePtr<mg::GraphicBufferAllocator> create_buffer_allocator() override |
1044 | @@ -170,7 +170,8 @@ | |||
1045 | 170 | std::shared_ptr<mo::Option> const&, | 170 | std::shared_ptr<mo::Option> const&, |
1046 | 171 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, | 171 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
1047 | 172 | std::shared_ptr<mg::DisplayReport> const&, | 172 | std::shared_ptr<mg::DisplayReport> const&, |
1049 | 173 | std::shared_ptr<mir::logging::Logger> const&) | 173 | std::shared_ptr<mir::logging::Logger> const&, |
1050 | 174 | std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) | ||
1051 | 174 | { | 175 | { |
1052 | 175 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); | 176 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
1053 | 176 | return mir::make_module_ptr<ExceptionThrowingPlatform>(); | 177 | return mir::make_module_ptr<ExceptionThrowingPlatform>(); |
1054 | 177 | 178 | ||
1055 | === modified file 'tests/mir_test_framework/stubbed_graphics_platform.cpp' | |||
1056 | --- tests/mir_test_framework/stubbed_graphics_platform.cpp 2017-06-09 11:19:23 +0000 | |||
1057 | +++ tests/mir_test_framework/stubbed_graphics_platform.cpp 2017-06-19 15:01:38 +0000 | |||
1058 | @@ -357,7 +357,8 @@ | |||
1059 | 357 | std::shared_ptr<mo::Option> const&, | 357 | std::shared_ptr<mo::Option> const&, |
1060 | 358 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, | 358 | std::shared_ptr<mir::EmergencyCleanupRegistry> const&, |
1061 | 359 | std::shared_ptr<mg::DisplayReport> const&, | 359 | std::shared_ptr<mg::DisplayReport> const&, |
1063 | 360 | std::shared_ptr<mir::logging::Logger> const&) | 360 | std::shared_ptr<mir::logging::Logger> const&, |
1064 | 361 | std::shared_ptr<mir::shell::HostLifecycleEventListener> const&) | ||
1065 | 361 | { | 362 | { |
1066 | 362 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); | 363 | mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform); |
1067 | 363 | std::shared_ptr<mg::Platform> result{}; | 364 | std::shared_ptr<mg::Platform> result{}; |
1068 | 364 | 365 | ||
1069 | === modified file 'tests/unit-tests/graphics/test_software_cursor.cpp' | |||
1070 | --- tests/unit-tests/graphics/test_software_cursor.cpp 2017-05-08 03:04:26 +0000 | |||
1071 | +++ tests/unit-tests/graphics/test_software_cursor.cpp 2017-06-19 15:01:38 +0000 | |||
1072 | @@ -199,25 +199,6 @@ | |||
1073 | 199 | cursor.move_to({22,23}); | 199 | cursor.move_to({22,23}); |
1074 | 200 | } | 200 | } |
1075 | 201 | 201 | ||
1076 | 202 | TEST_F(SoftwareCursor, multiple_shows_just_show) | ||
1077 | 203 | { | ||
1078 | 204 | using namespace testing; | ||
1079 | 205 | |||
1080 | 206 | InSequence s; | ||
1081 | 207 | EXPECT_CALL(mock_input_scene, add_input_visualization(_)); | ||
1082 | 208 | |||
1083 | 209 | EXPECT_CALL(mock_input_scene, remove_input_visualization(_)); | ||
1084 | 210 | EXPECT_CALL(mock_input_scene, add_input_visualization(_)); | ||
1085 | 211 | |||
1086 | 212 | EXPECT_CALL(mock_input_scene, remove_input_visualization(_)); // removal on destruction | ||
1087 | 213 | |||
1088 | 214 | cursor.show(stub_cursor_image); | ||
1089 | 215 | cursor.hide(); | ||
1090 | 216 | cursor.show(); | ||
1091 | 217 | cursor.show(); | ||
1092 | 218 | } | ||
1093 | 219 | |||
1094 | 220 | |||
1095 | 221 | TEST_F(SoftwareCursor, creates_renderable_with_filled_buffer) | 202 | TEST_F(SoftwareCursor, creates_renderable_with_filled_buffer) |
1096 | 222 | { | 203 | { |
1097 | 223 | using namespace testing; | 204 | using namespace testing; |
1098 | 224 | 205 | ||
1099 | === modified file 'tests/unit-tests/input/CMakeLists.txt' | |||
1100 | --- tests/unit-tests/input/CMakeLists.txt 2017-05-08 03:04:26 +0000 | |||
1101 | +++ tests/unit-tests/input/CMakeLists.txt 2017-06-19 15:01:38 +0000 | |||
1102 | @@ -16,7 +16,6 @@ | |||
1103 | 16 | ${CMAKE_CURRENT_SOURCE_DIR}/test_seat_input_device_tracker.cpp | 16 | ${CMAKE_CURRENT_SOURCE_DIR}/test_seat_input_device_tracker.cpp |
1104 | 17 | ${CMAKE_CURRENT_SOURCE_DIR}/test_key_repeat_dispatcher.cpp | 17 | ${CMAKE_CURRENT_SOURCE_DIR}/test_key_repeat_dispatcher.cpp |
1105 | 18 | ${CMAKE_CURRENT_SOURCE_DIR}/test_validator.cpp | 18 | ${CMAKE_CURRENT_SOURCE_DIR}/test_validator.cpp |
1106 | 19 | ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_input_platform.cpp | ||
1107 | 20 | ) | 19 | ) |
1108 | 21 | 20 | ||
1109 | 22 | list(APPEND UMOCK_UNIT_TEST_SOURCES | 21 | list(APPEND UMOCK_UNIT_TEST_SOURCES |
1110 | 23 | 22 | ||
1111 | === modified file 'tests/unit-tests/platforms/mesa/kms/test_cursor.cpp' | |||
1112 | --- tests/unit-tests/platforms/mesa/kms/test_cursor.cpp 2017-06-07 08:29:04 +0000 | |||
1113 | +++ tests/unit-tests/platforms/mesa/kms/test_cursor.cpp 2017-06-19 15:01:38 +0000 | |||
1114 | @@ -760,7 +760,7 @@ | |||
1115 | 760 | output_container.verify_and_clear_expectations(); | 760 | output_container.verify_and_clear_expectations(); |
1116 | 761 | 761 | ||
1117 | 762 | EXPECT_CALL(*output_container.outputs[0], set_cursor(_)); | 762 | EXPECT_CALL(*output_container.outputs[0], set_cursor(_)); |
1119 | 763 | cursor.show(); | 763 | cursor.show(stub_image); |
1120 | 764 | } | 764 | } |
1121 | 765 | 765 | ||
1122 | 766 | TEST_F(MesaCursorTest, show_cursor_sets_cursor_with_hotspot) | 766 | TEST_F(MesaCursorTest, show_cursor_sets_cursor_with_hotspot) |
1123 | 767 | 767 | ||
1124 | === modified file 'tests/unit-tests/platforms/nested/CMakeLists.txt' | |||
1125 | --- tests/unit-tests/platforms/nested/CMakeLists.txt 2017-05-08 03:04:26 +0000 | |||
1126 | +++ tests/unit-tests/platforms/nested/CMakeLists.txt 2017-06-19 15:01:38 +0000 | |||
1127 | @@ -5,11 +5,13 @@ | |||
1128 | 5 | ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_cursor.cpp | 5 | ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_cursor.cpp |
1129 | 6 | ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer.cpp | 6 | ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer.cpp |
1130 | 7 | ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_display_buffer.cpp | 7 | ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_display_buffer.cpp |
1131 | 8 | ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_input_platform.cpp | ||
1132 | 8 | ${CMAKE_CURRENT_SOURCE_DIR}/test_ipc_operations.cpp | 9 | ${CMAKE_CURRENT_SOURCE_DIR}/test_ipc_operations.cpp |
1133 | 9 | ${CMAKE_CURRENT_SOURCE_DIR}/test_host_buffer.cpp | 10 | ${CMAKE_CURRENT_SOURCE_DIR}/test_host_buffer.cpp |
1134 | 10 | $<TARGET_OBJECTS:mir-test-doubles-udev> | 11 | $<TARGET_OBJECTS:mir-test-doubles-udev> |
1135 | 11 | ${MIR_PLATFORM_OBJECTS} | 12 | ${MIR_PLATFORM_OBJECTS} |
1136 | 12 | ${MIR_SERVER_OBJECTS} | 13 | ${MIR_SERVER_OBJECTS} |
1137 | 14 | $<TARGET_OBJECTS:mirnestedgraphics> | ||
1138 | 13 | ) | 15 | ) |
1139 | 14 | 16 | ||
1140 | 15 | target_link_libraries( | 17 | target_link_libraries( |
1141 | 16 | 18 | ||
1142 | === modified file 'tests/unit-tests/platforms/nested/test_buffer.cpp' | |||
1143 | --- tests/unit-tests/platforms/nested/test_buffer.cpp 2017-05-08 03:04:26 +0000 | |||
1144 | +++ tests/unit-tests/platforms/nested/test_buffer.cpp 2017-06-19 15:01:38 +0000 | |||
1145 | @@ -16,8 +16,11 @@ | |||
1146 | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
1147 | 17 | */ | 17 | */ |
1148 | 18 | 18 | ||
1151 | 19 | #include "src/server/graphics/nested/native_buffer.h" | 19 | #include "src/platforms/mir/buffer.h" |
1152 | 20 | #include "src/server/graphics/nested/buffer.h" | 20 | #include "src/platforms/mir/native_buffer.h" |
1153 | 21 | #include "src/platforms/mir/buffer.h" | ||
1154 | 22 | #include "src/platforms/mir/native_buffer.h" | ||
1155 | 23 | #include "src/platforms/mir/buffer.h" | ||
1156 | 21 | #include "src/client/buffer.h" | 24 | #include "src/client/buffer.h" |
1157 | 22 | #include "mir/graphics/buffer_properties.h" | 25 | #include "mir/graphics/buffer_properties.h" |
1158 | 23 | #include "mir/test/doubles/stub_host_connection.h" | 26 | #include "mir/test/doubles/stub_host_connection.h" |
1159 | 24 | 27 | ||
1160 | === modified file 'tests/unit-tests/platforms/nested/test_host_buffer.cpp' | |||
1161 | --- tests/unit-tests/platforms/nested/test_host_buffer.cpp 2017-05-08 03:04:26 +0000 | |||
1162 | +++ tests/unit-tests/platforms/nested/test_host_buffer.cpp 2017-06-19 15:01:38 +0000 | |||
1163 | @@ -16,7 +16,7 @@ | |||
1164 | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
1165 | 17 | */ | 17 | */ |
1166 | 18 | 18 | ||
1168 | 19 | #include "src/server/graphics/nested/host_buffer.h" | 19 | #include "src/platforms/mir/host_buffer.h" |
1169 | 20 | #include "src/client/default_connection_configuration.h" | 20 | #include "src/client/default_connection_configuration.h" |
1170 | 21 | #include "src/client/mir_connection.h" | 21 | #include "src/client/mir_connection.h" |
1171 | 22 | #include "src/client/buffer_factory.h" | 22 | #include "src/client/buffer_factory.h" |
1172 | 23 | 23 | ||
1173 | === modified file 'tests/unit-tests/platforms/nested/test_ipc_operations.cpp' | |||
1174 | --- tests/unit-tests/platforms/nested/test_ipc_operations.cpp 2017-05-08 03:04:26 +0000 | |||
1175 | +++ tests/unit-tests/platforms/nested/test_ipc_operations.cpp 2017-06-19 15:01:38 +0000 | |||
1176 | @@ -16,8 +16,8 @@ | |||
1177 | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
1178 | 17 | */ | 17 | */ |
1179 | 18 | 18 | ||
1182 | 19 | #include "src/server/graphics/nested/ipc_operations.h" | 19 | #include "src/platforms/mir/ipc_operations.h" |
1183 | 20 | #include "src/server/graphics/nested/native_buffer.h" | 20 | #include "src/platforms/mir/native_buffer.h" |
1184 | 21 | #include "mir/test/doubles/stub_buffer.h" | 21 | #include "mir/test/doubles/stub_buffer.h" |
1185 | 22 | #include "mir/test/doubles/mock_buffer_ipc_message.h" | 22 | #include "mir/test/doubles/mock_buffer_ipc_message.h" |
1186 | 23 | #include "mir/test/doubles/mock_platform_ipc_operations.h" | 23 | #include "mir/test/doubles/mock_platform_ipc_operations.h" |
1187 | 24 | 24 | ||
1188 | === modified file 'tests/unit-tests/platforms/nested/test_nested_cursor.cpp' | |||
1189 | --- tests/unit-tests/platforms/nested/test_nested_cursor.cpp 2017-05-08 03:04:26 +0000 | |||
1190 | +++ tests/unit-tests/platforms/nested/test_nested_cursor.cpp 2017-06-19 15:01:38 +0000 | |||
1191 | @@ -16,7 +16,7 @@ | |||
1192 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> |
1193 | 17 | */ | 17 | */ |
1194 | 18 | 18 | ||
1196 | 19 | #include "src/server/graphics/nested/cursor.h" | 19 | #include "src/platforms/mir/cursor.h" |
1197 | 20 | #include "mir/graphics/cursor_image.h" | 20 | #include "mir/graphics/cursor_image.h" |
1198 | 21 | 21 | ||
1199 | 22 | #include "mir/test/fake_shared.h" | 22 | #include "mir/test/fake_shared.h" |
1200 | @@ -63,8 +63,8 @@ | |||
1201 | 63 | { | 63 | { |
1202 | 64 | EXPECT_CALL(*connection, set_cursor_image(CursorImageEquals(a_cursor_image.as_argb_8888()))).Times(1); | 64 | EXPECT_CALL(*connection, set_cursor_image(CursorImageEquals(a_cursor_image.as_argb_8888()))).Times(1); |
1203 | 65 | 65 | ||
1206 | 66 | mgn::Cursor cursor(connection, mt::fake_shared(a_cursor_image)); | 66 | mgn::Cursor cursor(connection); |
1207 | 67 | cursor.show(); | 67 | cursor.show(a_cursor_image); |
1208 | 68 | } | 68 | } |
1209 | 69 | 69 | ||
1210 | 70 | TEST_F(NestedCursor, can_set_other_images) | 70 | TEST_F(NestedCursor, can_set_other_images) |
1211 | @@ -72,7 +72,7 @@ | |||
1212 | 72 | EXPECT_CALL(*connection, set_cursor_image(CursorImageEquals(a_cursor_image.as_argb_8888()))).Times(0); | 72 | EXPECT_CALL(*connection, set_cursor_image(CursorImageEquals(a_cursor_image.as_argb_8888()))).Times(0); |
1213 | 73 | EXPECT_CALL(*connection, set_cursor_image(CursorImageEquals(another_cursor_image.as_argb_8888()))).Times(1); | 73 | EXPECT_CALL(*connection, set_cursor_image(CursorImageEquals(another_cursor_image.as_argb_8888()))).Times(1); |
1214 | 74 | 74 | ||
1216 | 75 | mgn::Cursor cursor(connection, mt::fake_shared(a_cursor_image)); | 75 | mgn::Cursor cursor(connection); |
1217 | 76 | cursor.show(another_cursor_image); | 76 | cursor.show(another_cursor_image); |
1218 | 77 | } | 77 | } |
1219 | 78 | 78 | ||
1220 | @@ -83,8 +83,8 @@ | |||
1221 | 83 | EXPECT_CALL(*connection, hide_cursor()).Times(1); | 83 | EXPECT_CALL(*connection, hide_cursor()).Times(1); |
1222 | 84 | EXPECT_CALL(*connection, set_cursor_image(CursorImageEquals(another_cursor_image.as_argb_8888()))).Times(1); | 84 | EXPECT_CALL(*connection, set_cursor_image(CursorImageEquals(another_cursor_image.as_argb_8888()))).Times(1); |
1223 | 85 | 85 | ||
1226 | 86 | mgn::Cursor cursor(connection, mt::fake_shared(a_cursor_image)); | 86 | mgn::Cursor cursor(connection); |
1227 | 87 | cursor.show(); | 87 | cursor.show(a_cursor_image); |
1228 | 88 | cursor.hide(); | 88 | cursor.hide(); |
1229 | 89 | cursor.show(another_cursor_image); | 89 | cursor.show(another_cursor_image); |
1230 | 90 | } | 90 | } |
1231 | 91 | 91 | ||
1232 | === modified file 'tests/unit-tests/platforms/nested/test_nested_display.cpp' | |||
1233 | --- tests/unit-tests/platforms/nested/test_nested_display.cpp 2017-06-09 14:16:54 +0000 | |||
1234 | +++ tests/unit-tests/platforms/nested/test_nested_display.cpp 2017-06-19 15:01:38 +0000 | |||
1235 | @@ -16,9 +16,9 @@ | |||
1236 | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
1237 | 17 | */ | 17 | */ |
1238 | 18 | 18 | ||
1242 | 19 | #include "src/server/graphics/nested/display.h" | 19 | #include "src/platforms/mir/display.h" |
1243 | 20 | #include "src/server/graphics/nested/host_connection.h" | 20 | #include "src/platforms/mir/host_connection.h" |
1244 | 21 | #include "src/server/graphics/nested/host_surface.h" | 21 | #include "src/platforms/mir/host_surface.h" |
1245 | 22 | #include "src/server/report/null/display_report.h" | 22 | #include "src/server/report/null/display_report.h" |
1246 | 23 | #include "mir/graphics/default_display_configuration_policy.h" | 23 | #include "mir/graphics/default_display_configuration_policy.h" |
1247 | 24 | #include "src/server/input/null_input_dispatcher.h" | 24 | #include "src/server/input/null_input_dispatcher.h" |
1248 | 25 | 25 | ||
1249 | === modified file 'tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp' | |||
1250 | --- tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp 2017-05-08 03:04:26 +0000 | |||
1251 | +++ tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp 2017-06-19 15:01:38 +0000 | |||
1252 | @@ -16,11 +16,11 @@ | |||
1253 | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> | 16 | * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
1254 | 17 | */ | 17 | */ |
1255 | 18 | 18 | ||
1261 | 19 | #include "src/server/graphics/nested/display_buffer.h" | 19 | #include "src/platforms/mir/display_buffer.h" |
1262 | 20 | #include "src/server/graphics/nested/native_buffer.h" | 20 | #include "src/platforms/mir/native_buffer.h" |
1263 | 21 | #include "src/server/graphics/nested/host_stream.h" | 21 | #include "src/platforms/mir/host_stream.h" |
1264 | 22 | #include "src/server/graphics/nested/host_chain.h" | 22 | #include "src/platforms/mir/host_chain.h" |
1265 | 23 | #include "src/server/graphics/nested/host_surface_spec.h" | 23 | #include "src/platforms/mir/host_surface_spec.h" |
1266 | 24 | 24 | ||
1267 | 25 | #include "mir/events/event_builders.h" | 25 | #include "mir/events/event_builders.h" |
1268 | 26 | 26 | ||
1269 | 27 | 27 | ||
1270 | === modified file 'tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp' | |||
1271 | --- tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-05-25 08:58:03 +0000 | |||
1272 | +++ tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-06-19 15:01:38 +0000 | |||
1273 | @@ -16,7 +16,7 @@ | |||
1274 | 16 | * Authored by: Alan Griffiths <alan@octopull.co.uk> | 16 | * Authored by: Alan Griffiths <alan@octopull.co.uk> |
1275 | 17 | */ | 17 | */ |
1276 | 18 | 18 | ||
1278 | 19 | #include "src/server/graphics/nested/nested_display_configuration.h" | 19 | #include "src/platforms/mir/nested_display_configuration.h" |
1279 | 20 | #include "mir_display_configuration_builder.h" | 20 | #include "mir_display_configuration_builder.h" |
1280 | 21 | #include "mir_toolkit/mir_display_configuration.h" | 21 | #include "mir_toolkit/mir_display_configuration.h" |
1281 | 22 | 22 | ||
1282 | 23 | 23 | ||
1283 | === renamed file 'tests/unit-tests/input/test_nested_input_platform.cpp' => 'tests/unit-tests/platforms/nested/test_nested_input_platform.cpp' | |||
1284 | --- tests/unit-tests/input/test_nested_input_platform.cpp 2017-05-08 03:04:26 +0000 | |||
1285 | +++ tests/unit-tests/platforms/nested/test_nested_input_platform.cpp 2017-06-19 15:01:38 +0000 | |||
1286 | @@ -16,7 +16,7 @@ | |||
1287 | 16 | * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com> | 16 | * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com> |
1288 | 17 | */ | 17 | */ |
1289 | 18 | 18 | ||
1291 | 19 | #include "src/server/graphics/nested/input_platform.h" | 19 | #include "src/platforms/mir/input_platform.h" |
1292 | 20 | #include "src/server/report/null_report_factory.h" | 20 | #include "src/server/report/null_report_factory.h" |
1293 | 21 | #include "src/include/client/mir/input/input_devices.h" | 21 | #include "src/include/client/mir/input/input_devices.h" |
1294 | 22 | #include "src/server/input/default_event_builder.h" | 22 | #include "src/server/input/default_event_builder.h" |
1295 | 23 | 23 | ||
1296 | === modified file 'tools/update_package_abis.sh' | |||
1297 | --- tools/update_package_abis.sh 2017-05-08 03:04:26 +0000 | |||
1298 | +++ tools/update_package_abis.sh 2017-06-19 15:01:38 +0000 | |||
1299 | @@ -21,6 +21,7 @@ | |||
1300 | 21 | mir-client-platform-mesa:MIR_CLIENT_PLATFORM_ABI \ | 21 | mir-client-platform-mesa:MIR_CLIENT_PLATFORM_ABI \ |
1301 | 22 | mir-platform-graphics-mesa-x:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ | 22 | mir-platform-graphics-mesa-x:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ |
1302 | 23 | mir-platform-graphics-mesa-kms:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ | 23 | mir-platform-graphics-mesa-kms:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ |
1303 | 24 | mir-platform-graphics-mir:MIR_SERVER_GRAPHICS_PLATFORM_ABI \ | ||
1304 | 24 | mir-platform-input-evdev:MIR_SERVER_INPUT_PLATFORM_ABI" | 25 | mir-platform-input-evdev:MIR_SERVER_INPUT_PLATFORM_ABI" |
1305 | 25 | 26 | ||
1306 | 26 | package_name() | 27 | package_name() |
I've seen intermittent tests failing to shutdown. Need to investigate further.