Mir

Merge lp:~alan-griffiths/mir/discussion-migrate-demo-shell into lp:mir

Proposed by Alan Griffiths
Status: Rejected
Rejected by: Alan Griffiths
Proposed branch: lp:~alan-griffiths/mir/discussion-migrate-demo-shell
Merge into: lp:mir
Prerequisite: lp:~alan-griffiths/mir/migrate-render_surfaces
Diff against target: 559 lines (+97/-244)
15 files modified
CMakeLists.txt (+0/-1)
examples/CMakeLists.txt (+2/-0)
examples/demo-shell/CMakeLists.txt (+4/-1)
examples/demo-shell/demo_shell.cpp (+53/-90)
include/server/mir/default_server_configuration.h (+2/-1)
include/server/mir/server.h (+26/-3)
playground/CMakeLists.txt (+0/-16)
playground/README (+0/-6)
playground/server_configuration.cpp (+0/-72)
playground/server_configuration.h (+0/-50)
server-ABI-sha1sums (+2/-2)
src/server/server.cpp (+3/-0)
src/server/symbols.map (+3/-0)
tests/unit-tests/examples/test_demo_compositor.cpp (+1/-1)
tests/unit-tests/examples/test_demo_renderer.cpp (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/discussion-migrate-demo-shell
Reviewer Review Type Date Requested Status
Daniel van Vugt Needs Fixing
Alan Griffiths Needs Information
PS Jenkins bot (community) continuous-integration Needs Fixing
Kevin DuBois (community) Disapprove
Review via email: mp+244152@code.launchpad.net

Commit message

examples: update the demo-shell example to use the mir::Server API

Description of the change

examples: update the demo-shell example to use the mir::Server API

This involves exposing stuff that had been "privatized" and this might not be the best way to expose the functionality needed. Hence I'd like some discussion about whether this is justified.

To post a comment you must log in.
Revision history for this message
Kevin DuBois (kdub) wrote :

Our downstreams have been able to get along without our utility classes (
gl_program, gl_texture, gl_primitive, gl_renderer, etc) to this point, and re-exposing them exposes a lot of ABI that has been hidden and is not used. These classes are more utility classes of the way we've used GLES internally than a recommendation/suggestion to others as to how they should use GLES.

I think its possible to transition the demo shell from playground to examples with a bit of more in-depth "surgery" to have it target reimplementing our already-exposed /interfaces/ instead of overriding different components of utility classes.

review: Disapprove
2139. By Alan Griffiths

merge lp:mir

2140. By Alan Griffiths

merge lp:~alan-griffiths/mir/migrate-render_surfaces

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm pretty sure playground/ can access a superset of what examples/ can. That's why it exists.

So there's no reason to republish all those headers just yet, is there?

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Quoting the README:

    The Playground

    These are mir demos that excercise private in-flux mir functionality.
    As such functionality matures, related headers become public and the playground
    code may become an example of how to use such feature.

The reason for this MP is to drive a discussion of what is preventing users of our supported API doing what we do in the mir_demo_server_shell example.

As I see it the only real problem highlighted by this MP is that the DemoRenderer class that has been implemented using some of our private gl tools. That is I don't see that access to the_compositor_report() or the_input_scene() is a big deal.

So the question is: how do we serve our current and potential users better?

1. Provide an example of shell decorations etc that doesn't use Mir internals
2. Design a way for users to implement shell decorations that we're happy to publish
3. Ignore the issue

Using our private gl tools isn't the only implementation option and (as Kevin says) our existing downstreams haven't found a need for this approach. It would be good to have an example that is more like what we expect users to do.

review: Needs Information
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Definitely this migration is something that will have to happen in future. I was leaning toward keeping things as private as possible for as long as possible. That means I expected to keep much of this private (so we can freely change interfaces) until such time as some new shell developer asks us to expose parts. Putting things in the public API prematurely and then having to change them is a painful issue we keep encountering. So I'd prefer to keep as much as possible private for as long as possible to minimize the problem. We all share the goal of wanting releases in future that don't bump the server ABI, so letting it stabilize privately still feels like a good idea to me...

On a more practical note:
(1) Needs Fixing: mir_demo_server_shell now crashes immediately on startup.

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

OK, I didn't really think this would land in this form - I was more interested in highlighting the gaps between what we our supported API allows and what we believe reasonable Mir users would want to do.

Unmerged revisions

2140. By Alan Griffiths

merge lp:~alan-griffiths/mir/migrate-render_surfaces

2139. By Alan Griffiths

merge lp:mir

2138. By Alan Griffiths

merge lp:~alan-griffiths/mir/migrate-render_surfaces/

2137. By Alan Griffiths

Move demo-shell to examples

2136. By Alan Griffiths

Publish headers referenced by demo shell

2135. By Alan Griffiths

Tidy up demo code

2134. By Alan Griffiths

Delete dead code

2133. By Alan Griffiths

BFI migration of demo shell away from legacy API

2132. By Alan Griffiths

merge lp:~alan-griffiths/mir/migrate-render_surfaces

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-12-05 03:26:03 +0000
+++ CMakeLists.txt 2014-12-10 12:04:19 +0000
@@ -191,7 +191,6 @@
191add_subdirectory(benchmarks/)191add_subdirectory(benchmarks/)
192add_subdirectory(tools/)192add_subdirectory(tools/)
193add_subdirectory(examples/)193add_subdirectory(examples/)
194add_subdirectory(playground/)
195add_subdirectory(guides/)194add_subdirectory(guides/)
196add_subdirectory(cmake/)195add_subdirectory(cmake/)
197196
198197
=== modified file 'examples/CMakeLists.txt'
--- examples/CMakeLists.txt 2014-12-10 12:04:19 +0000
+++ examples/CMakeLists.txt 2014-12-10 12:04:19 +0000
@@ -193,3 +193,5 @@
193install(TARGETS mir_demo_standalone_render_overlays193install(TARGETS mir_demo_standalone_render_overlays
194 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}194 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
195)195)
196
197add_subdirectory(demo-shell/)
196198
=== renamed directory 'playground/demo-shell' => 'examples/demo-shell'
=== modified file 'examples/demo-shell/CMakeLists.txt'
--- playground/demo-shell/CMakeLists.txt 2014-12-09 17:26:28 +0000
+++ examples/demo-shell/CMakeLists.txt 2014-12-10 12:04:19 +0000
@@ -1,3 +1,7 @@
1include_directories(
2 ${PROJECT_SOURCE_DIR}/examples/
3)
4
1add_library(demo-shell STATIC5add_library(demo-shell STATIC
2 demo_compositor.cpp6 demo_compositor.cpp
3 demo_renderer.cpp7 demo_renderer.cpp
@@ -11,7 +15,6 @@
11target_link_libraries(mir_demo_server_shell15target_link_libraries(mir_demo_server_shell
12 demo-shell16 demo-shell
13 mirserver17 mirserver
14 playgroundserverconfig
15 exampleserverconfig18 exampleserverconfig
16)19)
1720
1821
=== modified file 'examples/demo-shell/demo_shell.cpp'
--- playground/demo-shell/demo_shell.cpp 2014-12-09 17:26:28 +0000
+++ examples/demo-shell/demo_shell.cpp 2014-12-10 12:04:19 +0000
@@ -21,10 +21,11 @@
21#include "demo_compositor.h"21#include "demo_compositor.h"
22#include "window_manager.h"22#include "window_manager.h"
23#include "server_example_fullscreen_placement_strategy.h"23#include "server_example_fullscreen_placement_strategy.h"
24#include "../server_configuration.h"24#include "server_example_input_event_filter.h"
25#include "server_example_display_configuration_policy.h"
2526
26#include "mir/options/default_configuration.h"27#include "mir/server.h"
27#include "mir/run_mir.h"28#include "mir/options/option.h"
28#include "mir/report_exception.h"29#include "mir/report_exception.h"
29#include "mir/graphics/display.h"30#include "mir/graphics/display.h"
30#include "mir/input/composite_event_filter.h"31#include "mir/input/composite_event_filter.h"
@@ -48,6 +49,14 @@
48{49{
49namespace examples50namespace examples
50{51{
52class NestedLifecycleEventListener : public msh::HostLifecycleEventListener
53{
54public:
55 virtual void lifecycle_event_occurred(MirLifecycleState state) override
56 {
57 printf("Lifecycle event occurred : state = %d\n", state);
58 }
59};
5160
52class DisplayBufferCompositorFactory : public mc::DisplayBufferCompositorFactory61class DisplayBufferCompositorFactory : public mc::DisplayBufferCompositorFactory
53{62{
@@ -72,103 +81,57 @@
72 std::shared_ptr<mc::CompositorReport> const report;81 std::shared_ptr<mc::CompositorReport> const report;
73};82};
7483
75class DemoServerConfiguration : public mir::examples::ServerConfiguration84auto make_window_manager_for(Server& server)
85-> std::shared_ptr<mir::input::EventFilter>
76{86{
77public:87 auto const wm = std::make_shared<me::WindowManager>();
78 DemoServerConfiguration(int argc, char const* argv[],88 // We use this strange two stage initialization to avoid a circular dependency between the EventFilters
79 std::initializer_list<std::shared_ptr<mi::EventFilter>> const& filter_list)89 // and the SessionStore
80 : ServerConfiguration([argc, argv]90 server.add_init_callback([&]
81 {91 {
82 auto result = std::make_shared<mo::DefaultConfiguration>(argc, argv);92 server.the_composite_event_filter()->append(wm);
8393
84 namespace po = boost::program_options;94 wm->set_focus_controller(server.the_focus_controller());
8595 wm->set_display(server.the_display());
86 result->add_options()96 wm->set_compositor(server.the_compositor());
87 ("fullscreen-surfaces", "Make all surfaces fullscreen");97 wm->set_input_scene(server.the_input_scene());
8898 });
89 return result;99
90 }()),100 return wm;
91 filter_list(filter_list)101}
92 {
93 }
94
95
96 std::shared_ptr<compositor::DisplayBufferCompositorFactory> the_display_buffer_compositor_factory() override
97 {
98 return display_buffer_compositor_factory(
99 [this]()
100 {
101 return std::make_shared<me::DisplayBufferCompositorFactory>(
102 the_gl_program_factory(),
103 the_compositor_report());
104 });
105 }
106
107 std::shared_ptr<ms::PlacementStrategy> the_placement_strategy() override
108 {
109 return shell_placement_strategy(
110 [this]() -> std::shared_ptr<ms::PlacementStrategy>
111 {
112 if (the_options()->is_set("fullscreen-surfaces"))
113 return std::make_shared<me::FullscreenPlacementStrategy>(the_shell_display_layout());
114 else
115 return DefaultServerConfiguration::the_placement_strategy();
116 });
117 }
118
119 std::shared_ptr<mi::CompositeEventFilter> the_composite_event_filter() override
120 {
121 auto composite_filter = ServerConfiguration::the_composite_event_filter();
122 for (auto const& filter : filter_list)
123 composite_filter->append(filter);
124
125 return composite_filter;
126 }
127
128 class NestedLifecycleEventListener : public msh::HostLifecycleEventListener
129 {
130 public:
131 virtual void lifecycle_event_occurred(MirLifecycleState state) override
132 {
133 printf("Lifecycle event occurred : state = %d\n", state);
134 }
135 };
136
137 std::shared_ptr<msh::HostLifecycleEventListener> the_host_lifecycle_event_listener() override
138 {
139 return host_lifecycle_event_listener(
140 []()
141 {
142 return std::make_shared<NestedLifecycleEventListener>();
143 });
144 }
145
146private:
147 std::vector<std::shared_ptr<mi::EventFilter>> const filter_list;
148};
149
150}102}
151}103}
152104
153int main(int argc, char const* argv[])105int main(int argc, char const* argv[])
154try106try
155{107{
156 auto wm = std::make_shared<me::WindowManager>();108 mir::Server server;
157 me::DemoServerConfiguration config(argc, argv, {wm});109
158110 auto const quit_filter = me::make_quit_filter_for(server);
159 mir::run_mir(config, [&config, &wm](mir::DisplayServer&)111 auto const wm = me::make_window_manager_for(server);
112
113 me::add_display_configuration_options_to(server);
114 me::add_fullscreen_option_to(server);
115
116 server.override_the_host_lifecycle_event_listener([]
117 {
118 return std::make_shared<me::NestedLifecycleEventListener>();
119 });
120
121 server.override_the_display_buffer_compositor_factory([&]
160 {122 {
161 // We use this strange two stage initialization to avoid a circular dependency between the EventFilters123 return std::make_shared<me::DisplayBufferCompositorFactory>(
162 // and the SessionStore124 server.the_gl_program_factory(),
163 wm->set_focus_controller(config.the_focus_controller());125 server.the_compositor_report());
164 wm->set_display(config.the_display());
165 wm->set_compositor(config.the_compositor());
166 wm->set_input_scene(config.the_input_scene());
167 });126 });
168 return 0;127
128 server.set_command_line(argc, argv);
129 server.apply_settings();
130 server.run();
131 return server.exited_normally() ? EXIT_SUCCESS : EXIT_FAILURE;
169}132}
170catch (...)133catch (...)
171{134{
172 mir::report_exception(std::cerr);135 mir::report_exception();
173 return 1;136 return EXIT_FAILURE;
174}137}
175138
=== renamed file 'src/include/platform/mir/graphics/gl_primitive.h' => 'include/platform/mir/graphics/gl_primitive.h'
=== renamed file 'src/include/platform/mir/graphics/gl_program.h' => 'include/platform/mir/graphics/gl_program.h'
=== renamed file 'src/include/platform/mir/graphics/gl_program_factory.h' => 'include/platform/mir/graphics/gl_program_factory.h'
=== renamed file 'src/include/platform/mir/graphics/gl_texture.h' => 'include/platform/mir/graphics/gl_texture.h'
=== renamed file 'src/include/platform/mir/graphics/gl_texture_cache.h' => 'include/platform/mir/graphics/gl_texture_cache.h'
=== renamed file 'src/include/server/mir/compositor/compositor_report.h' => 'include/server/mir/compositor/compositor_report.h'
=== renamed file 'src/include/server/mir/compositor/destination_alpha.h' => 'include/server/mir/compositor/destination_alpha.h'
=== renamed file 'src/include/server/mir/compositor/gl_renderer.h' => 'include/server/mir/compositor/gl_renderer.h'
=== renamed file 'src/include/server/mir/compositor/recently_used_cache.h' => 'include/server/mir/compositor/recently_used_cache.h'
=== renamed file 'src/include/server/mir/compositor/renderer.h' => 'include/server/mir/compositor/renderer.h'
=== renamed file 'src/include/server/mir/compositor/renderer_factory.h' => 'include/server/mir/compositor/renderer_factory.h'
=== modified file 'include/server/mir/default_server_configuration.h'
--- include/server/mir/default_server_configuration.h 2014-12-10 12:04:19 +0000
+++ include/server/mir/default_server_configuration.h 2014-12-10 12:04:19 +0000
@@ -320,10 +320,11 @@
320 virtual std::shared_ptr<time::Clock> the_clock();320 virtual std::shared_ptr<time::Clock> the_clock();
321 virtual std::shared_ptr<ServerActionQueue> the_server_action_queue();321 virtual std::shared_ptr<ServerActionQueue> the_server_action_queue();
322322
323 virtual std::shared_ptr<graphics::GLProgramFactory> the_gl_program_factory();
324
323protected:325protected:
324 std::shared_ptr<options::Option> the_options() const;326 std::shared_ptr<options::Option> the_options() const;
325327
326 virtual std::shared_ptr<graphics::GLProgramFactory> the_gl_program_factory();
327 virtual std::shared_ptr<input::InputChannelFactory> the_input_channel_factory();328 virtual std::shared_ptr<input::InputChannelFactory> the_input_channel_factory();
328 virtual std::shared_ptr<scene::MediatingDisplayChanger> the_mediating_display_changer();329 virtual std::shared_ptr<scene::MediatingDisplayChanger> the_mediating_display_changer();
329 virtual std::shared_ptr<frontend::ProtobufIpcFactory> new_ipc_factory(330 virtual std::shared_ptr<frontend::ProtobufIpcFactory> new_ipc_factory(
330331
=== renamed file 'src/include/server/mir/input/input_channel_factory.h' => 'include/server/mir/input/input_channel_factory.h'
=== renamed file 'src/include/server/mir/input/scene.h' => 'include/server/mir/input/scene.h'
=== modified file 'include/server/mir/server.h'
--- include/server/mir/server.h 2014-12-10 12:04:19 +0000
+++ include/server/mir/server.h 2014-12-10 12:04:19 +0000
@@ -27,10 +27,24 @@
2727
28namespace mir28namespace mir
29{29{
30namespace compositor { class Compositor; class DisplayBufferCompositorFactory; }30namespace compositor { class Compositor; class CompositorReport; class DisplayBufferCompositorFactory; }
31namespace frontend { class SessionAuthorizer; class Session; class SessionMediatorReport; }31namespace frontend { class SessionAuthorizer; class Session; class SessionMediatorReport; }
32namespace graphics { class Platform; class Display; class GLConfig; class DisplayConfigurationPolicy; }32namespace graphics
33namespace input { class CompositeEventFilter; class InputDispatcher; class CursorListener; class TouchVisualizer; }33{
34class Platform;
35class Display;
36class GLConfig;
37class GLProgramFactory;
38class DisplayConfigurationPolicy;
39}
40namespace input
41{
42class CompositeEventFilter;
43class CursorListener;
44class InputDispatcher;
45class Scene;
46class TouchVisualizer;
47}
34namespace logging { class Logger; }48namespace logging { class Logger; }
35namespace options { class Option; }49namespace options { class Option; }
36namespace shell { class FocusController; class FocusSetter; class DisplayLayout; class HostLifecycleEventListener; }50namespace shell { class FocusController; class FocusSetter; class DisplayLayout; class HostLifecycleEventListener; }
@@ -279,6 +293,9 @@
279 /// \return the composite event filter.293 /// \return the composite event filter.
280 auto the_composite_event_filter() const -> std::shared_ptr<input::CompositeEventFilter>;294 auto the_composite_event_filter() const -> std::shared_ptr<input::CompositeEventFilter>;
281295
296 /// \return the compositor report.
297 auto the_compositor_report() const -> std::shared_ptr<compositor::CompositorReport>;
298
282 /// \return the cursor listener.299 /// \return the cursor listener.
283 auto the_cursor_listener() const -> std::shared_ptr<input::CursorListener>;300 auto the_cursor_listener() const -> std::shared_ptr<input::CursorListener>;
284301
@@ -291,9 +308,15 @@
291 /// \return the GL config.308 /// \return the GL config.
292 auto the_gl_config() const -> std::shared_ptr<graphics::GLConfig>;309 auto the_gl_config() const -> std::shared_ptr<graphics::GLConfig>;
293310
311 /// \return the GL program factory.
312 auto the_gl_program_factory() const -> std::shared_ptr<graphics::GLProgramFactory>;
313
294 /// \return the graphics platform.314 /// \return the graphics platform.
295 auto the_graphics_platform() const -> std::shared_ptr<graphics::Platform>;315 auto the_graphics_platform() const -> std::shared_ptr<graphics::Platform>;
296316
317 /// \return the input scene
318 auto the_input_scene() const -> std::shared_ptr<input::Scene>;
319
297 /// \return the main loop.320 /// \return the main loop.
298 auto the_main_loop() const -> std::shared_ptr<MainLoop>;321 auto the_main_loop() const -> std::shared_ptr<MainLoop>;
299322
300323
=== removed directory 'playground'
=== removed file 'playground/CMakeLists.txt'
--- playground/CMakeLists.txt 2014-12-10 12:04:19 +0000
+++ playground/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
1
2include_directories(
3 ${PROJECT_SOURCE_DIR}/src/include/server
4 ${PROJECT_SOURCE_DIR}/src/include/platform
5 ${PROJECT_SOURCE_DIR}/src/include/common
6 ${PROJECT_SOURCE_DIR}/include/client
7 ${PROJECT_SOURCE_DIR}/include/server
8 ${PROJECT_SOURCE_DIR}/include/platform
9 ${PROJECT_SOURCE_DIR}/examples/
10)
11
12add_library(playgroundserverconfig STATIC
13 server_configuration.cpp
14)
15
16add_subdirectory(demo-shell/)
170
=== removed file 'playground/README'
--- playground/README 2014-09-10 01:45:14 +0000
+++ playground/README 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1The Playground
2
3These are mir demos that excercise private in-flux mir functionality.
4As such functionality matures, related headers become public and the playground
5code may become an example of how to use such feature.
6
70
=== removed file 'playground/server_configuration.cpp'
--- playground/server_configuration.cpp 2014-12-08 17:10:25 +0000
+++ playground/server_configuration.cpp 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
1/*
2 * Copyright © 2013-2014 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17 */
18
19#include "server_configuration.h"
20#include "mir/options/default_configuration.h"
21#include "mir/input/composite_event_filter.h"
22#include "mir/main_loop.h"
23
24#include "server_example_display_configuration_policy.h"
25#include "server_example_input_event_filter.h"
26
27namespace me = mir::examples;
28namespace mg = mir::graphics;
29
30me::ServerConfiguration::ServerConfiguration(std::shared_ptr<options::DefaultConfiguration> const& configuration_options) :
31 DefaultServerConfiguration(configuration_options)
32{
33 namespace po = boost::program_options;
34
35 configuration_options->add_options()
36 (me::display_config_opt, po::value<std::string>()->default_value(me::clone_opt_val),
37 me::display_config_descr);
38}
39
40me::ServerConfiguration::ServerConfiguration(int argc, char const** argv) :
41 ServerConfiguration(std::make_shared<options::DefaultConfiguration>(argc, argv))
42{
43}
44
45std::shared_ptr<mg::DisplayConfigurationPolicy>
46me::ServerConfiguration::the_display_configuration_policy()
47{
48 return display_configuration_policy(
49 [this]() -> std::shared_ptr<mg::DisplayConfigurationPolicy>
50 {
51 auto display_config = the_options()->get<std::string>(me::display_config_opt);
52
53 if (display_config == me::sidebyside_opt_val)
54 return std::make_shared<SideBySideDisplayConfigurationPolicy>();
55 else if (display_config == me::single_opt_val)
56 return std::make_shared<SingleDisplayConfigurationPolicy>();
57 else
58 return DefaultServerConfiguration::the_display_configuration_policy();
59 });
60}
61
62std::shared_ptr<mir::input::CompositeEventFilter>
63me::ServerConfiguration::the_composite_event_filter()
64{
65 if (!quit_filter)
66 quit_filter = std::make_shared<me::QuitFilter>([this] { the_main_loop()->stop(); });
67
68 auto composite_filter = DefaultServerConfiguration::the_composite_event_filter();
69 composite_filter->append(quit_filter);
70
71 return composite_filter;
72}
730
=== removed file 'playground/server_configuration.h'
--- playground/server_configuration.h 2014-10-15 11:15:21 +0000
+++ playground/server_configuration.h 1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
1/*
2 * Copyright © 2013-2014 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17 */
18
19#ifndef MIR_EXAMPLES_SERVER_CONFIGURATION_H_
20#define MIR_EXAMPLES_SERVER_CONFIGURATION_H_
21
22#include "mir/default_server_configuration.h"
23
24namespace mir
25{
26namespace options
27{
28class DefaultConfiguration;
29}
30
31namespace examples
32{
33
34class ServerConfiguration : public DefaultServerConfiguration
35{
36public:
37 ServerConfiguration(int argc, char const** argv);
38 explicit ServerConfiguration(std::shared_ptr<options::DefaultConfiguration> const& configuration_options);
39
40 std::shared_ptr<graphics::DisplayConfigurationPolicy> the_display_configuration_policy() override;
41 std::shared_ptr<input::CompositeEventFilter> the_composite_event_filter() override;
42
43private:
44 std::shared_ptr<input::EventFilter> quit_filter;
45};
46
47}
48}
49
50#endif /* MIR_EXAMPLES_SERVER_CONFIGURATION_H_ */
510
=== modified file 'server-ABI-sha1sums'
--- server-ABI-sha1sums 2014-12-10 12:04:19 +0000
+++ server-ABI-sha1sums 2014-12-10 12:04:19 +0000
@@ -55,7 +55,7 @@
55d49eae4f986645b32e29ce2c1f99f524703ba3c0 include/server/mir/compositor/display_buffer_compositor.h55d49eae4f986645b32e29ce2c1f99f524703ba3c0 include/server/mir/compositor/display_buffer_compositor.h
56878ab5c4007d16dac213a3eb0105421d8ffad206 include/server/mir/compositor/scene_element.h56878ab5c4007d16dac213a3eb0105421d8ffad206 include/server/mir/compositor/scene_element.h
574fcf34e424128b87ddc76733594e32e09ebbd486 include/server/mir/compositor/scene.h574fcf34e424128b87ddc76733594e32e09ebbd486 include/server/mir/compositor/scene.h
5827a9e95846f83126b6aed4f910188c6d2491c47c include/server/mir/default_server_configuration.h5881572766d104d97c29d41d03657190b7af114525 include/server/mir/default_server_configuration.h
59af1ff0714be973ac76d56006a2e5991f68cd1dec include/server/mir/display_server.h59af1ff0714be973ac76d56006a2e5991f68cd1dec include/server/mir/display_server.h
60a35c5495d8fd28fc0e375b17495fc5caab51b329 include/server/mir/emergency_cleanup.h60a35c5495d8fd28fc0e375b17495fc5caab51b329 include/server/mir/emergency_cleanup.h
61938de641cb0e01e1098b007b39b151a7dfe4adc1 include/server/mir/frontend/display_changer.h61938de641cb0e01e1098b007b39b151a7dfe4adc1 include/server/mir/frontend/display_changer.h
@@ -104,7 +104,7 @@
104587e22d751656ce2d9536afdf5659276ff9bbc46 include/server/mir/scene/surface_observer.h104587e22d751656ce2d9536afdf5659276ff9bbc46 include/server/mir/scene/surface_observer.h
1057ef3e99901168cda296d74d05a979f47bf9c3ff1 include/server/mir/server_action_queue.h1057ef3e99901168cda296d74d05a979f47bf9c3ff1 include/server/mir/server_action_queue.h
1068d83a51c278b8b71866d2178d9b6387c1f91a7d0 include/server/mir/server_configuration.h1068d83a51c278b8b71866d2178d9b6387c1f91a7d0 include/server/mir/server_configuration.h
107e56a255135af4099001b7e31f76530b40d3bd7fa include/server/mir/server.h1077861509c90830bd7127c74f83f92c1da77543eac include/server/mir/server.h
10886098b500339bfccd07a9bed8298f75a68b18f5c include/server/mir/server_status_listener.h10886098b500339bfccd07a9bed8298f75a68b18f5c include/server/mir/server_status_listener.h
109860c04f32b60e680140148dc9dc2295de145b9c1 include/server/mir/shell/display_layout.h109860c04f32b60e680140148dc9dc2295de145b9c1 include/server/mir/shell/display_layout.h
1106a2107b01feae13060d5c305804906e53c52e0be include/server/mir/shell/focus_controller.h1106a2107b01feae13060d5c305804906e53c52e0be include/server/mir/shell/focus_controller.h
111111
=== modified file 'src/server/server.cpp'
--- src/server/server.cpp 2014-12-10 12:04:19 +0000
+++ src/server/server.cpp 2014-12-10 12:04:19 +0000
@@ -67,10 +67,13 @@
67#define FOREACH_ACCESSOR(MACRO)\67#define FOREACH_ACCESSOR(MACRO)\
68 MACRO(the_compositor)\68 MACRO(the_compositor)\
69 MACRO(the_composite_event_filter)\69 MACRO(the_composite_event_filter)\
70 MACRO(the_compositor_report)\
70 MACRO(the_display)\71 MACRO(the_display)\
71 MACRO(the_focus_controller)\72 MACRO(the_focus_controller)\
72 MACRO(the_gl_config)\73 MACRO(the_gl_config)\
74 MACRO(the_gl_program_factory)\
73 MACRO(the_graphics_platform)\75 MACRO(the_graphics_platform)\
76 MACRO(the_input_scene)\
74 MACRO(the_main_loop)\77 MACRO(the_main_loop)\
75 MACRO(the_prompt_session_listener)\78 MACRO(the_prompt_session_listener)\
76 MACRO(the_session_authorizer)\79 MACRO(the_session_authorizer)\
7780
=== modified file 'src/server/symbols.map'
--- src/server/symbols.map 2014-12-10 12:04:19 +0000
+++ src/server/symbols.map 2014-12-10 12:04:19 +0000
@@ -443,11 +443,14 @@
443 mir::Server::supported_pixel_formats*;443 mir::Server::supported_pixel_formats*;
444 mir::Server::the_composite_event_filter*;444 mir::Server::the_composite_event_filter*;
445 mir::Server::the_compositor*;445 mir::Server::the_compositor*;
446 mir::Server::the_compositor_report*;
446 mir::Server::the_cursor_listener*;447 mir::Server::the_cursor_listener*;
447 mir::Server::the_display*;448 mir::Server::the_display*;
448 mir::Server::the_focus_controller*;449 mir::Server::the_focus_controller*;
449 mir::Server::the_gl_config*;450 mir::Server::the_gl_config*;
451 mir::Server::the_gl_program_factory*;
450 mir::Server::the_graphics_platform*;452 mir::Server::the_graphics_platform*;
453 mir::Server::the_input_scene*;
451 mir::Server::the_main_loop*;454 mir::Server::the_main_loop*;
452 mir::Server::the_prompt_session_listener*;455 mir::Server::the_prompt_session_listener*;
453 mir::Server::the_prompt_session_manager*;456 mir::Server::the_prompt_session_manager*;
454457
=== modified file 'tests/unit-tests/examples/test_demo_compositor.cpp'
--- tests/unit-tests/examples/test_demo_compositor.cpp 2014-12-05 03:26:03 +0000
+++ tests/unit-tests/examples/test_demo_compositor.cpp 2014-12-10 12:04:19 +0000
@@ -16,7 +16,7 @@
16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>16 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17 */17 */
1818
19#include "playground/demo-shell/demo_compositor.h"19#include "examples/demo-shell/demo_compositor.h"
2020
21#include "mir/geometry/rectangle.h"21#include "mir/geometry/rectangle.h"
22#include "mir/compositor/scene_element.h"22#include "mir/compositor/scene_element.h"
2323
=== modified file 'tests/unit-tests/examples/test_demo_renderer.cpp'
--- tests/unit-tests/examples/test_demo_renderer.cpp 2014-12-05 03:26:03 +0000
+++ tests/unit-tests/examples/test_demo_renderer.cpp 2014-12-10 12:04:19 +0000
@@ -21,7 +21,7 @@
21#include "mir_test_doubles/fake_renderable.h"21#include "mir_test_doubles/fake_renderable.h"
22#include "mir_test_doubles/stub_gl_program_factory.h"22#include "mir_test_doubles/stub_gl_program_factory.h"
23#include "mir_test_doubles/mock_gl.h"23#include "mir_test_doubles/mock_gl.h"
24#include "playground/demo-shell/demo_renderer.h"24#include "examples/demo-shell/demo_renderer.h"
25#include <gtest/gtest.h>25#include <gtest/gtest.h>
2626
27namespace mtd = mir::test::doubles;27namespace mtd = mir::test::doubles;

Subscribers

People subscribed via source and target branches