Mir

Merge lp:~raof/mir/actually-call-input-receiver-report into lp:mir

Proposed by Chris Halse Rogers on 2017-09-29
Status: Merged
Approved by: Brandon Schaefer on 2017-10-04
Approved revision: 4276
Merged at revision: 4279
Proposed branch: lp:~raof/mir/actually-call-input-receiver-report
Merge into: lp:mir
Diff against target: 279 lines (+45/-2)
9 files modified
src/client/default_connection_configuration.cpp (+1/-1)
src/client/rpc/make_rpc_channel.h (+6/-0)
src/client/rpc/make_socket_rpc_channel.cpp (+2/-1)
src/client/rpc/mir_protobuf_rpc_channel.cpp (+6/-0)
src/client/rpc/mir_protobuf_rpc_channel.h (+10/-0)
tests/include/mir/test/test_protobuf_client.h (+8/-0)
tests/mir_test_doubles/test_protobuf_client.cpp (+2/-0)
tests/unit-tests/client/test_protobuf_rpc_channel.cpp (+6/-0)
tests/unit-tests/frontend/stress_protobuf_communicator.cpp (+4/-0)
To merge this branch: bzr merge lp:~raof/mir/actually-call-input-receiver-report
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve on 2017-09-29
Alan Griffiths 2017-09-29 Approve on 2017-09-29
Review via email: mp+331587@code.launchpad.net

Commit message

input: Make the client InputReceiverReport work

By actually calling it during event processing"

To post a comment you must log in.
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4276
https://mir-jenkins.ubuntu.com/job/mir-ci/3712/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/5090
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5328
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5316
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5316
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5316
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5135
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5135/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5135
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5135/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5135
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5135/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5135
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5135/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5135
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5135/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5135
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5135/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/5135
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5135/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5135
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5135/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Brandon Schaefer (brandontschaefer) wrote :

