Mir

Merge lp:~alan-griffiths/mir/mir-on-mir-platform into lp:mir

Proposed by Alan Griffiths
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
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

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I've seen intermittent tests failing to shutdown. Need to investigate further.

review: Needs Information
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4199
https://mir-jenkins.ubuntu.com/job/mir-ci/3458/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4719/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4873
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/4862
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4862
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4862
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4756
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4756/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4756
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4756/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4756
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4756/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4756/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4756/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4756
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4756/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4756
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4756/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4756
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4756/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3458/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :
Download full text (3.2 KiB)

Yep, that's the sort of thing I saw too:

16:24:57 11: [ RUN ] NestedInput.on_add_device_observer_gets_device_added_calls_on_existing_devices
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_tests_precompiled.hpp.gch precompiled.hpp.compileflags precompiled.hpp.compileflags.processed Output 1: VGA connected, used
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_tests_precompiled.hpp.gch precompiled.hpp.compileflags precompiled.hpp.compileflags.processed Output 1: VGA connected, used
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_dh_auto_test' failed
18:54:59 Makefile:130: recipe for target 'test' failed
18:54:59 make[1]: *** [override_dh_auto_test] Terminated
18...

Read more...

review: Needs Fixing

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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2017-05-25 08:58:03 +0000
+++ debian/control 2017-06-19 15:01:38 +0000
@@ -347,6 +347,20 @@
347 Contains the shared libraries required for the Mir server to interact with347 Contains the shared libraries required for the Mir server to interact with
348 the hardware platform using the Mesa drivers.348 the hardware platform using the Mesa drivers.
349349
350Package: mir-platform-graphics-mir13
351Section: libs
352Architecture: linux-any
353Multi-Arch: same
354Pre-Depends: ${misc:Pre-Depends}
355Depends: ${misc:Depends},
356 ${shlibs:Depends},
357Description: Display server for Ubuntu - platform library for Nested servers
358 Mir is a display server running on linux systems, with a focus on efficiency,
359 robust operation and a well-defined driver model.
360 .
361 Contains the shared libraries required for the Mir server to connect to
362 another Mir server.
363
350Package: mir-platform-input-evdev7364Package: mir-platform-input-evdev7
351Section: libs365Section: libs
352Architecture: linux-any366Architecture: linux-any
@@ -399,6 +413,7 @@
399 mir-platform-graphics-mesa-x13,413 mir-platform-graphics-mesa-x13,
400 mir-client-platform-mesa5,414 mir-client-platform-mesa5,
401 mir-platform-input-evdev7,415 mir-platform-input-evdev7,
416 mir-platform-graphics-mir13,
402Description: Display server for Ubuntu - desktop driver metapackage417Description: Display server for Ubuntu - desktop driver metapackage
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,
404 robust operation and a well-defined driver model.419 robust operation and a well-defined driver model.
405420
=== added file 'debian/mir-platform-graphics-mir13.install'
--- debian/mir-platform-graphics-mir13.install 1970-01-01 00:00:00 +0000
+++ debian/mir-platform-graphics-mir13.install 2017-06-19 15:01:38 +0000
@@ -0,0 +1,1 @@
1usr/lib/*/mir/server-platform/server-mir.so.13
02
=== modified file 'include/platform/mir/graphics/cursor.h'
--- include/platform/mir/graphics/cursor.h 2015-04-28 07:54:10 +0000
+++ include/platform/mir/graphics/cursor.h 2017-06-19 15:01:38 +0000
@@ -33,7 +33,6 @@
33class Cursor33class Cursor
34{34{
35public:35public:
36 virtual void show() = 0;
37 virtual void show(CursorImage const& cursor_image) = 0;36 virtual void show(CursorImage const& cursor_image) = 0;
38 virtual void hide() = 0;37 virtual void hide() = 0;
3938
4039
=== renamed file 'src/include/server/mir/graphics/gl_extensions_base.h' => 'include/platform/mir/graphics/gl_extensions_base.h'
--- src/include/server/mir/graphics/gl_extensions_base.h 2015-02-22 07:46:25 +0000
+++ include/platform/mir/graphics/gl_extensions_base.h 2017-06-19 15:01:38 +0000
@@ -2,15 +2,15 @@
2 * Copyright © 2013 Canonical Ltd.2 * Copyright © 2013 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
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,
6 * as published by the Free Software Foundation.6 * as published by the Free Software Foundation.
7 *7 *
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,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * You should have received a copy of the GNU Lesser General Public License
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/>.
15 *15 *
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
1717
=== modified file 'include/platform/mir/graphics/platform.h'
--- include/platform/mir/graphics/platform.h 2017-06-09 11:19:23 +0000
+++ include/platform/mir/graphics/platform.h 2017-06-19 15:01:38 +0000
@@ -29,6 +29,7 @@
29namespace mir29namespace mir
30{30{
31class EmergencyCleanupRegistry;31class EmergencyCleanupRegistry;
32namespace shell { class HostLifecycleEventListener; }
3233
33namespace logging { class Logger; }34namespace logging { class Logger; }
3435
@@ -149,22 +150,20 @@
149/**150/**
150 * A measure of how well a platform supports a device151 * A measure of how well a platform supports a device
151 *152 *
152 * \note This is compared as an integer; best + 1 is a valid PlatformPriority that153 * \note This is compared as an integer; request + 1 is a valid PlatformPriority that
153 * will be used in preference to a module that reports best.154 * will be used in preference to a module that reports request.
154 * Platform modules distributed with Mir will never use a priority higher155 * Platform modules distributed with Mir will never use a priority higher
155 * than best.156 * than request.
156 */157 */
157enum PlatformPriority : uint32_t158enum PlatformPriority : uint32_t
158{159{
159 unsupported = 0, /**< Unable to function at all on this device */160 unsupported = 0, /**< Unable to function at all on this device */
160 dummy = 1, /**< Used only for dummy or stub platforms.161 dummy = 1, /**< Used only for dummy or stub platforms. */
161 */
162 supported = 128, /**< Capable of providing a functioning Platform on this device,162 supported = 128, /**< Capable of providing a functioning Platform on this device,
163 * possibly with degraded performance or features.163 * possibly with degraded performance or features. */
164 */164 best = 192, /**< Capable of providing a Platform with the best features and
165 best = 256 /**< Capable of providing a Platform with the best features and165 * performance this device is capable of.*/
166 * performance this device is capable of.166 requested = 256 /**< Provides a Platform that satisfies a user request. */
167 */
168};167};
169168
170//The host/guest platform concept is soon to be removed. Use CreateRenderingPlatform and169//The host/guest platform concept is soon to be removed. Use CreateRenderingPlatform and
@@ -173,7 +172,8 @@
173 std::shared_ptr<mir::options::Option> const& options,172 std::shared_ptr<mir::options::Option> const& options,
174 std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry,173 std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry,
175 std::shared_ptr<mir::graphics::DisplayReport> const& report,174 std::shared_ptr<mir::graphics::DisplayReport> const& report,
176 std::shared_ptr<mir::logging::Logger> const& logger);175 std::shared_ptr<mir::logging::Logger> const& logger,
176 std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener);
177177
178typedef void(*AddPlatformOptions)(178typedef void(*AddPlatformOptions)(
179 boost::program_options::options_description& config);179 boost::program_options::options_description& config);
@@ -210,6 +210,7 @@
210 * \param [in] options options to use for this platform210 * \param [in] options options to use for this platform
211 * \param [in] emergency_cleanup_registry object to register emergency shutdown handlers with211 * \param [in] emergency_cleanup_registry object to register emergency shutdown handlers with
212 * \param [in] report the object to use to report interesting events from the display subsystem212 * \param [in] report the object to use to report interesting events from the display subsystem
213 * \param [in] host_lifecycle_event_listener the object to use to listen to events from a host server
213 *214 *
214 * This factory function needs to be implemented by each platform.215 * This factory function needs to be implemented by each platform.
215 *216 *
@@ -219,7 +220,8 @@
219 std::shared_ptr<mir::options::Option> const& options,220 std::shared_ptr<mir::options::Option> const& options,
220 std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry,221 std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry,
221 std::shared_ptr<mir::graphics::DisplayReport> const& report,222 std::shared_ptr<mir::graphics::DisplayReport> const& report,
222 std::shared_ptr<mir::logging::Logger> const& logger);223 std::shared_ptr<mir::logging::Logger> const& logger,
224 std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener);
223225
224/**226/**
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.
226228
=== renamed file 'src/include/server/mir/graphics/surfaceless_egl_context.h' => 'include/platform/mir/graphics/surfaceless_egl_context.h'
--- src/include/server/mir/graphics/surfaceless_egl_context.h 2016-07-28 09:10:43 +0000
+++ include/platform/mir/graphics/surfaceless_egl_context.h 2017-06-19 15:01:38 +0000
@@ -2,15 +2,15 @@
2 * Copyright © 2013 Canonical Ltd.2 * Copyright © 2013 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
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,
6 * as published by the Free Software Foundation.6 * as published by the Free Software Foundation.
7 *7 *
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,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * You should have received a copy of the GNU Lesser General Public License
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/>.
15 *15 *
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
1717
=== modified file 'include/test/mir/test/doubles/stub_cursor.h'
--- include/test/mir/test/doubles/stub_cursor.h 2016-01-29 08:18:22 +0000
+++ include/test/mir/test/doubles/stub_cursor.h 2017-06-19 15:01:38 +0000
@@ -30,7 +30,6 @@
3030
31struct StubCursor : public graphics::Cursor31struct StubCursor : public graphics::Cursor
32{32{
33 void show() override {}
34 void show(graphics::CursorImage const&) override {}33 void show(graphics::CursorImage const&) override {}
35 void hide() override {}34 void hide() override {}
36 void move_to(geometry::Point) override {}35 void move_to(geometry::Point) override {}
3736
=== modified file 'src/include/server/mir/default_server_configuration.h'
--- src/include/server/mir/default_server_configuration.h 2017-05-08 03:04:26 +0000
+++ src/include/server/mir/default_server_configuration.h 2017-06-19 15:01:38 +0000
@@ -208,7 +208,6 @@
208 virtual std::shared_ptr<renderer::RendererFactory> the_renderer_factory();208 virtual std::shared_ptr<renderer::RendererFactory> the_renderer_factory();
209 virtual std::shared_ptr<shell::DisplayConfigurationController> the_display_configuration_controller();209 virtual std::shared_ptr<shell::DisplayConfigurationController> the_display_configuration_controller();
210 virtual std::shared_ptr<graphics::DisplayConfigurationPolicy> the_display_configuration_policy();210 virtual std::shared_ptr<graphics::DisplayConfigurationPolicy> the_display_configuration_policy();
211 virtual std::shared_ptr<graphics::nested::HostConnection> the_host_connection();
212 virtual std::shared_ptr<graphics::GLConfig> the_gl_config();211 virtual std::shared_ptr<graphics::GLConfig> the_gl_config();
213 /** @} */212 /** @} */
214213
215214
=== modified file 'src/platform/graphics/CMakeLists.txt'
--- src/platform/graphics/CMakeLists.txt 2017-05-08 03:04:26 +0000
+++ src/platform/graphics/CMakeLists.txt 2017-06-19 15:01:38 +0000
@@ -1,4 +1,6 @@
1include_directories(${GL_INCLUDE_DIRS})1include_directories(
2 ${GL_INCLUDE_DIRS}
3 ${PROJECT_SOURCE_DIR}/include/renderers/gl)
24
3set(5set(
4 GRAPHICS_SOURCES6 GRAPHICS_SOURCES
@@ -6,6 +8,8 @@
6 egl_extensions.cpp8 egl_extensions.cpp
7 egl_resources.cpp9 egl_resources.cpp
8 egl_error.cpp10 egl_error.cpp
11 surfaceless_egl_context.cpp
12 gl_extensions_base.cpp
9 display_configuration.cpp13 display_configuration.cpp
10 gamma_curves.cpp14 gamma_curves.cpp
11 buffer_basic.cpp15 buffer_basic.cpp
1216
=== renamed file 'src/server/graphics/gl_extensions_base.cpp' => 'src/platform/graphics/gl_extensions_base.cpp'
--- src/server/graphics/gl_extensions_base.cpp 2013-12-13 05:24:22 +0000
+++ src/platform/graphics/gl_extensions_base.cpp 2017-06-19 15:01:38 +0000
@@ -2,15 +2,15 @@
2 * Copyright © 2013 Canonical Ltd.2 * Copyright © 2013 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
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,
6 * as published by the Free Software Foundation.6 * as published by the Free Software Foundation.
7 *7 *
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,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * You should have received a copy of the GNU Lesser General Public License
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/>.
15 *15 *
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
1717
=== renamed file 'src/server/graphics/surfaceless_egl_context.cpp' => 'src/platform/graphics/surfaceless_egl_context.cpp'
--- src/server/graphics/surfaceless_egl_context.cpp 2017-05-08 03:04:26 +0000
+++ src/platform/graphics/surfaceless_egl_context.cpp 2017-06-19 15:01:38 +0000
@@ -2,15 +2,15 @@
2 * Copyright © 2013 Canonical Ltd.2 * Copyright © 2013 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
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,
6 * as published by the Free Software Foundation.6 * as published by the Free Software Foundation.
7 *7 *
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,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * You should have received a copy of the GNU Lesser General Public License
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/>.
15 *15 *
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
1717
=== modified file 'src/platform/symbols.map'
--- src/platform/symbols.map 2017-05-25 08:58:03 +0000
+++ src/platform/symbols.map 2017-06-19 15:01:38 +0000
@@ -21,9 +21,16 @@
21 mir::graphics::EventHandlerRegister::register_signal_handler*;21 mir::graphics::EventHandlerRegister::register_signal_handler*;
22 mir::graphics::EventHandlerRegister::unregister_fd_handler*;22 mir::graphics::EventHandlerRegister::unregister_fd_handler*;
23 mir::graphics::GammaCurves::GammaCurves*;23 mir::graphics::GammaCurves::GammaCurves*;
24 mir::graphics::GLExtensionsBase::GLExtensionsBase*;
25 mir::graphics::GLExtensionsBase::support*;
24 mir::graphics::LinearGammaLUTs::LinearGammaLUTs*;26 mir::graphics::LinearGammaLUTs::LinearGammaLUTs*;
25 mir::graphics::module_for_device*;27 mir::graphics::module_for_device*;
26 mir::graphics::operator*;28 mir::graphics::operator*;
29 mir::graphics::SurfacelessEGLContext::SurfacelessEGLContext*;
30 mir::graphics::SurfacelessEGLContext::make_current*;
31 mir::graphics::SurfacelessEGLContext::operator*;
32 mir::graphics::SurfacelessEGLContext::release_current*;
33 mir::graphics::SurfacelessEGLContext::?SurfacelessEGLContext*;
27 mir::graphics::UserDisplayConfigurationOutput::extents*;34 mir::graphics::UserDisplayConfigurationOutput::extents*;
28 mir::graphics::UserDisplayConfigurationOutput::UserDisplayConfigurationOutput*;35 mir::graphics::UserDisplayConfigurationOutput::UserDisplayConfigurationOutput*;
29 mir::options::arw_server_socket_opt*;36 mir::options::arw_server_socket_opt*;
3037
=== modified file 'src/platforms/CMakeLists.txt'
--- src/platforms/CMakeLists.txt 2017-05-17 04:48:46 +0000
+++ src/platforms/CMakeLists.txt 2017-06-19 15:01:38 +0000
@@ -72,4 +72,5 @@
72 add_subdirectory(eglstream-kms)72 add_subdirectory(eglstream-kms)
73endif()73endif()
7474
75add_subdirectory(mir/)
75add_subdirectory(evdev/)76add_subdirectory(evdev/)
7677
=== modified file 'src/platforms/eglstream-kms/server/platform_symbols.cpp'
--- src/platforms/eglstream-kms/server/platform_symbols.cpp 2017-06-09 11:19:23 +0000
+++ src/platforms/eglstream-kms/server/platform_symbols.cpp 2017-06-19 15:01:38 +0000
@@ -74,7 +74,8 @@
74 std::shared_ptr<mo::Option> const&,74 std::shared_ptr<mo::Option> const&,
75 std::shared_ptr<mir::EmergencyCleanupRegistry> const&, 75 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,
76 std::shared_ptr<mg::DisplayReport> const&, 76 std::shared_ptr<mg::DisplayReport> const&,
77 std::shared_ptr<mir::logging::Logger> const&)77 std::shared_ptr<mir::logging::Logger> const&,
78 std::shared_ptr<mir::shell::HostLifecycleEventListener> const&)
78{79{
79 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);80 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);
80 return mir::make_module_ptr<mge::Platform>(81 return mir::make_module_ptr<mge::Platform>(
8182
=== modified file 'src/platforms/mesa/server/kms/cursor.cpp'
--- src/platforms/mesa/server/kms/cursor.cpp 2017-06-09 10:22:15 +0000
+++ src/platforms/mesa/server/kms/cursor.cpp 2017-06-19 15:01:38 +0000
@@ -216,17 +216,6 @@
216 write_buffer_data_locked(lg, buffer, &padded[0], padded_size);216 write_buffer_data_locked(lg, buffer, &padded[0], padded_size);
217}217}
218218
219void mgm::Cursor::show()
220{
221 std::lock_guard<std::mutex> lg(guard);
222
223 if (!visible)
224 {
225 visible = true;
226 place_cursor_at_locked(lg, current_position, ForceState);
227 }
228}
229
230void mgm::Cursor::show(CursorImage const& cursor_image)219void mgm::Cursor::show(CursorImage const& cursor_image)
231{220{
232 std::lock_guard<std::mutex> lg(guard);221 std::lock_guard<std::mutex> lg(guard);
233222
=== modified file 'src/platforms/mesa/server/kms/cursor.h'
--- src/platforms/mesa/server/kms/cursor.h 2017-06-08 08:34:56 +0000
+++ src/platforms/mesa/server/kms/cursor.h 2017-06-19 15:01:38 +0000
@@ -74,7 +74,6 @@
7474
75 ~Cursor() noexcept;75 ~Cursor() noexcept;
7676
77 void show() override;
78 void show(CursorImage const& cursor_image) override;77 void show(CursorImage const& cursor_image) override;
79 void hide() override;78 void hide() override;
8079
8180
=== modified file 'src/platforms/mesa/server/kms/platform_symbols.cpp'
--- src/platforms/mesa/server/kms/platform_symbols.cpp 2017-06-09 15:10:57 +0000
+++ src/platforms/mesa/server/kms/platform_symbols.cpp 2017-06-19 15:01:38 +0000
@@ -106,7 +106,8 @@
106 std::shared_ptr<mo::Option> const& options,106 std::shared_ptr<mo::Option> const& options,
107 std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry,107 std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry,
108 std::shared_ptr<mg::DisplayReport> const& report,108 std::shared_ptr<mg::DisplayReport> const& report,
109 std::shared_ptr<mir::logging::Logger> const& /*logger*/)109 std::shared_ptr<mir::logging::Logger> const& /*logger*/,
110 std::shared_ptr<mir::shell::HostLifecycleEventListener> const&)
110{111{
111 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);112 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);
112 // ensure mesa finds the mesa mir-platform symbols113 // ensure mesa finds the mesa mir-platform symbols
113114
=== modified file 'src/platforms/mesa/server/x11/graphics/graphics.cpp'
--- src/platforms/mesa/server/x11/graphics/graphics.cpp 2017-06-09 11:24:39 +0000
+++ src/platforms/mesa/server/x11/graphics/graphics.cpp 2017-06-19 15:01:38 +0000
@@ -46,7 +46,8 @@
46 std::shared_ptr<mo::Option> const& options,46 std::shared_ptr<mo::Option> const& options,
47 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,47 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,
48 std::shared_ptr<mg::DisplayReport> const& report,48 std::shared_ptr<mg::DisplayReport> const& report,
49 std::shared_ptr<mir::logging::Logger> const& /*logger*/)49 std::shared_ptr<mir::logging::Logger> const& /*logger*/,
50 std::shared_ptr<mir::shell::HostLifecycleEventListener> const&)
50{51{
51 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);52 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);
52 if (!x11_resources.get_conn())53 if (!x11_resources.get_conn())
5354
=== renamed directory 'src/server/graphics/nested' => 'src/platforms/mir'
=== modified file 'src/platforms/mir/CMakeLists.txt'
--- src/server/graphics/nested/CMakeLists.txt 2017-05-08 03:04:26 +0000
+++ src/platforms/mir/CMakeLists.txt 2017-06-19 15:01:38 +0000
@@ -1,7 +1,16 @@
1add_definitions(-DMIR_SERVER_GRAPHICS_PLATFORM_VERSION="${MIR_SERVER_GRAPHICS_PLATFORM_VERSION}")
2
1include_directories(3include_directories(
4 ${PROJECT_SOURCE_DIR}/include/client
5 ${PROJECT_SOURCE_DIR}/include/platform
2 ${PROJECT_SOURCE_DIR}/include/renderers/gl6 ${PROJECT_SOURCE_DIR}/include/renderers/gl
3 ${PROJECT_SOURCE_DIR}/include/platforms/mesa7 ${PROJECT_SOURCE_DIR}/include/platforms/mesa
4 ${PROJECT_SOURCE_DIR}/include/platforms/common8 ${PROJECT_SOURCE_DIR}/include/platforms/common
9 ${PROJECT_SOURCE_DIR}/src/include/common # TODO platforms should not depend on private headers
10 ${PROJECT_SOURCE_DIR}/src/include/platform # TODO platforms should not depend on private headers
11 ${PROJECT_SOURCE_DIR}/src/include/client # TODO platforms should not depend on private headers
12 ${PROJECT_SOURCE_DIR}/include/server # TODO platforms should not depend on server
13 ${PROJECT_SOURCE_DIR}/src/include/server # TODO platforms should not depend on private headers
5)14)
615
7add_library(16add_library(
@@ -18,3 +27,35 @@
18 ipc_operations.cpp27 ipc_operations.cpp
19 host_buffer.cpp28 host_buffer.cpp
20)29)
30
31add_library(mirplatformgraphicsnested SHARED
32 $<TARGET_OBJECTS:mirnestedgraphics>
33 $<TARGET_OBJECTS:mirgl>
34)
35
36target_link_libraries(
37 mirplatformgraphicsnested
38
39 server_platform_common
40 mirplatform
41 mirclient
42 ${EGL_LDFLAGS} ${EGL_LIBRARIES}
43 ${GLESv2_LDFLAGS} ${GLESv2_LIBRARIES}
44 ${Boost_PROGRAM_OPTIONS_LIBRARY}
45)
46
47configure_file(${CMAKE_CURRENT_SOURCE_DIR}/symbols.map.in
48 ${CMAKE_CURRENT_BINARY_DIR}/symbols.map)
49set(symbol_map ${CMAKE_CURRENT_BINARY_DIR}/symbols.map)
50
51set_target_properties(
52 mirplatformgraphicsnested PROPERTIES
53 OUTPUT_NAME server-mir
54 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/server-modules
55 PREFIX ""
56 SUFFIX ".so.${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"
57 LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}"
58 LINK_DEPENDS ${symbol_map}
59)
60
61install(TARGETS mirplatformgraphicsnested LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH})
2162
=== modified file 'src/platforms/mir/cursor.cpp'
--- src/server/graphics/nested/cursor.cpp 2017-05-08 03:04:26 +0000
+++ src/platforms/mir/cursor.cpp 2017-06-19 15:01:38 +0000
@@ -24,9 +24,8 @@
24namespace mgn = mir::graphics::nested;24namespace mgn = mir::graphics::nested;
25namespace geom = mir::geometry;25namespace geom = mir::geometry;
2626
27mgn::Cursor::Cursor(std::shared_ptr<HostConnection> const& host_connection, std::shared_ptr<mg::CursorImage> const& default_image)27mgn::Cursor::Cursor(std::shared_ptr<HostConnection> const& host_connection)
28 : connection(host_connection),28 : connection(host_connection)
29 default_image(default_image)
30{29{
31}30}
3231
@@ -43,11 +42,6 @@
43 connection->set_cursor_image(cursor_image);42 connection->set_cursor_image(cursor_image);
44}43}
4544
46void mgn::Cursor::show()
47{
48 connection->set_cursor_image(*default_image);
49}
50
51void mgn::Cursor::hide()45void mgn::Cursor::hide()
52{46{
53 connection->hide_cursor();47 connection->hide_cursor();
5448
=== modified file 'src/platforms/mir/cursor.h'
--- src/server/graphics/nested/cursor.h 2016-01-29 08:18:22 +0000
+++ src/platforms/mir/cursor.h 2017-06-19 15:01:38 +0000
@@ -31,18 +31,16 @@
31class Cursor : public graphics::Cursor31class Cursor : public graphics::Cursor
32{32{
33public:33public:
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);
35 ~Cursor();35 ~Cursor();
3636
37 void show(CursorImage const& image) override;37 void show(CursorImage const& image) override;
38 void show() override;38
39
40 void hide() override;39 void hide() override;
4140
42 void move_to(geometry::Point position) override;41 void move_to(geometry::Point position) override;
43private:42private:
44 std::shared_ptr<HostConnection> const connection;43 std::shared_ptr<HostConnection> const connection;
45 std::shared_ptr<CursorImage> const default_image;
46};44};
47}45}
48}46}
4947
=== modified file 'src/platforms/mir/display.cpp'
--- src/server/graphics/nested/display.cpp 2017-05-31 17:56:19 +0000
+++ src/platforms/mir/display.cpp 2017-06-19 15:01:38 +0000
@@ -17,6 +17,7 @@
17 */17 */
1818
19#include "display.h"19#include "display.h"
20#include "cursor.h"
20#include "nested_display_configuration.h"21#include "nested_display_configuration.h"
21#include "display_buffer.h"22#include "display_buffer.h"
22#include "host_connection.h"23#include "host_connection.h"
@@ -365,8 +366,7 @@
365366
366auto mgn::Display::create_hardware_cursor() -> std::shared_ptr<mg::Cursor>367auto mgn::Display::create_hardware_cursor() -> std::shared_ptr<mg::Cursor>
367{368{
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);
369 // So we can't do this: return std::make_shared<Cursor>(connection);
370}370}
371371
372std::unique_ptr<mg::VirtualOutput> mgn::Display::create_virtual_output(int /*width*/, int /*height*/)372std::unique_ptr<mg::VirtualOutput> mgn::Display::create_virtual_output(int /*width*/, int /*height*/)
373373
=== modified file 'src/platforms/mir/platform.cpp'
--- src/server/graphics/nested/platform.cpp 2017-06-09 14:16:54 +0000
+++ src/platforms/mir/platform.cpp 2017-06-19 15:01:38 +0000
@@ -19,13 +19,24 @@
19#include "platform.h"19#include "platform.h"
20#include "host_connection.h"20#include "host_connection.h"
21#include "display.h"21#include "display.h"
22#include "mir_client_host_connection.h"
22#include "buffer.h"23#include "buffer.h"
23#include "native_buffer.h"24#include "native_buffer.h"
24#include "ipc_operations.h"25#include "ipc_operations.h"
25#include "mir/shared_library.h"26#include "mir/shared_library.h"
27#include "mir/module_deleter.h"
28#include "mir/options/option.h"
29#include "mir/options/configuration.h"
30#include "mir/options/program_option.h"
31#include "mir/options/default_configuration.h"
26#include "mir/graphics/graphic_buffer_allocator.h"32#include "mir/graphics/graphic_buffer_allocator.h"
27#include "mir/graphics/display.h"33#include "mir/graphics/display.h"
28#include "mir/graphics/platform_ipc_operations.h"34#include "mir/graphics/platform_ipc_operations.h"
35#include "mir/input/platform.h"
36#include "input_platform.h"
37#include "mir/libname.h"
38#include "mir/assert_module_entry_point.h"
39#include "mir/abnormal_exit.h"
29#include "mir/options/option.h"40#include "mir/options/option.h"
30#include "mir/options/configuration.h"41#include "mir/options/configuration.h"
31#include "mir/graphics/buffer_ipc_message.h"42#include "mir/graphics/buffer_ipc_message.h"
@@ -34,6 +45,7 @@
34#include "mir/graphics/platform_authentication_wrapper.h"45#include "mir/graphics/platform_authentication_wrapper.h"
35#include "mir/renderer/gl/egl_platform.h"46#include "mir/renderer/gl/egl_platform.h"
3647
48namespace mi = mir::input;
37namespace mg = mir::graphics;49namespace mg = mir::graphics;
38namespace mgn = mir::graphics::nested;50namespace mgn = mir::graphics::nested;
39namespace mo = mir::options;51namespace mo = mir::options;
@@ -222,3 +234,125 @@
222{234{
223 return display_platform->extensions();235 return display_platform->extensions();
224}236}
237
238namespace
239{
240std::shared_ptr<mgn::MirClientHostConnection> global_conn = nullptr;
241
242mir::ModuleProperties const graphics_description = {
243 "mir:mir",
244 MIR_VERSION_MAJOR,
245 MIR_VERSION_MINOR,
246 MIR_VERSION_MICRO,
247 mir::libname()
248};
249
250mir::ModuleProperties const input_description = {
251 "mir:mir-input",
252 MIR_VERSION_MAJOR,
253 MIR_VERSION_MINOR,
254 MIR_VERSION_MICRO,
255 mir::libname()
256};
257}
258
259mir::UniqueModulePtr<mg::Platform> create_host_platform(
260 std::shared_ptr<mo::Option> const& options,
261 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,
262 std::shared_ptr<mir::graphics::DisplayReport> const& display_report,
263 std::shared_ptr<mir::logging::Logger> const&,
264 std::shared_ptr<mir::shell::HostLifecycleEventListener> const& host_lifecycle_event_listener)
265{
266 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);
267
268 if (!options->is_set(mo::host_socket_opt))
269 BOOST_THROW_EXCEPTION(mir::AbnormalExit(
270 std::string("Exiting Mir! Reason: Nested Mir needs either $MIR_SOCKET or --") +
271 mo::host_socket_opt));
272
273 auto host_socket = options->get<std::string>(mo::host_socket_opt);
274
275 std::string server_socket{"none"};
276
277 if (!options->is_set(mir::options::no_server_socket_opt))
278 {
279 server_socket = options->get<std::string>(mo::server_socket_opt);
280
281 if (server_socket == host_socket)
282 BOOST_THROW_EXCEPTION(mir::AbnormalExit(
283 "Exiting Mir! Reason: Nested Mir and Host Mir cannot use "
284 "the same socket file to accept connections!"));
285 }
286
287 auto const my_name = options->is_set(mo::name_opt) ?
288 options->get<std::string>(mo::name_opt) :
289 "nested-mir@:" + server_socket;
290
291 auto connection = std::make_shared<mgn::MirClientHostConnection>(
292 host_socket,
293 my_name,
294 host_lifecycle_event_listener);
295
296 auto const platform_library = std::make_shared<mir::SharedLibrary>(connection->graphics_platform_library());
297
298 auto const buffer_platform = std::make_shared<mgn::NestedBufferPlatform>(
299 platform_library, connection, display_report, options);
300
301 global_conn = connection;
302 return mir::make_module_ptr<mgn::Platform>(
303 buffer_platform,
304 std::make_unique<mgn::NestedDisplayPlatform>(buffer_platform, connection, display_report, *options));
305}
306
307void add_graphics_platform_options(boost::program_options::options_description&)
308{
309 mir::assert_entry_point_signature<mg::AddPlatformOptions>(&add_graphics_platform_options);
310}
311
312mg::PlatformPriority probe_graphics_platform(mo::ProgramOption const& options)
313{
314 mir::assert_entry_point_signature<mg::PlatformProbe>(&probe_graphics_platform);
315
316 bool option_present = false;
317 for (auto &s : options.unparsed_command_line())
318 option_present |= (s.find(mo::host_socket_opt) != std::string::npos);
319 option_present |= options.is_set(mo::host_socket_opt);
320 option_present |= (nullptr != getenv("MIR_SERVER_HOST_SOCKET"));
321
322 if (option_present)
323 return mg::PlatformPriority::requested;
324 else
325 return mg::PlatformPriority::unsupported;
326}
327
328mir::ModuleProperties const* describe_graphics_module()
329{
330 mir::assert_entry_point_signature<mg::DescribeModule>(&describe_graphics_module);
331 return &graphics_description;
332}
333
334mi::PlatformPriority probe_input_platform(
335 mo::Option const& options)
336{
337 mir::assert_entry_point_signature<mi::ProbePlatform>(&probe_input_platform);
338 if (options.is_set("host-socket"))
339 return mi::PlatformPriority::best;
340 return mi::PlatformPriority::unsupported;
341}
342
343mir::UniqueModulePtr<mi::Platform> create_input_platform(
344 mo::Option const& /*options*/,
345 std::shared_ptr<mir::EmergencyCleanupRegistry> const& /*emergency_cleanup_registry*/,
346 std::shared_ptr<mi::InputDeviceRegistry> const& input_device_registry,
347 std::shared_ptr<mi::InputReport> const& input_report)
348{
349 mir::assert_entry_point_signature<mi::CreatePlatform>(&create_input_platform);
350 return mir::make_module_ptr<mgn::InputPlatform>(global_conn, input_device_registry, input_report);
351}
352
353mir::ModuleProperties const* describe_input_module()
354{
355 mir::assert_entry_point_signature<mi::DescribeModule>(&describe_input_module);
356 return &input_description;
357}
358
225359
=== added file 'src/platforms/mir/symbols.map.in'
--- src/platforms/mir/symbols.map.in 1970-01-01 00:00:00 +0000
+++ src/platforms/mir/symbols.map.in 2017-06-19 15:01:38 +0000
@@ -0,0 +1,20 @@
1@MIR_SERVER_GRAPHICS_PLATFORM_VERSION@ {
2 global:
3 add_graphics_platform_options;
4 create_host_platform;
5 create_guest_platform;
6 probe_graphics_platform;
7 describe_graphics_module;
8 local:
9 *;
10};
11
12@MIR_SERVER_INPUT_PLATFORM_VERSION@ {
13 global:
14 add_input_platform_options;
15 create_input_platform;
16 probe_input_platform;
17 describe_input_module;
18 local:
19 *;
20};
021
=== modified file 'src/server/CMakeLists.txt'
--- src/server/CMakeLists.txt 2017-05-08 03:04:26 +0000
+++ src/server/CMakeLists.txt 2017-06-19 15:01:38 +0000
@@ -81,7 +81,6 @@
81 $<TARGET_OBJECTS:mirreport>81 $<TARGET_OBJECTS:mirreport>
82 $<TARGET_OBJECTS:mirlogging>82 $<TARGET_OBJECTS:mirlogging>
83 $<TARGET_OBJECTS:mirnullreport>83 $<TARGET_OBJECTS:mirnullreport>
84 $<TARGET_OBJECTS:mirnestedgraphics>
85 $<TARGET_OBJECTS:miroffscreengraphics>84 $<TARGET_OBJECTS:miroffscreengraphics>
86 $<TARGET_OBJECTS:mirthread>85 $<TARGET_OBJECTS:mirthread>
8786
8887
=== modified file 'src/server/graphics/CMakeLists.txt'
--- src/server/graphics/CMakeLists.txt 2017-05-08 03:04:26 +0000
+++ src/server/graphics/CMakeLists.txt 2017-06-19 15:01:38 +0000
@@ -8,13 +8,10 @@
88
9 default_configuration.cpp9 default_configuration.cpp
10 default_display_configuration_policy.cpp10 default_display_configuration_policy.cpp
11 gl_extensions_base.cpp
12 surfaceless_egl_context.cpp
13 software_cursor.cpp11 software_cursor.cpp
14 ${PROJECT_SOURCE_DIR}/include/server/mir/graphics/display_configuration_observer.h12 ${PROJECT_SOURCE_DIR}/include/server/mir/graphics/display_configuration_observer.h
15 display_configuration_observer_multiplexer.cpp13 display_configuration_observer_multiplexer.cpp
16 display_configuration_observer_multiplexer.h14 display_configuration_observer_multiplexer.h
17)15)
1816
19add_subdirectory(nested/)
20add_subdirectory(offscreen/)17add_subdirectory(offscreen/)
2118
=== modified file 'src/server/graphics/default_configuration.cpp'
--- src/server/graphics/default_configuration.cpp 2017-05-31 17:56:19 +0000
+++ src/server/graphics/default_configuration.cpp 2017-06-19 15:01:38 +0000
@@ -22,16 +22,14 @@
2222
23#include "mir/graphics/default_display_configuration_policy.h"23#include "mir/graphics/default_display_configuration_policy.h"
24#include "mir/graphics/graphic_buffer_allocator.h"24#include "mir/graphics/graphic_buffer_allocator.h"
25#include "nested/mir_client_host_connection.h"25#include "mir/renderer/gl/egl_platform.h"
26#include "nested/cursor.h"
27#include "nested/display.h"
28#include "nested/platform.h"
29#include "offscreen/display.h"26#include "offscreen/display.h"
30#include "software_cursor.h"27#include "software_cursor.h"
3128
32#include "mir/graphics/gl_config.h"29#include "mir/graphics/gl_config.h"
33#include "mir/graphics/platform.h"30#include "mir/graphics/platform.h"
34#include "mir/graphics/cursor.h"31#include "mir/graphics/cursor.h"
32#include "mir/graphics/display.h"
35#include "mir/graphics/platform_probe.h"33#include "mir/graphics/platform_probe.h"
36#include "display_configuration_observer_multiplexer.h"34#include "display_configuration_observer_multiplexer.h"
3735
@@ -52,7 +50,6 @@
5250
53namespace mg = mir::graphics;51namespace mg = mir::graphics;
54namespace ml = mir::logging;52namespace ml = mir::logging;
55namespace mgn = mir::graphics::nested;
5653
57std::shared_ptr<mg::DisplayConfigurationPolicy>54std::shared_ptr<mg::DisplayConfigurationPolicy>
58mir::DefaultServerConfiguration::the_display_configuration_policy()55mir::DefaultServerConfiguration::the_display_configuration_policy()
@@ -81,21 +78,6 @@
81 std::stringstream error_report;78 std::stringstream error_report;
82 try79 try
83 {80 {
84 // if a host socket is set we should use the host graphics module to create a "guest" platform
85 if (the_options()->is_set(options::host_socket_opt))
86 {
87 auto const host_connection = the_host_connection();
88
89 platform_library = std::make_shared<mir::SharedLibrary>(host_connection->graphics_platform_library());
90 auto buffer_platform = std::make_shared<mgn::NestedBufferPlatform>(
91 platform_library, host_connection, the_display_report(), the_options());
92 return std::make_shared<mgn::Platform>(
93 buffer_platform,
94 std::make_unique<mgn::NestedDisplayPlatform>(
95 buffer_platform, host_connection, the_display_report(), *the_options()));
96 }
97
98 // fallback to standalone if host socket is unset
99 if (the_options()->is_set(options::platform_graphics_lib))81 if (the_options()->is_set(options::platform_graphics_lib))
100 {82 {
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));
@@ -124,7 +106,12 @@
124 description->minor_version,106 description->minor_version,
125 description->micro_version);107 description->micro_version);
126108
127 return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report(), the_logger());109 return create_host_platform(
110 the_options(),
111 the_emergency_cleanup(),
112 the_display_report(),
113 the_logger(),
114 the_host_lifecycle_event_listener());
128 }115 }
129 catch(...)116 catch(...)
130 {117 {
@@ -186,14 +173,7 @@
186173
187 auto cursor_choice = the_options()->get<std::string>(options::cursor_opt);174 auto cursor_choice = the_options()->get<std::string>(options::cursor_opt);
188175
189 if (the_options()->is_set(options::host_socket_opt))176 if (cursor_choice != "software" &&
190 {
191 mir::log_info("Using nested cursor");
192 primary_cursor = std::make_shared<mgn::Cursor>(
193 the_host_connection(),
194 the_default_cursor_image());
195 }
196 else if (cursor_choice != "software" &&
197 (primary_cursor = the_display()->create_hardware_cursor()))177 (primary_cursor = the_display()->create_hardware_cursor()))
198 {178 {
199 mir::log_info("Using hardware cursor");179 mir::log_info("Using hardware cursor");
@@ -217,51 +197,6 @@
217 return wrapped;197 return wrapped;
218}198}
219199
220auto mir::DefaultServerConfiguration::the_host_connection()
221-> std::shared_ptr<graphics::nested::HostConnection>
222{
223 return the_mir_client_host_connection();
224}
225
226auto mir::DefaultServerConfiguration::the_mir_client_host_connection()
227-> std::shared_ptr<graphics::nested::MirClientHostConnection>
228{
229 return host_connection(
230 [this]()
231 {
232 auto const options = the_options();
233
234 if (!options->is_set(options::host_socket_opt))
235 BOOST_THROW_EXCEPTION(mir::AbnormalExit(
236 std::string("Exiting Mir! Reason: Nested Mir needs either $MIR_SOCKET or --") +
237 options::host_socket_opt));
238
239 auto host_socket = options->get<std::string>(options::host_socket_opt);
240
241 std::string server_socket{"none"};
242
243 if (!the_options()->is_set(options::no_server_socket_opt))
244 {
245 server_socket = the_socket_file();
246
247 if (server_socket == host_socket)
248 BOOST_THROW_EXCEPTION(mir::AbnormalExit(
249 "Exiting Mir! Reason: Nested Mir and Host Mir cannot use "
250 "the same socket file to accept connections!"));
251 }
252
253 auto const my_name = options->is_set(options::name_opt) ?
254 options->get<std::string>(options::name_opt) :
255 "nested-mir@:" + server_socket;
256
257 return std::make_shared<graphics::nested::MirClientHostConnection>(
258 host_socket,
259 my_name,
260 the_host_lifecycle_event_listener()
261 );
262 });
263}
264
265std::shared_ptr<mg::GLConfig>200std::shared_ptr<mg::GLConfig>
266mir::DefaultServerConfiguration::the_gl_config()201mir::DefaultServerConfiguration::the_gl_config()
267{202{
268203
=== modified file 'src/server/graphics/software_cursor.cpp'
--- src/server/graphics/software_cursor.cpp 2017-05-08 03:04:26 +0000
+++ src/server/graphics/software_cursor.cpp 2017-06-19 15:01:38 +0000
@@ -129,18 +129,6 @@
129 hide();129 hide();
130}130}
131131
132void mg::SoftwareCursor::show()
133{
134 bool needs_scene_change = false;
135 {
136 std::lock_guard<std::mutex> lg{guard};
137 if (!visible)
138 visible = needs_scene_change = true;
139 }
140 if (needs_scene_change && renderable)
141 scene->add_input_visualization(renderable);
142}
143
144void mg::SoftwareCursor::show(CursorImage const& cursor_image)132void mg::SoftwareCursor::show(CursorImage const& cursor_image)
145{133{
146 std::shared_ptr<detail::CursorRenderable> new_renderable;134 std::shared_ptr<detail::CursorRenderable> new_renderable;
147135
=== modified file 'src/server/graphics/software_cursor.h'
--- src/server/graphics/software_cursor.h 2015-06-17 05:20:42 +0000
+++ src/server/graphics/software_cursor.h 2017-06-19 15:01:38 +0000
@@ -45,7 +45,6 @@
45 std::shared_ptr<input::Scene> const& scene);45 std::shared_ptr<input::Scene> const& scene);
46 ~SoftwareCursor();46 ~SoftwareCursor();
4747
48 void show() override;
49 void show(CursorImage const& cursor_image) override;48 void show(CursorImage const& cursor_image) override;
50 void hide() override;49 void hide() override;
51 void move_to(geometry::Point position) override;50 void move_to(geometry::Point position) override;
5251
=== modified file 'src/server/input/default_configuration.cpp'
--- src/server/input/default_configuration.cpp 2017-05-25 08:58:03 +0000
+++ src/server/input/default_configuration.cpp 2017-06-19 15:01:38 +0000
@@ -32,7 +32,6 @@
32#include "surface_input_dispatcher.h"32#include "surface_input_dispatcher.h"
33#include "basic_seat.h"33#include "basic_seat.h"
34#include "seat_observer_multiplexer.h"34#include "seat_observer_multiplexer.h"
35#include "../graphics/nested/input_platform.h"
3635
37#include "mir/input/touch_visualizer.h"36#include "mir/input/touch_visualizer.h"
38#include "mir/input/input_probe.h"37#include "mir/input/input_probe.h"
@@ -56,7 +55,6 @@
56namespace mr = mir::report;55namespace mr = mir::report;
57namespace ms = mir::scene;56namespace ms = mir::scene;
58namespace mg = mir::graphics;57namespace mg = mir::graphics;
59namespace mgn = mg::nested;
60namespace msh = mir::shell;58namespace msh = mir::shell;
61namespace md = mir::dispatch;59namespace md = mir::dispatch;
6260
@@ -200,16 +198,6 @@
200 {198 {
201 return std::make_shared<mi::NullInputManager>();199 return std::make_shared<mi::NullInputManager>();
202 }200 }
203 else if (options->is_set(options::host_socket_opt))
204 {
205 auto const device_registry = the_input_device_registry();
206 auto const input_report = the_input_report();
207
208 // TODO: move this into a nested graphics platform
209 auto platform = std::make_shared<mgn::InputPlatform>(the_host_connection(), device_registry, input_report);
210
211 return std::make_shared<mi::DefaultInputManager>(the_input_reading_multiplexer(), std::move(platform));
212 }
213 else201 else
214 {202 {
215 auto const emergency_cleanup = the_emergency_cleanup();203 auto const emergency_cleanup = the_emergency_cleanup();
216204
=== modified file 'src/server/symbols.map'
--- src/server/symbols.map 2017-05-08 03:04:26 +0000
+++ src/server/symbols.map 2017-06-19 15:01:38 +0000
@@ -866,7 +866,6 @@
866 mir::DefaultServerConfiguration::the_gl_config*;866 mir::DefaultServerConfiguration::the_gl_config*;
867 mir::DefaultServerConfiguration::the_global_event_sink*;867 mir::DefaultServerConfiguration::the_global_event_sink*;
868 mir::DefaultServerConfiguration::the_graphics_platform*;868 mir::DefaultServerConfiguration::the_graphics_platform*;
869 mir::DefaultServerConfiguration::the_host_connection*;
870 mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*;869 mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*;
871 mir::DefaultServerConfiguration::the_input_configuration_changer*;870 mir::DefaultServerConfiguration::the_input_configuration_changer*;
872 mir::DefaultServerConfiguration::the_input_device_hub*;871 mir::DefaultServerConfiguration::the_input_device_hub*;
873872
=== modified file 'tests/acceptance-tests/test_nested_mir.cpp'
--- tests/acceptance-tests/test_nested_mir.cpp 2017-05-08 03:04:26 +0000
+++ tests/acceptance-tests/test_nested_mir.cpp 2017-06-19 15:01:38 +0000
@@ -115,7 +115,8 @@
115115
116struct MockCursor : public mtd::StubCursor116struct MockCursor : public mtd::StubCursor
117{117{
118MOCK_METHOD1(show, void(mg::CursorImage const&));118 MOCK_METHOD1(show, void(mg::CursorImage const&));
119 MOCK_METHOD0(hide, void());
119};120};
120121
121struct MockHostLifecycleEventListener : msh::HostLifecycleEventListener122struct MockHostLifecycleEventListener : msh::HostLifecycleEventListener
@@ -200,22 +201,13 @@
200struct CursorWrapper : mg::Cursor201struct CursorWrapper : mg::Cursor
201{202{
202 CursorWrapper(std::shared_ptr<mg::Cursor> const& wrapped) : wrapped{wrapped} {}203 CursorWrapper(std::shared_ptr<mg::Cursor> const& wrapped) : wrapped{wrapped} {}
203 void show() override { if (!hidden) wrapped->show(); }204 void show(mg::CursorImage const& cursor_image) override { wrapped->show(cursor_image); }
204 void show(mg::CursorImage const& cursor_image) override { if (!hidden) wrapped->show(cursor_image); }
205 void hide() override { wrapped->hide(); }205 void hide() override { wrapped->hide(); }
206206
207 void move_to(geom::Point position) override { wrapped->move_to(position); }207 void move_to(geom::Point position) override { wrapped->move_to(position); }
208208
209 void set_hidden(bool hidden)
210 {
211 this->hidden = hidden;
212 if (hidden) hide();
213 else show();
214 }
215
216private:209private:
217 std::shared_ptr<mg::Cursor> const wrapped;210 std::shared_ptr<mg::Cursor> const wrapped;
218 bool hidden{false};
219};211};
220212
221struct MockDisplayConfigurationPolicy : mg::DisplayConfigurationPolicy213struct MockDisplayConfigurationPolicy : mg::DisplayConfigurationPolicy
@@ -264,6 +256,7 @@
264256
265 virtual ~NestedMirRunner()257 virtual ~NestedMirRunner()
266 {258 {
259 cursor_wrapper.reset();
267 stop_server();260 stop_server();
268 }261 }
269262
@@ -1051,9 +1044,9 @@
1051 condition.wait_for(timeout);1044 condition.wait_for(timeout);
1052 Mock::VerifyAndClearExpectations(mock_cursor.get());1045 Mock::VerifyAndClearExpectations(mock_cursor.get());
10531046
1054 nested_mir.cursor_wrapper->set_hidden(true);1047 EXPECT_CALL(*mock_cursor, hide()).Times(AtLeast(1));
10551048
1056 EXPECT_CALL(*mock_cursor, show(_)).Times(0);1049 nested_mir.cursor_wrapper->hide();
10571050
1058 for (int i = 0; i != frames; ++i)1051 for (int i = 0; i != frames; ++i)
1059 {1052 {
10601053
=== modified file 'tests/include/mir/test/doubles/stub_host_connection.h'
--- tests/include/mir/test/doubles/stub_host_connection.h 2017-06-09 14:16:54 +0000
+++ tests/include/mir/test/doubles/stub_host_connection.h 2017-06-19 15:01:38 +0000
@@ -19,12 +19,14 @@
19#ifndef MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_19#ifndef MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_
20#define MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_20#define MIR_TEST_DOUBLES_STUB_HOST_CONNECTION_H_
2121
22#include "src/server/graphics/nested/host_connection.h"
23#include "src/server/graphics/nested/host_surface.h"
24#include "src/server/graphics/nested/host_stream.h"
25#include "src/server/graphics/nested/host_chain.h"
26#include "src/server/graphics/nested/host_surface_spec.h"
27#include "src/client/display_configuration.h"22#include "src/client/display_configuration.h"
23#include "src/platforms/mir/host_connection.h"
24#include "src/platforms/mir/host_surface.h"
25#include "src/platforms/mir/host_connection.h"
26#include "src/platforms/mir/host_surface.h"
27#include "src/platforms/mir/host_stream.h"
28#include "src/platforms/mir/host_chain.h"
29#include "src/platforms/mir/host_surface_spec.h"
28#include "src/include/client/mir/input/input_devices.h"30#include "src/include/client/mir/input/input_devices.h"
29#include "mir/graphics/platform_operation_message.h"31#include "mir/graphics/platform_operation_message.h"
3032
3133
=== modified file 'tests/mir_test_framework/headless_nested_server_runner.cpp'
--- tests/mir_test_framework/headless_nested_server_runner.cpp 2017-05-08 03:04:26 +0000
+++ tests/mir_test_framework/headless_nested_server_runner.cpp 2017-06-19 15:01:38 +0000
@@ -25,7 +25,7 @@
25mtf::HeadlessNestedServerRunner::HeadlessNestedServerRunner(std::string const& connect_string) :25mtf::HeadlessNestedServerRunner::HeadlessNestedServerRunner(std::string const& connect_string) :
26 passthrough_tracker(std::make_shared<mtf::PassthroughTracker>())26 passthrough_tracker(std::make_shared<mtf::PassthroughTracker>())
27{27{
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());
29 add_to_environment("MIR_SERVER_HOST_SOCKET", connect_string.c_str());29 add_to_environment("MIR_SERVER_HOST_SOCKET", connect_string.c_str());
30 server.override_the_display_buffer_compositor_factory([this]30 server.override_the_display_buffer_compositor_factory([this]
31 {31 {
3232
=== modified file 'tests/mir_test_framework/platform_graphics_throw.cpp'
--- tests/mir_test_framework/platform_graphics_throw.cpp 2017-06-09 11:19:23 +0000
+++ tests/mir_test_framework/platform_graphics_throw.cpp 2017-06-19 15:01:38 +0000
@@ -55,7 +55,7 @@
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"};
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");
5757
58 stub_platform = create_stub_platform(nullptr, nullptr, nullptr, nullptr);58 stub_platform = create_stub_platform(nullptr, nullptr, nullptr, nullptr, nullptr);
59 }59 }
6060
61 mir::UniqueModulePtr<mg::GraphicBufferAllocator> create_buffer_allocator() override61 mir::UniqueModulePtr<mg::GraphicBufferAllocator> create_buffer_allocator() override
@@ -170,7 +170,8 @@
170 std::shared_ptr<mo::Option> const&,170 std::shared_ptr<mo::Option> const&,
171 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,171 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,
172 std::shared_ptr<mg::DisplayReport> const&,172 std::shared_ptr<mg::DisplayReport> const&,
173 std::shared_ptr<mir::logging::Logger> const&)173 std::shared_ptr<mir::logging::Logger> const&,
174 std::shared_ptr<mir::shell::HostLifecycleEventListener> const&)
174{175{
175 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);176 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);
176 return mir::make_module_ptr<ExceptionThrowingPlatform>();177 return mir::make_module_ptr<ExceptionThrowingPlatform>();
177178
=== modified file 'tests/mir_test_framework/stubbed_graphics_platform.cpp'
--- tests/mir_test_framework/stubbed_graphics_platform.cpp 2017-06-09 11:19:23 +0000
+++ tests/mir_test_framework/stubbed_graphics_platform.cpp 2017-06-19 15:01:38 +0000
@@ -357,7 +357,8 @@
357 std::shared_ptr<mo::Option> const&,357 std::shared_ptr<mo::Option> const&,
358 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,358 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,
359 std::shared_ptr<mg::DisplayReport> const&,359 std::shared_ptr<mg::DisplayReport> const&,
360 std::shared_ptr<mir::logging::Logger> const&)360 std::shared_ptr<mir::logging::Logger> const&,
361 std::shared_ptr<mir::shell::HostLifecycleEventListener> const&)
361{362{
362 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);363 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);
363 std::shared_ptr<mg::Platform> result{};364 std::shared_ptr<mg::Platform> result{};
364365
=== modified file 'tests/unit-tests/graphics/test_software_cursor.cpp'
--- tests/unit-tests/graphics/test_software_cursor.cpp 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/graphics/test_software_cursor.cpp 2017-06-19 15:01:38 +0000
@@ -199,25 +199,6 @@
199 cursor.move_to({22,23});199 cursor.move_to({22,23});
200}200}
201201
202TEST_F(SoftwareCursor, multiple_shows_just_show)
203{
204 using namespace testing;
205
206 InSequence s;
207 EXPECT_CALL(mock_input_scene, add_input_visualization(_));
208
209 EXPECT_CALL(mock_input_scene, remove_input_visualization(_));
210 EXPECT_CALL(mock_input_scene, add_input_visualization(_));
211
212 EXPECT_CALL(mock_input_scene, remove_input_visualization(_)); // removal on destruction
213
214 cursor.show(stub_cursor_image);
215 cursor.hide();
216 cursor.show();
217 cursor.show();
218}
219
220
221TEST_F(SoftwareCursor, creates_renderable_with_filled_buffer)202TEST_F(SoftwareCursor, creates_renderable_with_filled_buffer)
222{203{
223 using namespace testing;204 using namespace testing;
224205
=== modified file 'tests/unit-tests/input/CMakeLists.txt'
--- tests/unit-tests/input/CMakeLists.txt 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/input/CMakeLists.txt 2017-06-19 15:01:38 +0000
@@ -16,7 +16,6 @@
16 ${CMAKE_CURRENT_SOURCE_DIR}/test_seat_input_device_tracker.cpp16 ${CMAKE_CURRENT_SOURCE_DIR}/test_seat_input_device_tracker.cpp
17 ${CMAKE_CURRENT_SOURCE_DIR}/test_key_repeat_dispatcher.cpp17 ${CMAKE_CURRENT_SOURCE_DIR}/test_key_repeat_dispatcher.cpp
18 ${CMAKE_CURRENT_SOURCE_DIR}/test_validator.cpp18 ${CMAKE_CURRENT_SOURCE_DIR}/test_validator.cpp
19 ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_input_platform.cpp
20)19)
2120
22list(APPEND UMOCK_UNIT_TEST_SOURCES21list(APPEND UMOCK_UNIT_TEST_SOURCES
2322
=== modified file 'tests/unit-tests/platforms/mesa/kms/test_cursor.cpp'
--- tests/unit-tests/platforms/mesa/kms/test_cursor.cpp 2017-06-07 08:29:04 +0000
+++ tests/unit-tests/platforms/mesa/kms/test_cursor.cpp 2017-06-19 15:01:38 +0000
@@ -760,7 +760,7 @@
760 output_container.verify_and_clear_expectations();760 output_container.verify_and_clear_expectations();
761761
762 EXPECT_CALL(*output_container.outputs[0], set_cursor(_));762 EXPECT_CALL(*output_container.outputs[0], set_cursor(_));
763 cursor.show();763 cursor.show(stub_image);
764}764}
765765
766TEST_F(MesaCursorTest, show_cursor_sets_cursor_with_hotspot)766TEST_F(MesaCursorTest, show_cursor_sets_cursor_with_hotspot)
767767
=== modified file 'tests/unit-tests/platforms/nested/CMakeLists.txt'
--- tests/unit-tests/platforms/nested/CMakeLists.txt 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/platforms/nested/CMakeLists.txt 2017-06-19 15:01:38 +0000
@@ -5,11 +5,13 @@
5 ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_cursor.cpp5 ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_cursor.cpp
6 ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer.cpp6 ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer.cpp
7 ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_display_buffer.cpp7 ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_display_buffer.cpp
8 ${CMAKE_CURRENT_SOURCE_DIR}/test_nested_input_platform.cpp
8 ${CMAKE_CURRENT_SOURCE_DIR}/test_ipc_operations.cpp9 ${CMAKE_CURRENT_SOURCE_DIR}/test_ipc_operations.cpp
9 ${CMAKE_CURRENT_SOURCE_DIR}/test_host_buffer.cpp10 ${CMAKE_CURRENT_SOURCE_DIR}/test_host_buffer.cpp
10 $<TARGET_OBJECTS:mir-test-doubles-udev>11 $<TARGET_OBJECTS:mir-test-doubles-udev>
11 ${MIR_PLATFORM_OBJECTS}12 ${MIR_PLATFORM_OBJECTS}
12 ${MIR_SERVER_OBJECTS}13 ${MIR_SERVER_OBJECTS}
14 $<TARGET_OBJECTS:mirnestedgraphics>
13)15)
1416
15target_link_libraries(17target_link_libraries(
1618
=== modified file 'tests/unit-tests/platforms/nested/test_buffer.cpp'
--- tests/unit-tests/platforms/nested/test_buffer.cpp 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/platforms/nested/test_buffer.cpp 2017-06-19 15:01:38 +0000
@@ -16,8 +16,11 @@
16 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>16 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17 */17 */
1818
19#include "src/server/graphics/nested/native_buffer.h"19#include "src/platforms/mir/buffer.h"
20#include "src/server/graphics/nested/buffer.h"20#include "src/platforms/mir/native_buffer.h"
21#include "src/platforms/mir/buffer.h"
22#include "src/platforms/mir/native_buffer.h"
23#include "src/platforms/mir/buffer.h"
21#include "src/client/buffer.h"24#include "src/client/buffer.h"
22#include "mir/graphics/buffer_properties.h"25#include "mir/graphics/buffer_properties.h"
23#include "mir/test/doubles/stub_host_connection.h"26#include "mir/test/doubles/stub_host_connection.h"
2427
=== modified file 'tests/unit-tests/platforms/nested/test_host_buffer.cpp'
--- tests/unit-tests/platforms/nested/test_host_buffer.cpp 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/platforms/nested/test_host_buffer.cpp 2017-06-19 15:01:38 +0000
@@ -16,7 +16,7 @@
16 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>16 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17 */17 */
1818
19#include "src/server/graphics/nested/host_buffer.h"19#include "src/platforms/mir/host_buffer.h"
20#include "src/client/default_connection_configuration.h"20#include "src/client/default_connection_configuration.h"
21#include "src/client/mir_connection.h"21#include "src/client/mir_connection.h"
22#include "src/client/buffer_factory.h"22#include "src/client/buffer_factory.h"
2323
=== modified file 'tests/unit-tests/platforms/nested/test_ipc_operations.cpp'
--- tests/unit-tests/platforms/nested/test_ipc_operations.cpp 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/platforms/nested/test_ipc_operations.cpp 2017-06-19 15:01:38 +0000
@@ -16,8 +16,8 @@
16 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>16 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17 */17 */
1818
19#include "src/server/graphics/nested/ipc_operations.h"19#include "src/platforms/mir/ipc_operations.h"
20#include "src/server/graphics/nested/native_buffer.h"20#include "src/platforms/mir/native_buffer.h"
21#include "mir/test/doubles/stub_buffer.h"21#include "mir/test/doubles/stub_buffer.h"
22#include "mir/test/doubles/mock_buffer_ipc_message.h"22#include "mir/test/doubles/mock_buffer_ipc_message.h"
23#include "mir/test/doubles/mock_platform_ipc_operations.h"23#include "mir/test/doubles/mock_platform_ipc_operations.h"
2424
=== modified file 'tests/unit-tests/platforms/nested/test_nested_cursor.cpp'
--- tests/unit-tests/platforms/nested/test_nested_cursor.cpp 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/platforms/nested/test_nested_cursor.cpp 2017-06-19 15:01:38 +0000
@@ -16,7 +16,7 @@
16 * Authored by: Robert Carr <robert.carr@canonical.com>16 * Authored by: Robert Carr <robert.carr@canonical.com>
17 */17 */
1818
19#include "src/server/graphics/nested/cursor.h"19#include "src/platforms/mir/cursor.h"
20#include "mir/graphics/cursor_image.h"20#include "mir/graphics/cursor_image.h"
2121
22#include "mir/test/fake_shared.h"22#include "mir/test/fake_shared.h"
@@ -63,8 +63,8 @@
63{63{
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);
6565
66 mgn::Cursor cursor(connection, mt::fake_shared(a_cursor_image));66 mgn::Cursor cursor(connection);
67 cursor.show();67 cursor.show(a_cursor_image);
68}68}
6969
70TEST_F(NestedCursor, can_set_other_images)70TEST_F(NestedCursor, can_set_other_images)
@@ -72,7 +72,7 @@
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);
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);
7474
75 mgn::Cursor cursor(connection, mt::fake_shared(a_cursor_image));75 mgn::Cursor cursor(connection);
76 cursor.show(another_cursor_image);76 cursor.show(another_cursor_image);
77}77}
7878
@@ -83,8 +83,8 @@
83 EXPECT_CALL(*connection, hide_cursor()).Times(1);83 EXPECT_CALL(*connection, hide_cursor()).Times(1);
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);
8585
86 mgn::Cursor cursor(connection, mt::fake_shared(a_cursor_image));86 mgn::Cursor cursor(connection);
87 cursor.show();87 cursor.show(a_cursor_image);
88 cursor.hide();88 cursor.hide();
89 cursor.show(another_cursor_image);89 cursor.show(another_cursor_image);
90}90}
9191
=== modified file 'tests/unit-tests/platforms/nested/test_nested_display.cpp'
--- tests/unit-tests/platforms/nested/test_nested_display.cpp 2017-06-09 14:16:54 +0000
+++ tests/unit-tests/platforms/nested/test_nested_display.cpp 2017-06-19 15:01:38 +0000
@@ -16,9 +16,9 @@
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17 */17 */
1818
19#include "src/server/graphics/nested/display.h"19#include "src/platforms/mir/display.h"
20#include "src/server/graphics/nested/host_connection.h"20#include "src/platforms/mir/host_connection.h"
21#include "src/server/graphics/nested/host_surface.h"21#include "src/platforms/mir/host_surface.h"
22#include "src/server/report/null/display_report.h"22#include "src/server/report/null/display_report.h"
23#include "mir/graphics/default_display_configuration_policy.h"23#include "mir/graphics/default_display_configuration_policy.h"
24#include "src/server/input/null_input_dispatcher.h"24#include "src/server/input/null_input_dispatcher.h"
2525
=== modified file 'tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp'
--- tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/platforms/nested/test_nested_display_buffer.cpp 2017-06-19 15:01:38 +0000
@@ -16,11 +16,11 @@
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17 */17 */
1818
19#include "src/server/graphics/nested/display_buffer.h"19#include "src/platforms/mir/display_buffer.h"
20#include "src/server/graphics/nested/native_buffer.h"20#include "src/platforms/mir/native_buffer.h"
21#include "src/server/graphics/nested/host_stream.h"21#include "src/platforms/mir/host_stream.h"
22#include "src/server/graphics/nested/host_chain.h"22#include "src/platforms/mir/host_chain.h"
23#include "src/server/graphics/nested/host_surface_spec.h"23#include "src/platforms/mir/host_surface_spec.h"
2424
25#include "mir/events/event_builders.h"25#include "mir/events/event_builders.h"
2626
2727
=== modified file 'tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp'
--- tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-05-25 08:58:03 +0000
+++ tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-06-19 15:01:38 +0000
@@ -16,7 +16,7 @@
16 * Authored by: Alan Griffiths <alan@octopull.co.uk>16 * Authored by: Alan Griffiths <alan@octopull.co.uk>
17 */17 */
1818
19#include "src/server/graphics/nested/nested_display_configuration.h"19#include "src/platforms/mir/nested_display_configuration.h"
20#include "mir_display_configuration_builder.h"20#include "mir_display_configuration_builder.h"
21#include "mir_toolkit/mir_display_configuration.h"21#include "mir_toolkit/mir_display_configuration.h"
2222
2323
=== renamed file 'tests/unit-tests/input/test_nested_input_platform.cpp' => 'tests/unit-tests/platforms/nested/test_nested_input_platform.cpp'
--- tests/unit-tests/input/test_nested_input_platform.cpp 2017-05-08 03:04:26 +0000
+++ tests/unit-tests/platforms/nested/test_nested_input_platform.cpp 2017-06-19 15:01:38 +0000
@@ -16,7 +16,7 @@
16 * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com>16 * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com>
17 */17 */
1818
19#include "src/server/graphics/nested/input_platform.h"19#include "src/platforms/mir/input_platform.h"
20#include "src/server/report/null_report_factory.h"20#include "src/server/report/null_report_factory.h"
21#include "src/include/client/mir/input/input_devices.h"21#include "src/include/client/mir/input/input_devices.h"
22#include "src/server/input/default_event_builder.h"22#include "src/server/input/default_event_builder.h"
2323
=== modified file 'tools/update_package_abis.sh'
--- tools/update_package_abis.sh 2017-05-08 03:04:26 +0000
+++ tools/update_package_abis.sh 2017-06-19 15:01:38 +0000
@@ -21,6 +21,7 @@
21 mir-client-platform-mesa:MIR_CLIENT_PLATFORM_ABI \21 mir-client-platform-mesa:MIR_CLIENT_PLATFORM_ABI \
22 mir-platform-graphics-mesa-x:MIR_SERVER_GRAPHICS_PLATFORM_ABI \22 mir-platform-graphics-mesa-x:MIR_SERVER_GRAPHICS_PLATFORM_ABI \
23 mir-platform-graphics-mesa-kms:MIR_SERVER_GRAPHICS_PLATFORM_ABI \23 mir-platform-graphics-mesa-kms:MIR_SERVER_GRAPHICS_PLATFORM_ABI \
24 mir-platform-graphics-mir:MIR_SERVER_GRAPHICS_PLATFORM_ABI \
24 mir-platform-input-evdev:MIR_SERVER_INPUT_PLATFORM_ABI"25 mir-platform-input-evdev:MIR_SERVER_INPUT_PLATFORM_ABI"
2526
26package_name()27package_name()

Subscribers

People subscribed via source and target branches