Was stuck for 16 hours... on some strange jenkins issues. Restarting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/default_connection_configuration.cpp'
2--- src/client/default_connection_configuration.cpp 2017-07-28 17:00:43 +0000
3+++ src/client/default_connection_configuration.cpp 2017-09-29 16:27:00 +0000
4@@ -71,7 +71,7 @@
5 return mcl::rpc::make_rpc_channel(
6 the_socket_file(), the_surface_map(), the_buffer_factory(),
7 the_display_configuration(), the_input_devices(), the_rpc_report(),
8- the_lifecycle_control(), the_ping_handler(),
9+ the_input_receiver_report(), the_lifecycle_control(), the_ping_handler(),
10 the_error_handler(), the_event_sink());
11 });
12 }
13
14=== modified file 'src/client/rpc/make_rpc_channel.h'
15--- src/client/rpc/make_rpc_channel.h 2017-07-28 17:00:43 +0000
16+++ src/client/rpc/make_rpc_channel.h 2017-09-29 16:27:00 +0000
17@@ -29,6 +29,11 @@
18 namespace input
19 {
20 class InputDevices;
21+
22+namespace receiver
23+{
24+class InputReceiverReport;
25+}
26 }
27 namespace client
28 {
29@@ -50,6 +55,7 @@
30 std::shared_ptr<DisplayConfiguration> const& disp_conf,
31 std::shared_ptr<input::InputDevices> const& input_devices,
32 std::shared_ptr<RpcReport> const& rpc_report,
33+ std::shared_ptr<input::receiver::InputReceiverReport> const& input_report,
34 std::shared_ptr<LifecycleControl> const& lifecycle_control,
35 std::shared_ptr<PingHandler> const& ping_handler,
36 std::shared_ptr<ErrorHandler> const& error_handler,
37
38=== modified file 'src/client/rpc/make_socket_rpc_channel.cpp'
39--- src/client/rpc/make_socket_rpc_channel.cpp 2017-07-28 17:00:43 +0000
40+++ src/client/rpc/make_socket_rpc_channel.cpp 2017-09-29 16:27:00 +0000
41@@ -48,6 +48,7 @@
42 std::shared_ptr<mcl::DisplayConfiguration> const& disp_conf,
43 std::shared_ptr<input::InputDevices> const& input_devices,
44 std::shared_ptr<RpcReport> const& rpc_report,
45+ std::shared_ptr<input::receiver::InputReceiverReport> const& input_report,
46 std::shared_ptr<mcl::LifecycleControl> const& lifecycle_control,
47 std::shared_ptr<mcl::PingHandler> const& ping_handler,
48 std::shared_ptr<mcl::ErrorHandler> const& error_handler,
49@@ -65,6 +66,6 @@
50 }
51 return std::make_shared<MirProtobufRpcChannel>(
52 std::move(transport), map, buffer_factory, disp_conf,
53- input_devices, rpc_report, lifecycle_control, ping_handler,
54+ input_devices, rpc_report, input_report, lifecycle_control, ping_handler,
55 error_handler, event_sink);
56 }
57
58=== modified file 'src/client/rpc/mir_protobuf_rpc_channel.cpp'
59--- src/client/rpc/mir_protobuf_rpc_channel.cpp 2017-07-28 17:00:43 +0000
60+++ src/client/rpc/mir_protobuf_rpc_channel.cpp 2017-09-29 16:27:00 +0000
61@@ -18,6 +18,7 @@
62
63 #include "mir_protobuf_rpc_channel.h"
64 #include "rpc_report.h"
65+#include "mir/input/input_receiver_report.h"
66
67 #include "mir/client/surface_map.h"
68 #include "../buffer.h"
69@@ -61,12 +62,14 @@
70 std::shared_ptr<DisplayConfiguration> const& disp_config,
71 std::shared_ptr<input::InputDevices> const& input_devices,
72 std::shared_ptr<RpcReport> const& rpc_report,
73+ std::shared_ptr<input::receiver::InputReceiverReport> const& input_report,
74 std::shared_ptr<LifecycleControl> const& lifecycle_control,
75 std::shared_ptr<PingHandler> const& ping_handler,
76 std::shared_ptr<ErrorHandler> const& error_handler,
77 std::shared_ptr<EventSink> const& event_sink) :
78 rpc_report(rpc_report),
79 pending_calls(rpc_report),
80+ input_report(input_report),
81 surface_map(surface_map),
82 buffer_factory(buffer_factory),
83 display_configuration(disp_config),
84@@ -426,6 +429,7 @@
85 window_id = e->to_close_window()->surface_id();
86 break;
87 case mir_event_type_keymap:
88+ input_report->received_event(*e);
89 window_id = e->to_keymap()->surface_id();
90 break;
91 case mir_event_type_window_output:
92@@ -435,9 +439,11 @@
93 window_id = e->to_window_placement()->id();
94 break;
95 case mir_event_type_input:
96+ input_report->received_event(*e);
97 window_id = e->to_input()->window_id();
98 break;
99 case mir_event_type_input_device_state:
100+ input_report->received_event(*e);
101 window_id = e->to_input_device_state()->window_id();
102 break;
103 default:
104
105=== modified file 'src/client/rpc/mir_protobuf_rpc_channel.h'
106--- src/client/rpc/mir_protobuf_rpc_channel.h 2017-07-28 17:00:43 +0000
107+++ src/client/rpc/mir_protobuf_rpc_channel.h 2017-09-29 16:27:00 +0000
108@@ -39,6 +39,12 @@
109 namespace input
110 {
111 class InputDevices;
112+
113+namespace receiver
114+{
115+class InputReceiverReport;
116+}
117+
118 }
119 namespace client
120 {
121@@ -46,6 +52,7 @@
122 class SurfaceMap;
123 class EventSink;
124 class AsyncBufferFactory;
125+
126 namespace rpc
127 {
128
129@@ -63,6 +70,7 @@
130 std::shared_ptr<DisplayConfiguration> const& disp_config,
131 std::shared_ptr<input::InputDevices> const& input_devices,
132 std::shared_ptr<RpcReport> const& rpc_report,
133+ std::shared_ptr<input::receiver::InputReceiverReport> const& input_report,
134 std::shared_ptr<LifecycleControl> const& lifecycle_control,
135 std::shared_ptr<PingHandler> const& ping_handler,
136 std::shared_ptr<ErrorHandler> const& error_handler,
137@@ -105,6 +113,8 @@
138 std::shared_ptr<RpcReport> const rpc_report;
139 detail::PendingCallCache pending_calls;
140
141+ std::shared_ptr<input::receiver::InputReceiverReport> const input_report;
142+
143 std::mutex discard_mutex;
144 bool discard{false};
145
146
147=== modified file 'tests/include/mir/test/test_protobuf_client.h'
148--- tests/include/mir/test/test_protobuf_client.h 2017-07-28 17:00:43 +0000
149+++ tests/include/mir/test/test_protobuf_client.h 2017-09-29 16:27:00 +0000
150@@ -33,6 +33,13 @@
151
152 namespace mir
153 {
154+namespace input
155+{
156+namespace receiver
157+{
158+class NullInputReceiverReport;
159+}
160+}
161 namespace client
162 {
163 class SurfaceMap;
164@@ -53,6 +60,7 @@
165 TestProtobufClient(std::string socket_file, int timeout_ms);
166
167 std::shared_ptr<doubles::MockRpcReport> rpc_report;
168+ std::shared_ptr<input::receiver::NullInputReceiverReport> input_report;
169 std::shared_ptr<mir::client::SurfaceMap> surface_map;
170 std::shared_ptr<mir::client::rpc::MirBasicRpcChannel> channel;
171 std::shared_ptr<dispatch::ThreadedDispatcher> eventloop;
172
173=== modified file 'tests/mir_test_doubles/test_protobuf_client.cpp'
174--- tests/mir_test_doubles/test_protobuf_client.cpp 2017-07-28 17:00:43 +0000
175+++ tests/mir_test_doubles/test_protobuf_client.cpp 2017-09-29 16:27:00 +0000
176@@ -18,6 +18,7 @@
177
178 #include "mir/test/test_protobuf_client.h"
179 #include "mir/test/doubles/mock_rpc_report.h"
180+#include "mir/input/null_input_receiver_report.h"
181 #include "mir/test/doubles/null_client_event_sink.h"
182
183 #include "src/client/connection_surface_map.h"
184@@ -50,6 +51,7 @@
185 std::make_shared<mir::client::DisplayConfiguration>(),
186 std::make_shared<mir::input::InputDevices>(surface_map),
187 rpc_report,
188+ input_report,
189 std::make_shared<mir::client::LifecycleControl>(),
190 std::make_shared<mir::client::AtomicCallback<int32_t>>(),
191 std::make_shared<mir::client::AtomicCallback<MirError const*>>(),
192
193=== modified file 'tests/unit-tests/client/test_protobuf_rpc_channel.cpp'
194--- tests/unit-tests/client/test_protobuf_rpc_channel.cpp 2017-07-28 17:00:43 +0000
195+++ tests/unit-tests/client/test_protobuf_rpc_channel.cpp 2017-09-29 16:27:00 +0000
196@@ -31,6 +31,7 @@
197 #include "mir/client/surface_map.h"
198 #include "mir/input/input_devices.h"
199
200+#include "mir/input/null_input_receiver_report.h"
201 #include "mir/test/doubles/null_client_event_sink.h"
202 #include "mir/test/doubles/mock_mir_buffer_stream.h"
203 #include "mir/test/doubles/mock_client_buffer.h"
204@@ -248,6 +249,7 @@
205 std::make_shared<mcl::DisplayConfiguration>(),
206 std::make_shared<mir::input::InputDevices>(surface_map),
207 std::make_shared<mclr::NullRpcReport>(),
208+ std::make_shared<mir::input::receiver::NullInputReceiverReport>(),
209 lifecycle,
210 std::make_shared<mir::client::PingHandler>(),
211 std::make_shared<mir::client::ErrorHandler>(),
212@@ -404,6 +406,7 @@
213 std::make_shared<mcl::DisplayConfiguration>(),
214 std::make_shared<mir::input::InputDevices>(stream_map),
215 std::make_shared<mclr::NullRpcReport>(),
216+ std::make_shared<mir::input::receiver::NullInputReceiverReport>(),
217 lifecycle,
218 std::make_shared<mir::client::PingHandler>(),
219 std::make_shared<mir::client::ErrorHandler>(),
220@@ -760,6 +763,7 @@
221 std::make_shared<mcl::DisplayConfiguration>(),
222 std::make_shared<mir::input::InputDevices>(stream_map),
223 std::make_shared<mclr::NullRpcReport>(),
224+ std::make_shared<mir::input::receiver::NullInputReceiverReport>(),
225 lifecycle,
226 std::make_shared<mir::client::PingHandler>(),
227 std::make_shared<mir::client::ErrorHandler>(),
228@@ -798,6 +802,7 @@
229 std::make_shared<mcl::DisplayConfiguration>(),
230 std::make_shared<mir::input::InputDevices>(stream_map),
231 std::make_shared<mclr::NullRpcReport>(),
232+ std::make_shared<mir::input::receiver::NullInputReceiverReport>(),
233 lifecycle,
234 std::make_shared<mir::client::PingHandler>(),
235 std::make_shared<mir::client::ErrorHandler>(),
236@@ -834,6 +839,7 @@
237 std::make_shared<mcl::DisplayConfiguration>(),
238 std::make_shared<mir::input::InputDevices>(stream_map),
239 std::make_shared<mclr::NullRpcReport>(),
240+ std::make_shared<mir::input::receiver::NullInputReceiverReport>(),
241 lifecycle,
242 std::make_shared<mir::client::PingHandler>(),
243 std::make_shared<mir::client::ErrorHandler>(),
244
245=== modified file 'tests/unit-tests/frontend/stress_protobuf_communicator.cpp'
246--- tests/unit-tests/frontend/stress_protobuf_communicator.cpp 2017-07-28 17:00:43 +0000
247+++ tests/unit-tests/frontend/stress_protobuf_communicator.cpp 2017-09-29 16:27:00 +0000
248@@ -37,6 +37,7 @@
249 #include "src/client/rpc/mir_display_server.h"
250 #include "src/client/buffer_factory.h"
251 #include "mir/input/input_devices.h"
252+#include "mir/input/null_input_receiver_report.h"
253
254 #include <gtest/gtest.h>
255 #include <gmock/gmock.h>
256@@ -59,6 +60,7 @@
257 StubProtobufClient(std::string socket_file, int timeout_ms);
258
259 std::shared_ptr<mir::client::rpc::RpcReport> rpc_report;
260+ std::shared_ptr<mir::input::receiver::InputReceiverReport> input_report;
261 std::shared_ptr<mir::client::SurfaceMap> surface_map;
262 std::shared_ptr<mir::client::rpc::MirBasicRpcChannel> channel;
263 mir::client::rpc::DisplayServer display_server;
264@@ -163,6 +165,7 @@
265 std::string socket_file,
266 int timeout_ms) :
267 rpc_report(std::make_shared<mir::client::rpc::NullRpcReport>()),
268+ input_report(std::make_shared<mir::input::receiver::NullInputReceiverReport>()),
269 surface_map(std::make_shared<mir::client::ConnectionSurfaceMap>()),
270 channel(mir::client::rpc::make_rpc_channel(
271 socket_file,
272@@ -171,6 +174,7 @@
273 std::make_shared<mir::client::DisplayConfiguration>(),
274 std::make_shared<mir::input::InputDevices>(surface_map),
275 rpc_report,
276+ input_report,
277 std::make_shared<mir::client::LifecycleControl>(),
278 std::make_shared<mir::client::PingHandler>(),
279 std::make_shared<mir::client::ErrorHandler>(),

Subscribers

People subscribed via source and target branches