Mir

Merge lp:~mir-team/mir/pragma-deprecated-functions into lp:mir

Proposed by Brandon Schaefer
Status: Work in progress
Proposed branch: lp:~mir-team/mir/pragma-deprecated-functions
Merge into: lp:mir
Diff against target: 4858 lines (+1126/-37)
94 files modified
benchmarks/frame-uniformity/touch_measuring_client.cpp (+9/-0)
examples/animated_cursor_demo_client.c (+6/-0)
examples/basic.c (+12/-0)
examples/camera.c (+9/-0)
examples/client_helpers.cpp (+9/-0)
examples/client_touch_validator.cpp (+3/-0)
examples/cursors_demo_client.c (+3/-2)
examples/demo_client_display_config.c (+12/-0)
examples/eglapp.c (+12/-0)
examples/eglsquare.cpp (+6/-0)
examples/eglstateswitcher.c (+9/-0)
examples/fingerpaint.c (+16/-4)
examples/flicker.c (+9/-0)
examples/multi_stream.cpp (+6/-0)
examples/multiwin.c (+6/-0)
examples/pointer_confinement.c (+9/-0)
examples/progressbar.c (+6/-1)
examples/prompt_session.c (+3/-0)
examples/target.c (+6/-0)
examples/tooltip.c (+6/-0)
include/client/mir_toolkit/debug/surface.h (+8/-0)
include/client/mir_toolkit/mir_buffer_stream.h (+27/-4)
include/client/mir_toolkit/mir_connection.h (+24/-1)
include/client/mir_toolkit/mir_cursor_configuration.h (+3/-0)
include/client/mir_toolkit/mir_display_configuration.h (+6/-0)
include/client/mir_toolkit/mir_platform_message.h (+19/-0)
include/client/mir_toolkit/mir_screencast.h (+9/-0)
include/client/mir_toolkit/mir_surface.h (+69/-1)
include/core/mir_toolkit/common.h (+1/-0)
playground/eglflash_render_surface.c (+6/-0)
playground/render_surface.cpp (+3/-0)
src/client/mir_buffer_stream_api.cpp (+7/-1)
src/client/mir_connection.cpp (+9/-0)
src/platforms/android/utils/test_android_hardware_sanity.cpp (+9/-0)
src/platforms/mesa/client/client_platform.cpp (+6/-0)
src/server/graphics/nested/mir_client_host_connection.cpp (+42/-0)
src/utils/out.c (+7/-0)
src/utils/ping.c (+6/-0)
src/utils/screencast.cpp (+9/-0)
src/utils/vanity.c (+6/-0)
tests/acceptance-tests/test_buffer_stream_arrangement.cpp (+18/-0)
tests/acceptance-tests/test_client_cookie.cpp (+3/-0)
tests/acceptance-tests/test_client_focus_notification.cpp (+3/-0)
tests/acceptance-tests/test_client_input.cpp (+6/-1)
tests/acceptance-tests/test_client_library.cpp (+99/-2)
tests/acceptance-tests/test_client_library_callbacks.cpp (+3/-1)
tests/acceptance-tests/test_client_logging.cpp (+6/-0)
tests/acceptance-tests/test_client_platform_operation.cpp (+45/-1)
tests/acceptance-tests/test_client_scaling.cpp (+3/-0)
tests/acceptance-tests/test_client_screencast.cpp (+6/-0)
tests/acceptance-tests/test_client_surface_events.cpp (+51/-1)
tests/acceptance-tests/test_client_surface_swap_buffers.cpp (+6/-0)
tests/acceptance-tests/test_client_surface_visibility.cpp (+9/-0)
tests/acceptance-tests/test_client_surfaces.cpp (+21/-1)
tests/acceptance-tests/test_client_with_custom_display_config_deadlock.cpp (+3/-0)
tests/acceptance-tests/test_confined_pointer.cpp (+6/-0)
tests/acceptance-tests/test_custom_window_management.cpp (+3/-1)
tests/acceptance-tests/test_debug_api.cpp (+12/-0)
tests/acceptance-tests/test_display_configuration.cpp (+33/-1)
tests/acceptance-tests/test_latency.cpp (+15/-1)
tests/acceptance-tests/test_mirblob.cpp (+4/-1)
tests/acceptance-tests/test_nested_input.cpp (+6/-0)
tests/acceptance-tests/test_nested_mir.cpp (+54/-2)
tests/acceptance-tests/test_new_display_configuration.cpp (+3/-0)
tests/acceptance-tests/test_render_override.cpp (+3/-0)
tests/acceptance-tests/test_server_disconnect.cpp (+6/-0)
tests/acceptance-tests/test_session_mediator_report.cpp (+6/-0)
tests/acceptance-tests/test_surface_modifications.cpp (+15/-0)
tests/acceptance-tests/test_surface_morphing.cpp (+30/-0)
tests/acceptance-tests/test_surface_placement.cpp (+6/-0)
tests/acceptance-tests/test_surface_raise.cpp (+7/-1)
tests/acceptance-tests/test_surface_specification.cpp (+60/-0)
tests/acceptance-tests/test_surfaces_with_output_id.cpp (+3/-1)
tests/acceptance-tests/test_system_compositor_window_manager.cpp (+6/-0)
tests/acceptance-tests/throwback/test_client_cursor_api.cpp (+21/-4)
tests/acceptance-tests/throwback/test_client_library_errors.cpp (+6/-1)
tests/acceptance-tests/throwback/test_presentation_chain.cpp (+3/-0)
tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp (+6/-2)
tests/integration-tests/test_client_screencast.cpp (+15/-0)
tests/integration-tests/test_focus_selection.cpp (+3/-0)
tests/integration-tests/test_server_shutdown.cpp (+6/-0)
tests/integration-tests/test_stale_frames.cpp (+6/-0)
tests/integration-tests/test_submit_buffer.cpp (+3/-0)
tests/integration-tests/test_surface_first_frame_sync.cpp (+3/-0)
tests/integration-tests/test_swapinterval.cpp (+6/-0)
tests/mir_test/display_config_matchers.cpp (+3/-0)
tests/mir_test_framework/connected_client_with_a_surface.cpp (+4/-0)
tests/mir_test_framework/visible_surface.cpp (+3/-0)
tests/performance-tests/test_client_startup.cpp (+3/-0)
tests/privileged-tests/test_input_events.cpp (+3/-0)
tests/test-clients/impolite-shutdown/scroll.cpp (+12/-1)
tests/test-clients/mir-stress/src/client.cpp (+6/-0)
tests/unit-tests/client/test_mir_connection.cpp (+9/-0)
tests/unit-tests/platforms/mesa/client/test_client_platform.cpp (+12/-0)
To merge this branch: bzr merge lp:~mir-team/mir/pragma-deprecated-functions
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve
Daniel van Vugt Needs Resubmitting
Review via email: mp+309523@code.launchpad.net

Commit message

Deprecated functions and pragma the use of them internally so we can slowly move to the correct functions, while still releasing this so we can fix downstream projects.

Description of the change

Using this and expanding it to an actual compiling working branch that we plan on checking all downstream uses of mir to then fix them.

https://code.launchpad.net/~mir-team/mir/client-api-deprecation/+merge/309364

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oookay. This is getting out of hand.

You can avoid all:
   #pragma GCC diagnostic push/pop
by instead defining at the top level:
   -DMIR_SOURCE
and then only applying the deprecated attribute in the header ifndef MIR_SOURCE.
No pragmas required!

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

(1) Remove all the pragmas per above. Just don't apply the deprecated attribute unless "ifndef MIR_SOURCE" within the Mir source tree. Or use a different macro name like MIR_INTERNAL_ALLOW_DEPRECATED - that way we can more clearly undefine it for examples to be sure our examples at least are no longer using deprecated functions.

(2) Unconditionally returning success is wrong. We already know what failure looks like (it leaves the structure uninitialized):
+bool mir_buffer_stream_get_graphics_region(
+ return true;

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

Therefore the branch name also needs changing :)

Please resubmit under a new name and follow/prerequisite this approach:
   https://code.launchpad.net/~vanvugt/mir/deprecate-without-pragmas/+merge/309532

That will then let us do all this in a dozen or so lines of code rather than thousands.

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

> Therefore the branch name also needs changing :)
>
> Please resubmit under a new name and follow/prerequisite this approach:
> https://code.launchpad.net/~vanvugt/mir/deprecate-without-
> pragmas/+merge/309532
>
> That will then let us do all this in a dozen or so lines of code rather than
> thousands.

There are three cases to consider:

1. the implementation of a deprecated feature should compile (and will be deleted).
2. a test of a deprecated feature should compile (and will be deleted).
3. an "internal" use of a deprecated feature should /not/ compile "silently".

Both this approach and your alternative address cases 1 & 2.

Your alternative approach makes it much harder to identify and address case 3. An "internal" use should either be migrated to the proposed alternative or "flagged" (e.g. with a pragma) for migration *prior* to deleting the implementation.

First flagging everything with pragmas may be "noisier", but it gets us to a better place for managing migration.

3790. By Brandon Schaefer

* Merger trunk, fix compiling issues

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

PASSED: Continuous integration, rev:3790
https://mir-jenkins.ubuntu.com/job/mir-ci/2080/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/2667
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2730
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2722
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2722
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2722
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2696
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2696/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2696
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2696/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2696
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2696/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2696
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2696/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2696
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2696/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2696
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2696/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)

Unmerged revisions

3790. By Brandon Schaefer

* Merger trunk, fix compiling issues

3789. By Brandon Schaefer

* pragma around the functions we depend on but haved deprecated
* Move from [[deprecated]] to attribute since we need to support c99

3788. By Alberto Aguirre

Start deprecation of client side APIs

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'benchmarks/frame-uniformity/touch_measuring_client.cpp'
2--- benchmarks/frame-uniformity/touch_measuring_client.cpp 2015-06-17 05:20:42 +0000
3+++ benchmarks/frame-uniformity/touch_measuring_client.cpp 2016-10-28 13:38:48 +0000
4@@ -38,7 +38,10 @@
5 auto const spec = mir_connection_create_spec_for_normal_surface(
6 connection, 1024, 1024, pixel_format);
7 mir_surface_spec_set_name(spec, "frame-uniformity-test");
8+#pragma GCC diagnostic push
9+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
10 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
11+#pragma GCC diagnostic pop
12
13 auto surface = mir_surface_create_sync(spec);
14 mir_surface_spec_release(spec);
15@@ -61,7 +64,10 @@
16
17 void collect_input_and_frame_timing(MirSurface *surface, mt::Barrier& client_ready, std::chrono::high_resolution_clock::duration duration, std::shared_ptr<TouchSamples> const& results)
18 {
19+#pragma GCC diagnostic push
20+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
21 mir_surface_set_event_handler(surface, input_callback, results.get());
22+#pragma GCC diagnostic pop
23
24 client_ready.ready();
25
26@@ -69,7 +75,10 @@
27 auto end_time = std::chrono::high_resolution_clock::now() + duration;
28 while (std::chrono::high_resolution_clock::now() < end_time)
29 {
30+#pragma GCC diagnostic push
31+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
32 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
33+#pragma GCC diagnostic pop
34 results->record_frame_time(std::chrono::high_resolution_clock::now());
35 }
36 }
37
38=== modified file 'examples/animated_cursor_demo_client.c'
39--- examples/animated_cursor_demo_client.c 2016-10-21 07:53:23 +0000
40+++ examples/animated_cursor_demo_client.c 2016-10-28 13:38:48 +0000
41@@ -68,13 +68,19 @@
42
43 MirBufferStream* make_cursor_stream(MirConnection *connection, MirSurface *surface)
44 {
45+#pragma GCC diagnostic push
46+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
47 MirBufferStream* stream = mir_connection_create_buffer_stream_sync(connection,
48 24, 24, mir_pixel_format_argb_8888, mir_buffer_usage_software);
49+#pragma GCC diagnostic pop
50
51 animate_cursor(stream);
52
53 MirCursorConfiguration* conf = mir_cursor_configuration_from_buffer_stream(stream, 0, 0);
54+#pragma GCC diagnostic push
55+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
56 mir_wait_for(mir_surface_configure_cursor(surface, conf));
57+#pragma GCC diagnostic pop
58 mir_cursor_configuration_destroy(conf);
59
60 return stream;
61
62=== modified file 'examples/basic.c'
63--- examples/basic.c 2016-01-29 08:18:22 +0000
64+++ examples/basic.c 2016-10-28 13:38:48 +0000
65@@ -112,7 +112,10 @@
66 platform_package.data_items = -1;
67 platform_package.fd_items = -1;
68
69+#pragma GCC diagnostic push
70+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
71 mir_connection_get_platform(mcd.connection, &platform_package);
72+#pragma GCC diagnostic pop
73 assert(0 <= platform_package.data_items);
74 assert(0 <= platform_package.fd_items);
75 }
76@@ -120,7 +123,10 @@
77 {
78 MirModuleProperties properties = { NULL, -1, -1, -1, NULL };
79
80+#pragma GCC diagnostic push
81+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
82 mir_connection_get_graphics_module(mcd.connection, &properties);
83+#pragma GCC diagnostic pop
84
85 assert(NULL != properties.name);
86 assert(0 <= properties.major_version);
87@@ -160,8 +166,11 @@
88 else
89 assert(strcmp(mir_surface_get_error_message(mcd.surface), "") == 0);
90
91+#pragma GCC diagnostic push
92+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
93 MirBufferStream *bs =
94 mir_surface_get_buffer_stream(mcd.surface);
95+#pragma GCC diagnostic pop
96
97 // We can keep exchanging the current buffer for a new one
98 for (int i = 0; i < buffer_swap_count; i++)
99@@ -170,7 +179,10 @@
100 {
101 ///\internal [get_current_buffer_tag]
102 MirNativeBuffer* buffer_package = NULL;
103+#pragma GCC diagnostic push
104+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
105 mir_buffer_stream_get_current_buffer(bs, &buffer_package);
106+#pragma GCC diagnostic pop
107 assert(buffer_package != NULL);
108 MirGraphicsRegion graphics_region;
109 mir_buffer_stream_get_graphics_region(bs, &graphics_region);
110
111=== modified file 'examples/camera.c'
112--- examples/camera.c 2016-10-26 05:15:38 +0000
113+++ examples/camera.c 2016-10-28 13:38:48 +0000
114@@ -388,7 +388,10 @@
115 if (ultrafast)
116 {
117 pref = camera_pref_speed;
118+#pragma GCC diagnostic push
119+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
120 mir_surface_set_swapinterval(mir_eglapp_native_surface(), 0);
121+#pragma GCC diagnostic pop
122 }
123 Camera *cam = open_camera(dev_video, pref, 1);
124 if (!cam)
125@@ -470,7 +473,10 @@
126 PTHREAD_MUTEX_INITIALIZER,
127 true
128 };
129+#pragma GCC diagnostic push
130+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
131 mir_surface_set_event_handler(surface, on_event, &state);
132+#pragma GCC diagnostic pop
133
134 bool first_frame = true;
135 while (mir_eglapp_running())
136@@ -563,7 +569,10 @@
137 mir_eglapp_swap_buffers();
138 }
139
140+#pragma GCC diagnostic push
141+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
142 mir_surface_set_event_handler(surface, NULL, NULL);
143+#pragma GCC diagnostic pop
144 mir_eglapp_cleanup();
145 close_camera(cam);
146
147
148=== modified file 'examples/client_helpers.cpp'
149--- examples/client_helpers.cpp 2016-01-29 08:18:22 +0000
150+++ examples/client_helpers.cpp 2016-10-28 13:38:48 +0000
151@@ -100,12 +100,15 @@
152 }
153 }
154
155+#pragma GCC diagnostic push
156+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
157 return mir_connection_create_buffer_stream_sync(
158 connection,
159 width,
160 height,
161 selected_format,
162 hardware ? mir_buffer_usage_hardware : mir_buffer_usage_software);
163+#pragma GCC diagnostic pop
164 }
165
166 me::NormalSurface::NormalSurface(me::Connection& connection, unsigned int width, unsigned int height, bool prefers_alpha, bool hardware) :
167@@ -153,11 +156,16 @@
168 };
169
170 mir_surface_spec_set_name(spec.get(), __PRETTY_FUNCTION__);
171+#pragma GCC diagnostic push
172+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
173 mir_surface_spec_set_buffer_usage(spec.get(), hardware ? mir_buffer_usage_hardware : mir_buffer_usage_software);
174+#pragma GCC diagnostic pop
175 auto surface = mir_surface_create_sync(spec.get());
176 return surface;
177 }
178
179+#pragma GCC diagnostic push
180+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
181 me::Context::Context(Connection& connection, MirSurface* surface, int swap_interval) :
182 native_display(reinterpret_cast<EGLNativeDisplayType>(
183 mir_connection_get_egl_native_display(connection))),
184@@ -171,6 +179,7 @@
185 make_current();
186 eglSwapInterval(display.disp, swap_interval);
187 }
188+#pragma GCC diagnostic pop
189
190 void me::Context::make_current()
191 {
192
193=== modified file 'examples/client_touch_validator.cpp'
194--- examples/client_touch_validator.cpp 2016-10-21 07:53:23 +0000
195+++ examples/client_touch_validator.cpp 2016-10-28 13:38:48 +0000
196@@ -168,7 +168,10 @@
197 TouchState state;
198
199 MirSurface *surface = mir_eglapp_native_surface();
200+#pragma GCC diagnostic push
201+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
202 mir_surface_set_event_handler(surface, on_event, &state);
203+#pragma GCC diagnostic pop
204
205 float const opacity = mir_eglapp_background_opacity;
206 Color red = {opacity, 0.0f, 0.0f, opacity};
207
208=== modified file 'examples/cursors_demo_client.c'
209--- examples/cursors_demo_client.c 2016-10-21 07:53:23 +0000
210+++ examples/cursors_demo_client.c 2016-10-28 13:38:48 +0000
211@@ -48,9 +48,10 @@
212 size_t real_index = cursor_index % num_cursors;
213
214 MirCursorConfiguration *conf = mir_cursor_configuration_from_name(cursors[real_index]);
215-
216+#pragma GCC diagnostic push
217+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
218 mir_wait_for(mir_surface_configure_cursor(surface, conf));
219-
220+#pragma GCC diagnostic pop
221 mir_cursor_configuration_destroy(conf);
222 }
223
224
225=== modified file 'examples/demo_client_display_config.c'
226--- examples/demo_client_display_config.c 2016-10-21 07:53:23 +0000
227+++ examples/demo_client_display_config.c 2016-10-28 13:38:48 +0000
228@@ -97,7 +97,10 @@
229
230 static void print_current_configuration(MirConnection *connection)
231 {
232+#pragma GCC diagnostic push
233+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
234 MirDisplayConfiguration *conf = mir_connection_create_display_config(connection);
235+#pragma GCC diagnostic pop
236
237 for (uint32_t i = 0; i < conf->num_outputs; i++)
238 {
239@@ -124,7 +127,10 @@
240
241 static int apply_configuration(MirConnection *connection, MirDisplayConfiguration *conf)
242 {
243+#pragma GCC diagnostic push
244+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
245 MirWaitHandle* handle = mir_connection_apply_display_config(connection, conf);
246+#pragma GCC diagnostic pop
247 if (!handle)
248 {
249 printf("Failed to apply configuration, check that the configuration is valid.\n");
250@@ -250,8 +256,11 @@
251 static void configure_display(struct ClientContext *context, ConfigurationMode mode,
252 int mode_data)
253 {
254+#pragma GCC diagnostic push
255+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
256 MirDisplayConfiguration *conf =
257 mir_connection_create_display_config(context->connection);
258+#pragma GCC diagnostic pop
259
260 if (mode == configuration_mode_clone)
261 {
262@@ -368,7 +377,10 @@
263 mir_connection_set_display_config_change_callback(
264 connection, display_change_callback, &ctx);
265
266+#pragma GCC diagnostic push
267+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
268 mir_surface_set_event_handler(surface, event_callback, &ctx);
269+#pragma GCC diagnostic pop
270
271 time_t start = time(NULL);
272
273
274=== modified file 'examples/eglapp.c'
275--- examples/eglapp.c 2016-10-21 07:53:23 +0000
276+++ examples/eglapp.c 2016-10-28 13:38:48 +0000
277@@ -409,8 +409,11 @@
278 CHECK(ok, "Could not eglChooseConfig");
279 CHECK(neglconfigs > 0, "No EGL config available");
280
281+#pragma GCC diagnostic push
282+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
283 MirPixelFormat pixel_format =
284 mir_connection_get_egl_pixel_format(connection, egldisplay, eglconfig);
285+#pragma GCC diagnostic pop
286
287 printf("Mir chose pixel format %d.\n", pixel_format);
288 if (alpha_bits == 0)
289@@ -431,8 +434,11 @@
290
291 /* eglapps are interested in the screen size, so
292 use mir_connection_create_display_config */
293+#pragma GCC diagnostic push
294+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
295 MirDisplayConfiguration* display_config =
296 mir_connection_create_display_config(connection);
297+#pragma GCC diagnostic pop
298
299 const MirDisplayOutput *output = find_active_output(display_config);
300
301@@ -477,14 +483,20 @@
302
303 CHECK(mir_surface_is_valid(surface), "Can't create a surface");
304
305+#pragma GCC diagnostic push
306+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
307 mir_surface_set_event_handler(surface, mir_eglapp_handle_event, NULL);
308+#pragma GCC diagnostic pop
309
310 MirCursorConfiguration *conf = mir_cursor_configuration_from_name(cursor_name);
311+#pragma GCC diagnostic push
312+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
313 mir_surface_configure_cursor(surface, conf);
314 mir_cursor_configuration_destroy(conf);
315
316 eglsurface = eglCreateWindowSurface(egldisplay, eglconfig,
317 (EGLNativeWindowType)mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(surface)), NULL);
318+#pragma GCC diagnostic pop
319
320 CHECK(eglsurface != EGL_NO_SURFACE, "eglCreateWindowSurface failed");
321
322
323=== modified file 'examples/eglsquare.cpp'
324--- examples/eglsquare.cpp 2015-05-29 12:53:18 +0000
325+++ examples/eglsquare.cpp 2016-10-28 13:38:48 +0000
326@@ -109,7 +109,10 @@
327 context{connection, surface, swap_interval},
328 program{context, dimensions.width, dimensions.height}
329 {
330+#pragma GCC diagnostic push
331+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
332 mir_surface_set_event_handler(surface, &on_event, this);
333+#pragma GCC diagnostic pop
334 }
335
336 void on_event(MirEvent const* ev)
337@@ -159,7 +162,10 @@
338 {
339 unsigned int width{0};
340 unsigned int height{0};
341+#pragma GCC diagnostic push
342+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
343 auto display_config = mir_connection_create_display_config(connection);
344+#pragma GCC diagnostic pop
345 for (auto i = 0u; i < display_config->num_outputs; i++)
346 {
347 MirDisplayOutput const* out = display_config->outputs + i;
348
349=== modified file 'examples/eglstateswitcher.c'
350--- examples/eglstateswitcher.c 2016-10-21 07:53:23 +0000
351+++ examples/eglstateswitcher.c 2016-10-28 13:38:48 +0000
352@@ -43,7 +43,10 @@
353 return 1;
354
355 MirSurface* const surface = mir_eglapp_native_surface();
356+#pragma GCC diagnostic push
357+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
358 MirSurfaceState state = mir_surface_get_state(surface);
359+#pragma GCC diagnostic pop
360
361 /* This is probably the simplest GL you can do */
362 while (mir_eglapp_running())
363@@ -72,6 +75,8 @@
364
365 void toggle_surface_state(MirSurface* const surface, MirSurfaceState* state)
366 {
367+#pragma GCC diagnostic push
368+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
369 switch (mir_surface_get_state(surface))
370 {
371 PRINT_STATE(mir_surface_state_unknown);
372@@ -84,6 +89,7 @@
373 default:
374 puts("Current state: unknown");
375 }
376+#pragma GCC diagnostic pop
377
378 switch (*state)
379 {
380@@ -115,5 +121,8 @@
381 NEW_STATE(mir_surface_state_maximized);
382 break;
383 }
384+#pragma GCC diagnostic push
385+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
386 mir_surface_set_state(surface, *state);
387+#pragma GCC diagnostic pop
388 }
389
390=== modified file 'examples/fingerpaint.c'
391--- examples/fingerpaint.c 2016-01-29 08:18:22 +0000
392+++ examples/fingerpaint.c 2016-10-28 13:38:48 +0000
393@@ -425,9 +425,11 @@
394 fprintf(stderr, "Could not connect to a display server: %s\n", mir_connection_get_error_message(conn));
395 return 1;
396 }
397-
398+#pragma GCC diagnostic push
399+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
400 MirDisplayConfiguration *display_config =
401 mir_connection_create_display_config(conn);
402+#pragma GCC diagnostic pop
403
404 const MirDisplayOutput *dinfo = find_active_output(display_config);
405 if (dinfo == NULL)
406@@ -467,16 +469,21 @@
407
408 MirSurfaceSpec *spec = mir_connection_create_spec_for_normal_surface(conn, width, height, pixel_format);
409 mir_surface_spec_set_name(spec, "Mir Fingerpaint");
410+#pragma GCC diagnostic push
411+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
412 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
413+#pragma GCC diagnostic pop
414
415 surf = mir_surface_create_sync(spec);
416 mir_surface_spec_release(spec);
417
418 if (surf != NULL)
419 {
420+#pragma GCC diagnostic push
421+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
422 mir_surface_set_swapinterval(surf, swap_interval);
423 mir_surface_set_event_handler(surf, &on_event, &canvas);
424-
425+#pragma GCC diagnostic pop
426 canvas.width = width;
427 canvas.height = height;
428 canvas.stride = canvas.width * BYTES_PER_PIXEL(pixel_format);
429@@ -488,10 +495,12 @@
430 signal(SIGINT, shutdown);
431 signal(SIGTERM, shutdown);
432 signal(SIGHUP, shutdown);
433-
434+
435 clear_region(&canvas, &background);
436-
437+#pragma GCC diagnostic push
438+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
439 MirBufferStream *bs = mir_surface_get_buffer_stream(surf);
440+#pragma GCC diagnostic pop
441
442 while (running)
443 {
444@@ -509,7 +518,10 @@
445 }
446
447 /* Ensure canvas won't be used after it's freed */
448+#pragma GCC diagnostic push
449+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
450 mir_surface_set_event_handler(surf, NULL, NULL);
451+#pragma GCC diagnostic pop
452 free(canvas.vaddr);
453 }
454 else
455
456=== modified file 'examples/flicker.c'
457--- examples/flicker.c 2016-07-18 07:38:38 +0000
458+++ examples/flicker.c 2016-10-28 13:38:48 +0000
459@@ -157,7 +157,10 @@
460 mir_connection_create_spec_for_normal_surface(connection, 640, 480, pixel_format);
461 assert(spec != NULL);
462 mir_surface_spec_set_name(spec, __FILE__);
463+#pragma GCC diagnostic push
464+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
465 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
466+#pragma GCC diagnostic pop
467
468 surface = mir_surface_create_sync(spec);
469 mir_surface_spec_release(spec);
470@@ -167,14 +170,20 @@
471 assert(strcmp(mir_surface_get_error_message(surface), "") == 0);
472 puts("Surface created");
473
474+#pragma GCC diagnostic push
475+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
476 mir_surface_set_swapinterval(surface, swapinterval);
477+#pragma GCC diagnostic pop
478
479 uint32_t pattern[2] = {0};
480 fill_pattern(pattern, pixel_format);
481
482 MirGraphicsRegion graphics_region;
483 int i=0;
484+#pragma GCC diagnostic push
485+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
486 MirBufferStream *bs = mir_surface_get_buffer_stream(surface);
487+#pragma GCC diagnostic pop
488
489 signal(SIGINT, shutdown);
490 signal(SIGTERM, shutdown);
491
492=== modified file 'examples/multi_stream.cpp'
493--- examples/multi_stream.cpp 2016-10-20 14:26:23 +0000
494+++ examples/multi_stream.cpp 2016-10-28 13:38:48 +0000
495@@ -206,7 +206,10 @@
496 me::Connection connection{socket, "Multiple MirBufferStream example"};
497
498 me::NormalSurface surface{connection, 200, 200, true, false};
499+#pragma GCC diagnostic push
500+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
501 MirBufferStream* surface_stream = mir_surface_get_buffer_stream(surface);
502+#pragma GCC diagnostic pop
503 int topSize = 100, dTopSize = 2;
504 auto top = std::make_unique<me::BufferStream>(connection, topSize, topSize, true, false);
505 me::BufferStream bottom(connection, 50, 50, true, false);
506@@ -276,7 +279,10 @@
507 fill_stream_with(bottom, 0, 0, bottomColour, 128);
508 fill_stream_with(*top, 0, topColour, 0, 128);
509
510+#pragma GCC diagnostic push
511+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
512 mir_surface_spec_set_streams(spec, arrangement.data(), arrangement.size());
513+#pragma GCC diagnostic pop
514 mir_buffer_stream_swap_buffers_sync(surface_stream);
515 mir_buffer_stream_swap_buffers_sync(bottom);
516 mir_buffer_stream_swap_buffers_sync(*top);
517
518=== modified file 'examples/multiwin.c'
519--- examples/multiwin.c 2015-07-16 07:03:19 +0000
520+++ examples/multiwin.c 2016-10-28 13:38:48 +0000
521@@ -164,7 +164,10 @@
522 static void draw_window(Window *win)
523 {
524 MirGraphicsRegion region;
525+#pragma GCC diagnostic push
526+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
527 MirBufferStream *bs = mir_surface_get_buffer_stream(win->surface);
528+#pragma GCC diagnostic pop
529
530 mir_buffer_stream_get_graphics_region(bs, &region);
531 clear_region(&region, &win->fill);
532@@ -252,7 +255,10 @@
533 return 1;
534 }
535
536+#pragma GCC diagnostic push
537+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
538 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
539+#pragma GCC diagnostic pop
540 mir_surface_spec_set_name(spec, "red");
541
542 win[0].surface = mir_surface_create_sync(spec);
543
544=== modified file 'examples/pointer_confinement.c'
545--- examples/pointer_confinement.c 2016-10-21 07:53:23 +0000
546+++ examples/pointer_confinement.c 2016-10-28 13:38:48 +0000
547@@ -112,7 +112,10 @@
548 mir_surface_spec_release(spec);
549
550 // If we are grabbing we'll make it NULL which will hide the cursor
551+#pragma GCC diagnostic push
552+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
553 mir_surface_configure_cursor(surface, conf);
554+#pragma GCC diagnostic pop
555 mir_cursor_configuration_destroy(conf);
556 }
557 else if (key_code == XKB_KEY_f)
558@@ -221,7 +224,10 @@
559 glUseProgram(prog);
560
561 MirSurface* surface = mir_eglapp_native_surface();
562+#pragma GCC diagnostic push
563+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
564 mir_surface_set_event_handler(surface, handle_event, NULL);
565+#pragma GCC diagnostic pop
566
567 spec = mir_connection_create_spec_for_changes(mir_eglapp_native_connection());
568 mir_surface_spec_set_pointer_confinement(spec, mir_pointer_confined_to_surface);
569@@ -230,7 +236,10 @@
570 mir_surface_spec_release(spec);
571
572 // Hide cursor
573+#pragma GCC diagnostic push
574+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
575 mir_surface_configure_cursor(surface, NULL);
576+#pragma GCC diagnostic pop
577
578 glClearColor(0.3f, 0.3f, 0.3f, 1.0f);
579
580
581=== modified file 'examples/progressbar.c'
582--- examples/progressbar.c 2015-06-17 05:20:42 +0000
583+++ examples/progressbar.c 2016-10-28 13:38:48 +0000
584@@ -184,8 +184,10 @@
585 static void redraw(MirSurface *surface, const MirGraphicsRegion *canvas)
586 {
587 MirGraphicsRegion backbuffer;
588+#pragma GCC diagnostic push
589+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
590 MirBufferStream *bs = mir_surface_get_buffer_stream(surface);
591-
592+#pragma GCC diagnostic pop
593 mir_buffer_stream_get_graphics_region(bs, &backbuffer);
594 clear_region(&backbuffer, background);
595 copy_region(&backbuffer, canvas);
596@@ -266,7 +268,10 @@
597 mir_surface_spec_set_name(spec, name);
598 }
599
600+#pragma GCC diagnostic push
601+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
602 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
603+#pragma GCC diagnostic pop
604
605 surf = mir_surface_create_sync(spec);
606 mir_surface_spec_release(spec);
607
608=== modified file 'examples/prompt_session.c'
609--- examples/prompt_session.c 2016-09-08 02:58:56 +0000
610+++ examples/prompt_session.c 2016-10-28 13:38:48 +0000
611@@ -116,7 +116,10 @@
612 platform_package.data_items = -1;
613 platform_package.fd_items = -1;
614
615+#pragma GCC diagnostic push
616+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
617 mir_connection_get_platform(mcd->connection, &platform_package);
618+#pragma GCC diagnostic pop
619 assert(0 <= platform_package.data_items);
620 assert(0 <= platform_package.fd_items);
621 }
622
623=== modified file 'examples/target.c'
624--- examples/target.c 2016-10-21 07:53:23 +0000
625+++ examples/target.c 2016-10-28 13:38:48 +0000
626@@ -352,7 +352,10 @@
627 }
628
629 MirSurface *surface = mir_eglapp_native_surface();
630+#pragma GCC diagnostic push
631+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
632 mir_surface_set_event_handler(surface, on_event, &state);
633+#pragma GCC diagnostic pop
634
635 while (true)
636 {
637@@ -421,7 +424,10 @@
638 mir_eglapp_swap_buffers();
639 }
640
641+#pragma GCC diagnostic push
642+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
643 mir_surface_set_event_handler(surface, NULL, NULL);
644+#pragma GCC diagnostic pop
645 mir_eglapp_cleanup();
646
647 pthread_join(shutdown_handler_thread, NULL);
648
649=== modified file 'examples/tooltip.c'
650--- examples/tooltip.c 2016-10-21 07:53:23 +0000
651+++ examples/tooltip.c 2016-10-28 13:38:48 +0000
652@@ -105,7 +105,10 @@
653 MirSurfaceSpec* const spec = mir_connection_create_spec_for_tip(
654 connection, width, height, format, parent, &zone, mir_edge_attachment_vertical);
655
656+#pragma GCC diagnostic push
657+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
658 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
659+#pragma GCC diagnostic pop
660 mir_surface_spec_set_name(spec, "tooltip");
661 mir_surface_spec_set_min_width(spec, width);
662 mir_surface_spec_set_max_width(spec, width);
663@@ -115,7 +118,10 @@
664 MirSurface* tooltip = mir_surface_create_sync(spec);
665 mir_surface_spec_release(spec);
666
667+#pragma GCC diagnostic push
668+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
669 MirBufferStream* const bs = mir_surface_get_buffer_stream(tooltip);
670+#pragma GCC diagnostic pop
671 MirGraphicsRegion buffer;
672 mir_buffer_stream_get_graphics_region(bs, &buffer);
673
674
675=== modified file 'include/client/mir_toolkit/debug/surface.h'
676--- include/client/mir_toolkit/debug/surface.h 2015-02-22 07:46:25 +0000
677+++ include/client/mir_toolkit/debug/surface.h 2016-10-28 13:38:48 +0000
678@@ -36,16 +36,23 @@
679
680 /**
681 * Get the ID of the surface's current buffer (only useful for debug purposes)
682+ *
683+ * \deprecated Not useful anymore
684+ *
685 * \pre The surface is valid
686 * \param [in] surface The surface
687 * \return The internal buffer ID of the surface's current buffer.
688 * This is the buffer that is currently being drawn to,
689 * and would be returned by mir_surface_get_current_buffer.
690 */
691+__attribute__ ((deprecated))
692 uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface);
693
694 /**
695 * Get the screen coordinates corresponding to a pair of surface coordinates
696+ *
697+ * \deprecated Use the "debug_surface_coords" extension instead
698+ *
699 * \pre The surface is valid
700 * \param [in] surface The surface
701 * \param [in] x, y Surface coordinates to map to screen coordinates
702@@ -59,6 +66,7 @@
703 * This call will only be interesting for automated testing, where both the client
704 * and shell state is known and constrained.
705 */
706+__attribute__ ((deprecated))
707 bool mir_debug_surface_coords_to_screen(MirSurface* surface,
708 int x, int y,
709 int* screen_x, int* screen_y);
710
711=== modified file 'include/client/mir_toolkit/mir_buffer_stream.h'
712--- include/client/mir_toolkit/mir_buffer_stream.h 2016-10-12 06:03:15 +0000
713+++ include/client/mir_toolkit/mir_buffer_stream.h 2016-10-28 13:38:48 +0000
714@@ -52,6 +52,8 @@
715 /**
716 * Create a new buffer stream.
717 *
718+ * \deprecated See mir_render_surface_create_buffer_stream
719+ *
720 * For example, the resulting buffer stream may be used
721 * with mir_cursor_configuration_from_buffer_stream,
722 * in order to post images to the system cursor.
723@@ -70,6 +72,7 @@
724 *
725 * \return A handle that can be supplied to mir_wait_for
726 */
727+__attribute__ ((deprecated))
728 MirWaitHandle* mir_connection_create_buffer_stream(MirConnection *connection,
729 int width, int height,
730 MirPixelFormat format,
731@@ -83,6 +86,8 @@
732 * mir_cursor_configuration_from_buffer_stream in order to post images
733 * to the system cursor.
734 *
735+ * \deprecated See mir_render_surface_create_buffer_stream_sync
736+ *
737 * \param [in] connection A valid connection
738 * \param [in] width Requested buffer width
739 * \param [in] height Requested buffer height
740@@ -93,6 +98,7 @@
741 * \return The new buffer stream. This is guaranteed non-null,
742 * but may be invalid in the case of error.
743 */
744+__attribute__ ((deprecated))
745 MirBufferStream* mir_connection_create_buffer_stream_sync(MirConnection *connection,
746 int width, int height,
747 MirPixelFormat format,
748@@ -100,6 +106,9 @@
749
750 /**
751 * Release the supplied stream and any associated buffer. The returned wait
752+ *
753+ * \note TODO: Cleanup remove callback?
754+ *
755 * handle remains valid until the connection to the server is released.
756 * \warning callback could be called from another thread. You must do any
757 * locking appropriate to protect your data accessed in the
758@@ -140,17 +149,19 @@
759 * \return One of mir_platform_type_android or
760 * mir_platform_type_gbm
761 */
762-/// @cond
763 __attribute__ ((deprecated))
764-/// @endcond
765 MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream);
766
767 /**
768 * Retrieve the current buffer in "raw" representation.
769+ *
770+ * \deprecated Replaced by a platform specific extension
771+ *
772 * \pre The buffer stream is valid
773 * \param [in] buffer_stream The buffer stream
774 * \param [out] buffer_package Structure to be populated
775 */
776+__attribute__ ((deprecated))
777 void mir_buffer_stream_get_current_buffer(MirBufferStream *buffer_stream,
778 MirNativeBuffer **buffer_package);
779
780@@ -181,35 +192,47 @@
781
782 /**
783 * Retrieve a buffer stream's graphics region
784+ *
785 * \warning Depending on platform, this can map the graphics buffer each
786 * time its called. The region remains mapped until
787 * mir_buffer_stream_swap_buffers().
788 * \pre The buffer stream is valid
789 * \param [in] buffer_stream The buffer stream
790 * \param [out] graphics_region Structure to be populated
791+ * \return True if the region is valid, false otherwise.
792 */
793-void mir_buffer_stream_get_graphics_region(
794+bool mir_buffer_stream_get_graphics_region(
795 MirBufferStream *buffer_stream,
796 MirGraphicsRegion *graphics_region);
797
798 /**
799 * Retrieve a window type which may be used by EGL.
800+ *
801+ * \deprecated No replacement, use MirRenderSurface * directly with EGL
802+ *
803 * \param [in] buffer_stream The buffer stream
804 * \return An EGLNativeWindowType that the client can use
805 */
806+__attribute__ ((deprecated))
807 MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream *buffer_stream);
808
809 /**
810 * Set the scale associated with all buffers in the stream
811+ *
812+ * \note May need deprecation - Need a consistent API for high DPI scaling/destination size
813+ *
814 * \param [in] buffer_stream The buffer stream
815 * \param [in] scale The scale
816- * \return A handle that can be passed to mir_wait_for
817+ * \return A handle that can be passed to mir_wait_for
818 */
819 MirWaitHandle *mir_buffer_stream_set_scale(MirBufferStream* buffer_stream, float scale);
820
821 /**
822 * Set the scale as in mir_buffer_stream_set_scale(), but also wait for the
823 * operation to complete.
824+ *
825+ * \note May need deprecation - Need a consistent API for high DPI scaling/destination size
826+ *
827 * \param [in] buffer_stream The buffer stream
828 * \param [in] scale The scale
829 */
830
831=== modified file 'include/client/mir_toolkit/mir_connection.h'
832--- include/client/mir_toolkit/mir_connection.h 2016-10-12 06:03:15 +0000
833+++ include/client/mir_toolkit/mir_connection.h 2016-10-28 13:38:48 +0000
834@@ -89,20 +89,26 @@
835 /**
836 * Query platform-specific data and/or file descriptors that are required to
837 * initialize GL/EGL features.
838+ *
839+ * \deprecated Use "get_platform" extension
840+ *
841 * \param [in] connection The connection
842 * \param [out] platform_package Structure to be populated
843 */
844+__attribute__ ((deprecated))
845 void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package);
846
847 /**
848 * Query graphics platform module.
849 *
850+ * \deprecated Use "get_graphics_module" extension
851 * \note The char pointers in MirModuleProperties are owned by the connection and should not be
852 * freed. They remain valid until the connection is released.
853 *
854 * \param [in] connection The connection
855 * \param [out] properties Structure to be populated
856 */
857+__attribute__ ((deprecated))
858 void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties);
859
860 /**
861@@ -146,13 +152,14 @@
862 /**
863 * Query the display
864 *
865- * \deprecated Use mir_connection_create_display_configuration() instead.
866+ * \deprecated See mir_connection_create_display_configuration()
867 *
868 * \warning return value must be destroyed via mir_display_config_destroy()
869 * \warning may return null if connection is invalid
870 * \param [in] connection The connection
871 * \return structure that describes the display configuration
872 */
873+__attribute__ ((deprecated))
874 MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection);
875
876 /**
877@@ -189,6 +196,8 @@
878 /**
879 * Apply the display configuration
880 *
881+ * \deprecated Replace with mir_connection_apply_display_configuration(...)
882+ *
883 * The display configuration is applied to this connection only (per-connection
884 * configuration) and is invalidated when a hardware change occurs. Clients should
885 * register a callback with mir_connection_set_display_config_change_callback()
886@@ -199,11 +208,14 @@
887 * \param [in] display_configuration The display_configuration to apply
888 * \return A handle that can be passed to mir_wait_for
889 */
890+__attribute__ ((deprecated))
891 MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration);
892
893 /**
894 * Set the base display configuration
895 *
896+ * \deprecated Use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration
897+ *
898 * The base display configuration is the configuration the server applies when
899 * there is no active per-connection configuration.
900 *
901@@ -222,6 +234,7 @@
902 * \param [in] display_configuration The display_configuration to set as base
903 * \return A handle that can be passed to mir_wait_for
904 */
905+__attribute__ ((deprecated))
906 MirWaitHandle* mir_connection_set_base_display_config(
907 MirConnection* connection,
908 MirDisplayConfiguration const* display_configuration);
909@@ -298,6 +311,9 @@
910
911 /**
912 * Get a display type that can be used for OpenGL ES 2.0 acceleration.
913+ *
914+ * \deprecated No replacement. Use MirConnection * directly with EGL
915+ *
916 * \param [in] connection The connection
917 * \return An EGLNativeDisplayType that the client can use
918 */
919@@ -306,11 +322,15 @@
920 /**
921 * Get the exact MirPixelFormat to use in creating a surface for a chosen
922 * EGLConfig.
923+ *
924+ * \deprecated No replacement. Use EGL configs directly.
925+ *
926 * \param [in] connection The connection
927 * \param [in] egldisplay The EGLDisplay for the given config
928 * \param [in] eglconfig The EGLConfig you have chosen to use
929 * \return The MirPixelFormat to use in surface creation
930 */
931+__attribute__ ((deprecated))
932 MirPixelFormat mir_connection_get_egl_pixel_format(
933 MirConnection *connection, void *egldisplay, void *eglconfig);
934
935@@ -336,6 +356,8 @@
936 /**
937 * Perform a platform specific operation.
938 *
939+ * \deprecated Use the platform extensions API instead
940+ *
941 * The MirPlatformMessage used for the request needs to remain valid
942 * until this operation finishes.
943 *
944@@ -345,6 +367,7 @@
945 * \param [in,out] context User data passed to the callback function
946 * \return A handle that can be passed to mir_wait_for
947 */
948+__attribute__ ((deprecated))
949 MirWaitHandle* mir_connection_platform_operation(
950 MirConnection* connection,
951 MirPlatformMessage const* request,
952
953=== modified file 'include/client/mir_toolkit/mir_cursor_configuration.h'
954--- include/client/mir_toolkit/mir_cursor_configuration.h 2016-09-08 02:58:56 +0000
955+++ include/client/mir_toolkit/mir_cursor_configuration.h 2016-10-28 13:38:48 +0000
956@@ -57,6 +57,9 @@
957 * Returns a new cursor configuration tied to a given buffer stream.
958 * If the configuration is successfully applied buffers from the stream will be used
959 * to fill the system cursor.
960+ *
961+ * \note Replace MirBufferStream with MirRenderSurface
962+ *
963 * \param [in] stream The buffer stream
964 * \param [in] hotspot_x The x-coordinate to use as the cursor's hotspot.
965 * \param [in] hotspot_y The y-coordinate to use as the cursor's hotspot.
966
967=== modified file 'include/client/mir_toolkit/mir_display_configuration.h'
968--- include/client/mir_toolkit/mir_display_configuration.h 2016-10-20 15:07:39 +0000
969+++ include/client/mir_toolkit/mir_display_configuration.h 2016-10-28 13:38:48 +0000
970@@ -50,6 +50,8 @@
971 * Get the maximum possible number of simultaneously active outputs this system
972 * supports.
973 *
974+ * No replacement. API is not useful.
975+ *
976 * \note There may be restrictions on the configuration required to achieve this
977 * many active outputs. Typically the achievable number of simultaneously active
978 * outputs is lower than this number.
979@@ -58,6 +60,7 @@
980 * \returns The maximum number of simultaneously active outputs
981 * supportable at this time.
982 */
983+__attribute__ ((deprecated))
984 int mir_display_config_get_max_simultaneous_outputs(
985 MirDisplayConfig const* config);
986
987@@ -263,9 +266,12 @@
988 /**
989 * Get the textual name of an output type.
990 *
991+ * \deprecated See mir_output_type_name
992+ *
993 * \param [in] type The MirDisplayOutputType to describe.
994 * \returns The name of the output type.
995 */
996+__attribute__ ((deprecated))
997 char const* mir_display_output_type_name(MirDisplayOutputType type);
998
999 /**
1000
1001=== modified file 'include/client/mir_toolkit/mir_platform_message.h'
1002--- include/client/mir_toolkit/mir_platform_message.h 2014-12-10 11:02:04 +0000
1003+++ include/client/mir_toolkit/mir_platform_message.h 2016-10-28 13:38:48 +0000
1004@@ -48,16 +48,22 @@
1005 * Each call to mir_platform_message_create() should be matched by
1006 * a call to mir_platform_message_release() to avoid memory leaks.
1007 *
1008+ * \deprecated Use platform extensions API
1009+ *
1010 * \param [in] opcode The platform message opcode
1011 * \return The created MirPlatformMessage
1012 */
1013+__attribute__ ((deprecated))
1014 MirPlatformMessage* mir_platform_message_create(unsigned int opcode);
1015
1016 /**
1017 * Release a platform message.
1018 *
1019+ * \deprecated Use platform extensions API
1020+ *
1021 * \param [in] message The MirPlatformMessage
1022 */
1023+__attribute__ ((deprecated))
1024 void mir_platform_message_release(MirPlatformMessage const* message);
1025
1026 /**
1027@@ -65,10 +71,13 @@
1028 *
1029 * The data is copied into the message.
1030 *
1031+ * \deprecated Use platform extensions API
1032+ *
1033 * \param [in] message The MirPlatformMessage
1034 * \param [in] data Pointer to the data
1035 * \param [in] data_size The size of the data in bytes
1036 */
1037+__attribute__ ((deprecated))
1038 void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size);
1039
1040 /**
1041@@ -82,18 +91,24 @@
1042 * is released. The caller is responsible for closing the fds when the message
1043 * doesn't need them anymore (see also mir_platform_message_get_fds()).
1044 *
1045+ * \deprecated Use platform extensions API
1046+ *
1047 * \param [in] message The MirPlatformMessage
1048 * \param [in] fds Pointer to the array of fds
1049 * \param [in] num_fds The number of fds
1050 */
1051+__attribute__ ((deprecated))
1052 void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds);
1053
1054 /**
1055 * Get the opcode of a message.
1056 *
1057+ * \deprecated Use platform extensions API
1058+ *
1059 * \param [in] message The MirPlatformMessage
1060 * \return The opcode
1061 */
1062+__attribute__ ((deprecated))
1063 unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message);
1064
1065 /**
1066@@ -103,9 +118,11 @@
1067 * valid only as long as the message is valid and mir_platform_set_data() is
1068 * not called. You must not change or free the returned data array.
1069 *
1070+ * \deprecated Use platform extensions API
1071 * \param [in] message The MirPlatformMessage
1072 * \return The data
1073 */
1074+__attribute__ ((deprecated))
1075 MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message);
1076
1077 /**
1078@@ -119,9 +136,11 @@
1079 * message is released. Users are responsible for getting and closing the
1080 * fds to avoid leaks.
1081 *
1082+ * \deprecated Use platform extensions API
1083 * \param [in] message The MirPlatformMessage
1084 * \return The fds
1085 */
1086+__attribute__ ((deprecated))
1087 MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message);
1088
1089 #ifdef __cplusplus
1090
1091=== modified file 'include/client/mir_toolkit/mir_screencast.h'
1092--- include/client/mir_toolkit/mir_screencast.h 2016-07-18 07:38:38 +0000
1093+++ include/client/mir_toolkit/mir_screencast.h 2016-10-28 13:38:48 +0000
1094@@ -89,10 +89,13 @@
1095 /**
1096 * Set the requested number of buffers to use.
1097 *
1098+ * \deprecated See mir_screencast_capture_to_buffer
1099+ *
1100 * \param [in] spec Specification to mutate
1101 * \param [in] nbuffers The number of buffers to allocate for screencasting
1102 *
1103 */
1104+__attribute__ ((deprecated))
1105 void mir_screencast_spec_set_number_of_buffers(MirScreencastSpec* spec, unsigned int nbuffers);
1106
1107 /**
1108@@ -135,11 +138,14 @@
1109 *
1110 * A screencast allows clients to read the contents of the screen.
1111 *
1112+ * \deprecated See mir_screencast_create_sync
1113+ *
1114 * \warning This request may be denied.
1115 * \param [in] connection The connection
1116 * \param [in] parameters The screencast parameters
1117 * \return The resulting screencast
1118 */
1119+__attribute__ ((deprecated))
1120 MirScreencast* mir_connection_create_screencast_sync(
1121 MirConnection* connection,
1122 MirScreencastParameters* parameters);
1123@@ -155,8 +161,11 @@
1124 * Retrieve the MirBufferStream associated with a screencast
1125 * (to advance buffers, obtain EGLNativeWindowType, etc...)
1126 *
1127+ * \deprecated See mir_screencast_capture_to_buffer
1128+ *
1129 * \param[in] screencast The screencast
1130 */
1131+__attribute__ ((deprecated))
1132 MirBufferStream* mir_screencast_get_buffer_stream(MirScreencast* screencast);
1133
1134 #ifdef __cplusplus
1135
1136=== modified file 'include/client/mir_toolkit/mir_surface.h'
1137--- include/client/mir_toolkit/mir_surface.h 2016-10-12 06:03:15 +0000
1138+++ include/client/mir_toolkit/mir_surface.h 2016-10-28 13:38:48 +0000
1139@@ -232,6 +232,7 @@
1140 /**
1141 * Create a surface from a given specification
1142 *
1143+ * \note There is no implicit buffer stream creation. See mir_xxx to attach content.
1144 *
1145 * \param [in] requested_specification Specification of the attributes for the created surface
1146 * \param [in] callback Callback function to be invoked when creation is complete
1147@@ -411,6 +412,9 @@
1148
1149 /**
1150 * Set the requested pixel format.
1151+ *
1152+ * \deprecated No replacement. This property is now part of the backing content
1153+ *
1154 * \param [in] spec Specification to mutate
1155 * \param [in] format Requested pixel format
1156 *
1157@@ -418,10 +422,14 @@
1158 * If the server is unable to create a surface with this pixel format at
1159 * the point mir_surface_create() is called it will instead return an invalid surface.
1160 */
1161+__attribute__ ((deprecated))
1162 void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format);
1163
1164 /**
1165 * Set the requested buffer usage.
1166+ *
1167+ * \deprecated No replacement. This property is now part of the backing content
1168+ *
1169 * \param [in] spec Specification to mutate
1170 * \param [in] usage Requested buffer usage
1171 *
1172@@ -429,13 +437,15 @@
1173 * If the server is unable to create a surface with this buffer usage at
1174 * the point mir_surface_create() is called it will instead return an invalid surface.
1175 */
1176+__attribute__ ((deprecated))
1177 void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage);
1178
1179 /**
1180 * \param [in] spec Specification to mutate
1181 * \param [in] output_id ID of output to place surface on. From MirDisplayOutput.output_id
1182 *
1183- * \note If this call returns %true then a valid surface returned from mir_surface_create() is
1184+ * \note Update comment below
1185+ * \note If this call returns %t then a valid surface returned from mir_surface_create() is
1186 * guaranteed to be fullscreen on the specified output. An invalid surface is returned
1187 * if the server unable to, or policy prevents it from, honouring this request.
1188 */
1189@@ -501,6 +511,8 @@
1190 * but is in the list will be associated with the surface.
1191 * Streams set a displacement from the top-left corner of the surface.
1192 *
1193+ * \deprecated Replaced by mir_surface_set_render_surfaces
1194+ *
1195 * \warning disassociating streams from the surface will not release() them.
1196 * \warning It is wiser to arrange the streams within the bounds of the
1197 * surface the spec is applied to. Shells can define their own
1198@@ -510,6 +522,7 @@
1199 * \param [in] streams An array of non-null streams info.
1200 * \param [in] num_streams The number of elements in the streams array.
1201 */
1202+__attribute__ ((deprecated))
1203 void mir_surface_spec_set_streams(MirSurfaceSpec* spec,
1204 MirBufferStreamInfo* streams,
1205 unsigned int num_streams);
1206@@ -600,6 +613,9 @@
1207
1208 /**
1209 * Set the event handler to be called when events arrive for a surface.
1210+ *
1211+ * \deprecated Use mir_surface_spec_set_event_handler instead.
1212+ *
1213 * \warning event_handler could be called from another thread. You must do
1214 * any locking appropriate to protect your data accessed in the
1215 * callback. There is also a chance that different events will be
1216@@ -609,6 +625,7 @@
1217 * \param [in] callback The callback function
1218 * \param [in] context Additional argument to be passed to callback
1219 */
1220+__attribute__ ((deprecated))
1221 void mir_surface_set_event_handler(MirSurface *surface,
1222 mir_surface_event_callback callback,
1223 void* context);
1224@@ -626,6 +643,7 @@
1225 * be removed, and this function will return NULL.
1226 * \param[in] surface The surface
1227 */
1228+__attribute__ ((deprecated))
1229 MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface);
1230
1231 /**
1232@@ -649,10 +667,14 @@
1233
1234 /**
1235 * Get a surface's parameters.
1236+ *
1237+ * \deprecated MirSurfaceParameters is obsolete.
1238+ *
1239 * \pre The surface is valid
1240 * \param [in] surface The surface
1241 * \param [out] parameters Structure to be populated
1242 */
1243+__attribute__ ((deprecated))
1244 void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters);
1245
1246 /**
1247@@ -681,29 +703,44 @@
1248
1249 /**
1250 * Get the type (purpose) of a surface.
1251+ *
1252+ * \deprecated ? Mostly a convenience function. Look for MirSurfaceType events instead?
1253+ *
1254 * \param [in] surface The surface to query
1255 * \return The type of the surface
1256 */
1257+__attribute__ ((deprecated))
1258 MirSurfaceType mir_surface_get_type(MirSurface *surface);
1259
1260 /**
1261 * Change the state of a surface.
1262+ *
1263+ * \deprecated Use mir_surface_apply_spec instead
1264+ *
1265 * \param [in] surface The surface to operate on
1266 * \param [in] state The new state of the surface
1267 * \return A wait handle that can be passed to mir_wait_for
1268 */
1269+__attribute__ ((deprecated))
1270 MirWaitHandle* mir_surface_set_state(MirSurface *surface,
1271 MirSurfaceState state);
1272
1273 /**
1274 * Get the current state of a surface.
1275+ *
1276+ * \deprecated ? Mostly a convenience function. Look for MirSurfaceState events instead?
1277+ *
1278 * \param [in] surface The surface to query
1279 * \return The state of the surface
1280 */
1281+__attribute__ ((deprecated))
1282 MirSurfaceState mir_surface_get_state(MirSurface *surface);
1283
1284 /**
1285 * Set the swapinterval for the default stream.
1286+ *
1287+ * \deprecated No replacement. This is not a property of the surface anymore.
1288+ *
1289 * \warning EGL users should use eglSwapInterval directly.
1290 * \warning Only swapinterval of 0 or 1 is supported.
1291 * \warning If the surface was created with, or modified to have a
1292@@ -716,27 +753,39 @@
1293 * \return A wait handle that can be passed to mir_wait_for,
1294 * or NULL if the interval could not be supported
1295 */
1296+__attribute__ ((deprecated))
1297 MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval);
1298
1299 /**
1300 * Query the swapinterval that the surface is operating with.
1301 * The default interval is 1.
1302+ *
1303+ * \deprecated No replacement. This is not a property of the surface anymore.
1304+ *
1305 * \param [in] surface The surface to operate on
1306 * \return The swapinterval value that the client is operating with.
1307 * Returns -1 if surface is invalid, or if the default stream
1308 * was removed by use of mir_surface_spec_set_streams().
1309 */
1310+__attribute__ ((deprecated))
1311 int mir_surface_get_swapinterval(MirSurface* surface);
1312
1313 /**
1314 * Query the DPI value of the surface (dots per inch). This will vary depending
1315 * on the physical display configuration and where the surface is within it.
1316+ *
1317+ * \deprecated ? Mostly a convenience function - Use dpi events instead?
1318+ *
1319 * \return The DPI of the surface, or zero if unknown.
1320 */
1321+__attribute__ ((deprecated))
1322 int mir_surface_get_dpi(MirSurface* surface);
1323
1324 /**
1325 * Query the focus state for a surface.
1326+ *
1327+ * \deprecated
1328+ *
1329 * \param [in] surface The surface to operate on
1330 * \return The focus state of said surface
1331 */
1332@@ -744,6 +793,9 @@
1333
1334 /**
1335 * Query the visibility state for a surface.
1336+ *
1337+ * \deprecated
1338+ *
1339 * \param [in] surface The surface to operate on
1340 * \return The visibility state of said surface
1341 */
1342@@ -752,6 +804,9 @@
1343 /**
1344 * Choose the cursor state for a surface: whether a cursor is shown,
1345 * and which cursor if so.
1346+ *
1347+ * \deprecated Use mir_surface_apply_spec instead
1348+ *
1349 * \param [in] surface The surface to operate on
1350 * \param [in] parameters The configuration parameters obtained
1351 * from mir_cursor* family of functions.
1352@@ -759,30 +814,43 @@
1353 * or NULL if parameters is invalid.
1354 *
1355 */
1356+__attribute__ ((deprecated))
1357 MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters);
1358
1359 /**
1360 * Get the orientation of a surface.
1361+ *
1362+ * \deprecated ? Mostly a convenience function - Use dpi events instead?
1363+ *
1364 * \param [in] surface The surface to query
1365 * \return The orientation of the surface
1366 */
1367+__attribute__ ((deprecated))
1368 MirOrientation mir_surface_get_orientation(MirSurface *surface);
1369
1370 /**
1371 * Request to set the preferred orientations of a surface.
1372 * The request may be rejected by the server; to check wait on the
1373 * result and check the applied value using mir_surface_get_preferred_orientation
1374+ *
1375+ * \deprecated Use mir_surface_apply_spec instead
1376+ *
1377 * \param [in] surface The surface to operate on
1378 * \param [in] orientation The preferred orientation modes
1379 * \return A wait handle that can be passed to mir_wait_for
1380 */
1381+__attribute__ ((deprecated))
1382 MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation);
1383
1384 /**
1385 * Get the preferred orientation modes of a surface.
1386+ *
1387+ * \deprecated No alternative as client should already know what the preferred orientation the surface is set to.
1388+ *
1389 * \param [in] surface The surface to query
1390 * \return The preferred orientation modes
1391 */
1392+__attribute__ ((deprecated))
1393 MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface);
1394
1395 /**
1396
1397=== modified file 'include/core/mir_toolkit/common.h'
1398--- include/core/mir_toolkit/common.h 2016-10-20 15:05:56 +0000
1399+++ include/core/mir_toolkit/common.h 2016-10-28 13:38:48 +0000
1400@@ -349,6 +349,7 @@
1401 {
1402 mir_shell_chrome_normal,
1403 mir_shell_chrome_low,
1404+ mir_shell_chrome_none
1405 } MirShellChrome;
1406
1407 /**
1408
1409=== modified file 'playground/eglflash_render_surface.c'
1410--- playground/eglflash_render_surface.c 2016-10-12 21:49:18 +0000
1411+++ playground/eglflash_render_surface.c 2016-10-28 13:38:48 +0000
1412@@ -104,8 +104,11 @@
1413 CHECK(ok, "Could not eglChooseConfig");
1414 CHECK(neglconfigs > 0, "No EGL config available");
1415
1416+#pragma GCC diagnostic push
1417+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1418 MirPixelFormat pixel_format =
1419 mir_connection_get_egl_pixel_format(connection, egldisplay, eglconfig);
1420+#pragma GCC diagnostic pop
1421
1422 printf("Mir chose pixel format %d.\n", pixel_format);
1423
1424@@ -114,7 +117,10 @@
1425 CHECK(spec, "Can't create a surface spec");
1426
1427 mir_surface_spec_set_name(spec, appname);
1428+#pragma GCC diagnostic push
1429+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1430 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
1431+#pragma GCC diagnostic pop
1432
1433 render_surface = mir_connection_create_render_surface(connection);
1434 CHECK(mir_render_surface_is_valid(render_surface), "could not create render surface");
1435
1436=== modified file 'playground/render_surface.cpp'
1437--- playground/render_surface.cpp 2016-10-12 21:49:18 +0000
1438+++ playground/render_surface.cpp 2016-10-28 13:38:48 +0000
1439@@ -206,7 +206,10 @@
1440 pixel_format);
1441
1442 mir_surface_spec_set_name(spec, "Stream");
1443+#pragma GCC diagnostic push
1444+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1445 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
1446+#pragma GCC diagnostic pop
1447
1448 auto buffer_stream =
1449 mir_render_surface_create_buffer_stream_sync(render_surface,
1450
1451=== modified file 'src/client/mir_buffer_stream_api.cpp'
1452--- src/client/mir_buffer_stream_api.cpp 2016-10-13 16:32:59 +0000
1453+++ src/client/mir_buffer_stream_api.cpp 2016-10-28 13:38:48 +0000
1454@@ -72,8 +72,11 @@
1455 try
1456 {
1457 MirBufferStream *stream = nullptr;
1458+#pragma GCC diagnostic push
1459+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1460 mir_connection_create_buffer_stream(connection, width, height, format, buffer_usage,
1461 reinterpret_cast<mir_buffer_stream_callback>(assign_result), &stream)->wait_for_all();
1462+#pragma GCC diagnostic push
1463 return stream;
1464 }
1465 catch (std::exception const& ex)
1466@@ -148,7 +151,7 @@
1467 nullptr));
1468 }
1469
1470-void mir_buffer_stream_get_graphics_region(
1471+bool mir_buffer_stream_get_graphics_region(
1472 MirBufferStream *buffer_stream,
1473 MirGraphicsRegion *region_out)
1474 try
1475@@ -161,10 +164,13 @@
1476 region_out->stride = secured_region->stride.as_uint32_t();
1477 region_out->pixel_format = secured_region->format;
1478 region_out->vaddr = secured_region->vaddr.get();
1479+
1480+ return true;
1481 }
1482 catch (std::exception const& ex)
1483 {
1484 MIR_LOG_UNCAUGHT_EXCEPTION(ex);
1485+ return false;
1486 }
1487
1488 MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream* buffer_stream)
1489
1490=== modified file 'src/client/mir_connection.cpp'
1491--- src/client/mir_connection.cpp 2016-10-21 09:20:55 +0000
1492+++ src/client/mir_connection.cpp 2016-10-28 13:38:48 +0000
1493@@ -643,10 +643,15 @@
1494 void MirConnection::done_platform_operation(
1495 mir_platform_operation_callback callback, void* context)
1496 {
1497+#pragma GCC diagnostic push
1498+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1499 auto reply = mir_platform_message_create(platform_operation_reply->opcode());
1500+#pragma GCC diagnostic pop
1501
1502 set_error_message(platform_operation_reply->error());
1503
1504+#pragma GCC diagnostic push
1505+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1506 mir_platform_message_set_data(
1507 reply,
1508 platform_operation_reply->data().data(),
1509@@ -656,6 +661,7 @@
1510 reply,
1511 platform_operation_reply->fd().data(),
1512 platform_operation_reply->fd().size());
1513+#pragma GCC diagnostic pop
1514
1515 callback(this, reply, context);
1516
1517@@ -676,9 +682,12 @@
1518
1519 mp::PlatformOperationMessage protobuf_request;
1520
1521+#pragma GCC diagnostic push
1522+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1523 protobuf_request.set_opcode(mir_platform_message_get_opcode(request));
1524 auto const request_data = mir_platform_message_get_data(request);
1525 auto const request_fds = mir_platform_message_get_fds(request);
1526+#pragma GCC diagnostic pop
1527
1528 protobuf_request.set_data(request_data.data, request_data.size);
1529 for (size_t i = 0; i != request_fds.num_fds; ++i)
1530
1531=== modified file 'src/platforms/android/utils/test_android_hardware_sanity.cpp'
1532--- src/platforms/android/utils/test_android_hardware_sanity.cpp 2016-10-12 06:56:27 +0000
1533+++ src/platforms/android/utils/test_android_hardware_sanity.cpp 2016-10-28 13:38:48 +0000
1534@@ -117,15 +117,21 @@
1535
1536 auto const spec = mir_connection_create_spec_for_normal_surface(
1537 connection, test_width, test_height, mir_pixel_format_abgr_8888);
1538+#pragma GCC diagnostic push
1539+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1540 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
1541+#pragma GCC diagnostic pop
1542 auto const surface = mir_surface_create_sync(spec);
1543 mir_surface_spec_release(spec);
1544
1545 EXPECT_THAT(surface, IsValid());
1546 MirGraphicsRegion graphics_region;
1547+#pragma GCC diagnostic push
1548+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1549 mir_buffer_stream_get_graphics_region(mir_surface_get_buffer_stream(surface), &graphics_region);
1550 draw_pattern.draw(graphics_region);
1551 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
1552+#pragma GCC diagnostic pop
1553
1554 auto scene = runner->config.the_scene();
1555 auto seq = scene->scene_elements_for(this);
1556@@ -178,8 +184,11 @@
1557
1558 EXPECT_THAT(mir_surface, IsValid());
1559
1560+#pragma GCC diagnostic push
1561+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1562 auto native_window = static_cast<EGLNativeWindowType>(
1563 mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(mir_surface)));
1564+#pragma GCC diagnostic pop
1565
1566 egl_surface = eglCreateWindowSurface(egl_display, egl_config, native_window, NULL);
1567 context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, context_attribs);
1568
1569=== modified file 'src/platforms/mesa/client/client_platform.cpp'
1570--- src/platforms/mesa/client/client_platform.cpp 2016-10-12 06:03:15 +0000
1571+++ src/platforms/mesa/client/client_platform.cpp 2016-10-28 13:38:48 +0000
1572@@ -121,8 +121,11 @@
1573 MirPlatformMessage* mclm::ClientPlatform::platform_operation(
1574 MirPlatformMessage const* msg)
1575 {
1576+#pragma GCC diagnostic push
1577+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1578 auto const op = mir_platform_message_get_opcode(msg);
1579 auto const msg_data = mir_platform_message_get_data(msg);
1580+#pragma GCC diagnostic pop
1581
1582 if (op == MirMesaPlatformOperation::set_gbm_device &&
1583 msg_data.size == sizeof(MirMesaSetGBMDeviceRequest))
1584@@ -134,8 +137,11 @@
1585
1586 static int const success{0};
1587 MirMesaSetGBMDeviceResponse const response{success};
1588+#pragma GCC diagnostic push
1589+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1590 auto const response_msg = mir_platform_message_create(op);
1591 mir_platform_message_set_data(response_msg, &response, sizeof(response));
1592+#pragma GCC diagnostic pop
1593
1594 return response_msg;
1595 }
1596
1597=== modified file 'src/server/graphics/nested/mir_client_host_connection.cpp'
1598--- src/server/graphics/nested/mir_client_host_connection.cpp 2016-10-12 06:03:15 +0000
1599+++ src/server/graphics/nested/mir_client_host_connection.cpp 2016-10-28 13:38:48 +0000
1600@@ -128,13 +128,19 @@
1601
1602 EGLNativeWindowType egl_native_window() override
1603 {
1604+#pragma GCC diagnostic push
1605+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1606 return reinterpret_cast<EGLNativeWindowType>(
1607 mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(mir_surface)));
1608+#pragma GCC diagnostic pop
1609 }
1610
1611 void set_event_handler(mir_surface_event_callback cb, void* context) override
1612 {
1613+#pragma GCC diagnostic push
1614+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1615 mir_surface_set_event_handler(mir_surface, cb, context);
1616+#pragma GCC diagnostic pop
1617 }
1618
1619 void set_cursor_image(mg::CursorImage const& image)
1620@@ -165,12 +171,15 @@
1621
1622 if (new_cursor)
1623 {
1624+#pragma GCC diagnostic push
1625+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1626 cursor = mir_connection_create_buffer_stream_sync(
1627 mir_connection,
1628 image_width,
1629 image_height,
1630 cursor_pixel_format,
1631 mir_buffer_usage_software);
1632+#pragma GCC diagnostic pop
1633
1634 mir_buffer_stream_get_graphics_region(cursor, &g);
1635 }
1636@@ -186,7 +195,10 @@
1637 auto conf = mir_cursor_configuration_from_buffer_stream(
1638 cursor, cursor_hotspot.dx.as_int(), cursor_hotspot.dy.as_int());
1639
1640+#pragma GCC diagnostic push
1641+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1642 mir_surface_configure_cursor(mir_surface, conf);
1643+#pragma GCC diagnostic pop
1644 mir_cursor_configuration_destroy(conf);
1645 }
1646 }
1647@@ -196,7 +208,10 @@
1648 if (cursor) { mir_buffer_stream_release_sync(cursor); cursor = nullptr; }
1649
1650 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);
1651+#pragma GCC diagnostic push
1652+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1653 mir_surface_configure_cursor(mir_surface, conf);
1654+#pragma GCC diagnostic pop
1655 mir_cursor_configuration_destroy(conf);
1656 }
1657
1658@@ -210,6 +225,8 @@
1659 class MirClientHostStream : public mgn::HostStream
1660 {
1661 public:
1662+#pragma GCC diagnostic push
1663+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1664 MirClientHostStream(MirConnection* connection, mg::BufferProperties const& properties) :
1665 stream(mir_connection_create_buffer_stream_sync(connection,
1666 properties.size.width.as_int(), properties.size.height.as_int(),
1667@@ -217,6 +234,7 @@
1668 (properties.usage == mg::BufferUsage::hardware) ? mir_buffer_usage_hardware : mir_buffer_usage_software))
1669 {
1670 }
1671+#pragma GCC diagnostic pop
1672
1673 ~MirClientHostStream()
1674 {
1675@@ -225,7 +243,10 @@
1676
1677 EGLNativeWindowType egl_native_window() const override
1678 {
1679+#pragma GCC diagnostic push
1680+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1681 return reinterpret_cast<EGLNativeWindowType>(mir_buffer_stream_get_egl_native_window(stream));
1682+#pragma GCC diagnostic pop
1683 }
1684
1685 MirBufferStream* handle() const override
1686@@ -314,7 +335,10 @@
1687 std::vector<int> mgn::MirClientHostConnection::platform_fd_items()
1688 {
1689 MirPlatformPackage pkg;
1690+#pragma GCC diagnostic push
1691+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1692 mir_connection_get_platform(mir_connection, &pkg);
1693+#pragma GCC diagnostic pop
1694 return std::vector<int>(pkg.fd, pkg.fd + pkg.fd_items);
1695 }
1696
1697@@ -327,12 +351,15 @@
1698 auto mgn::MirClientHostConnection::create_display_config()
1699 -> std::shared_ptr<MirDisplayConfiguration>
1700 {
1701+#pragma GCC diagnostic push
1702+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1703 return std::shared_ptr<MirDisplayConfiguration>(
1704 mir_connection_create_display_config(mir_connection),
1705 [] (MirDisplayConfiguration* c)
1706 {
1707 if (c) mir_display_config_destroy(c);
1708 });
1709+#pragma GCC diagnostic pop
1710 }
1711
1712 void mgn::MirClientHostConnection::set_display_config_change_callback(
1713@@ -347,7 +374,10 @@
1714 void mgn::MirClientHostConnection::apply_display_config(
1715 MirDisplayConfiguration& display_config)
1716 {
1717+#pragma GCC diagnostic push
1718+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1719 mir_wait_for(mir_connection_apply_display_config(mir_connection, &display_config));
1720+#pragma GCC diagnostic pop
1721 }
1722
1723 std::shared_ptr<mgn::HostSurface> mgn::MirClientHostConnection::create_surface(
1724@@ -369,10 +399,16 @@
1725 mir_buffer_usage_hardware : mir_buffer_usage_software;
1726
1727 mir_surface_spec_set_name(spec.get(), name);
1728+#pragma GCC diagnostic push
1729+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1730 mir_surface_spec_set_buffer_usage(spec.get(), usage);
1731+#pragma GCC diagnostic pop
1732 mir_surface_spec_set_fullscreen_on_output(spec.get(), output_id);
1733 MirBufferStreamInfo info { stream->handle(), displacement.dx.as_int(), displacement.dy.as_int() };
1734+#pragma GCC diagnostic push
1735+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1736 mir_surface_spec_set_streams(spec.get(), &info, 1);
1737+#pragma GCC diagnostic pop
1738
1739 auto surf = std::shared_ptr<MirClientHostSurface>(
1740 new MirClientHostSurface(mir_connection, spec.get()),
1741@@ -394,6 +430,8 @@
1742 mg::PlatformOperationMessage mgn::MirClientHostConnection::platform_operation(
1743 unsigned int op, mg::PlatformOperationMessage const& request)
1744 {
1745+#pragma GCC diagnostic push
1746+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1747 auto const msg = mir::raii::deleter_for(
1748 mir_platform_message_create(op),
1749 mir_platform_message_release);
1750@@ -413,6 +451,7 @@
1751
1752 auto reply_data = mir_platform_message_get_data(reply.get());
1753 auto reply_fds = mir_platform_message_get_fds(reply.get());
1754+#pragma GCC diagnostic pop
1755
1756 return PlatformOperationMessage{
1757 {static_cast<uint8_t const*>(reply_data.data),
1758@@ -445,7 +484,10 @@
1759 {
1760 MirModuleProperties properties = { nullptr, 0, 0, 0, nullptr };
1761
1762+#pragma GCC diagnostic push
1763+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1764 mir_connection_get_graphics_module(mir_connection, &properties);
1765+#pragma GCC diagnostic pop
1766
1767 if (properties.filename == nullptr)
1768 {
1769
1770=== modified file 'src/utils/out.c'
1771--- src/utils/out.c 2016-10-12 06:03:15 +0000
1772+++ src/utils/out.c 2016-10-28 13:38:48 +0000
1773@@ -84,7 +84,11 @@
1774
1775 printf("Connected to server: %s\n", server ? server : "<default>");
1776
1777+ // TODO Update to the new DisplayConfig API
1778+#pragma GCC diagnostic push
1779+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1780 MirDisplayConfiguration *conf = mir_connection_create_display_config(conn);
1781+#pragma GCC diagnostic pop
1782 if (conf == NULL)
1783 {
1784 fprintf(stderr, "Failed to get display configuration (!?)\n");
1785@@ -102,11 +106,14 @@
1786 {
1787 const MirDisplayOutput *out = conf->outputs + i;
1788
1789+#pragma GCC diagnostic push
1790+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1791 printf("Output %u: Card %u, %s, %s",
1792 out->output_id,
1793 out->card_id,
1794 mir_display_output_type_name(out->type),
1795 out->connected ? "connected" : "disconnected");
1796+#pragma GCC diagnostic pop
1797
1798 if (out->connected)
1799 {
1800
1801=== modified file 'src/utils/ping.c'
1802--- src/utils/ping.c 2015-06-17 05:20:42 +0000
1803+++ src/utils/ping.c 2016-10-28 13:38:48 +0000
1804@@ -86,7 +86,10 @@
1805 &valid_formats);
1806
1807 MirSurfaceSpec *spec = mir_connection_create_spec_for_normal_surface(conn, 1, 1, formats[0]);
1808+#pragma GCC diagnostic push
1809+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1810 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
1811+#pragma GCC diagnostic pop
1812 mir_surface_spec_set_name(spec, "ping");
1813
1814 MirSurface *surf = mir_surface_create_sync(spec);
1815@@ -116,7 +119,10 @@
1816 long long start, duration;
1817
1818 start = now();
1819+#pragma GCC diagnostic push
1820+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1821 mir_wait_for(mir_surface_set_preferred_orientation(surf, types[t]));
1822+#pragma GCC diagnostic pop
1823 duration = now() - start;
1824 t ^= 1;
1825
1826
1827=== modified file 'src/utils/screencast.cpp'
1828--- src/utils/screencast.cpp 2015-07-16 07:03:19 +0000
1829+++ src/utils/screencast.cpp 2016-10-28 13:38:48 +0000
1830@@ -326,9 +326,12 @@
1831 reinterpret_cast<EGLNativeDisplayType>(
1832 mir_connection_get_egl_native_display(connection));
1833
1834+#pragma GCC diagnostic push
1835+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1836 auto native_window =
1837 reinterpret_cast<EGLNativeWindowType>(
1838 mir_buffer_stream_get_egl_native_window(buffer_stream));
1839+#pragma GCC diagnostic push
1840
1841 egl_display = eglGetDisplay(native_display);
1842
1843@@ -515,9 +518,12 @@
1844 throw std::runtime_error(std::string(msg));
1845 }
1846
1847+#pragma GCC diagnostic push
1848+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1849 auto const display_config = mir::raii::deleter_for(
1850 mir_connection_create_display_config(connection.get()),
1851 &mir_display_config_destroy);
1852+#pragma GCC diagnostic push
1853
1854 if (display_config == nullptr)
1855 throw std::runtime_error("Failed to get display configuration\n");
1856@@ -535,7 +541,10 @@
1857 if (mir_screencast == nullptr)
1858 throw std::runtime_error("Failed to create screencast");
1859
1860+#pragma GCC diagnostic push
1861+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1862 auto buffer_stream = mir_screencast_get_buffer_stream(mir_screencast.get());
1863+#pragma GCC diagnostic push
1864 if (buffer_stream == nullptr)
1865 throw std::runtime_error("Failed to obtain buffer stream from screencast");
1866
1867
1868=== modified file 'src/utils/vanity.c'
1869--- src/utils/vanity.c 2016-10-21 07:53:23 +0000
1870+++ src/utils/vanity.c 2016-10-28 13:38:48 +0000
1871@@ -718,7 +718,10 @@
1872 false
1873 };
1874 MirSurface* surface = mir_eglapp_native_surface();
1875+#pragma GCC diagnostic push
1876+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1877 mir_surface_set_event_handler(surface, on_event, &state);
1878+#pragma GCC diagnostic pop
1879
1880 GLint tint = glGetUniformLocation(prog, "tint");
1881
1882@@ -840,7 +843,10 @@
1883 last_swap_time = swap_time;
1884 }
1885
1886+#pragma GCC diagnostic push
1887+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1888 mir_surface_set_event_handler(surface, NULL, NULL);
1889+#pragma GCC diagnostic pop
1890 mir_eglapp_cleanup();
1891
1892 pthread_join(capture_thread, NULL);
1893
1894=== modified file 'tests/acceptance-tests/test_buffer_stream_arrangement.cpp'
1895--- tests/acceptance-tests/test_buffer_stream_arrangement.cpp 2016-10-12 06:03:15 +0000
1896+++ tests/acceptance-tests/test_buffer_stream_arrangement.cpp 2016-10-28 13:38:48 +0000
1897@@ -66,6 +66,8 @@
1898
1899 struct Stream
1900 {
1901+#pragma GCC diagnostic push
1902+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1903 Stream(MirConnection* connection, geom::Rectangle rect) :
1904 stream(mir_connection_create_buffer_stream_sync(
1905 connection,
1906@@ -79,6 +81,7 @@
1907 {
1908 mir_buffer_stream_swap_buffers_sync(stream);
1909 }
1910+#pragma GCC diagnostic pop
1911
1912 ~Stream()
1913 {
1914@@ -237,8 +240,11 @@
1915 auto const spec = mir_connection_create_spec_for_normal_surface(
1916 connection, surface_size.width.as_int(), surface_size.height.as_int(), mir_pixel_format_abgr_8888);
1917 mir_surface_spec_set_name(spec, "BufferStreamArrangement.can_be_specified_when_creating_surface");
1918+#pragma GCC diagnostic push
1919+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1920 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
1921 mir_surface_spec_set_streams(spec, infos.data(), infos.size());
1922+#pragma GCC diagnostic pop
1923
1924 surface = mir_surface_create_sync(spec);
1925 mir_surface_spec_release(spec);
1926@@ -259,7 +265,10 @@
1927 }
1928
1929 auto change_spec = mir_connection_create_spec_for_changes(connection);
1930+#pragma GCC diagnostic push
1931+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1932 mir_surface_spec_set_streams(change_spec, infos.data(), infos.size());
1933+#pragma GCC diagnostic pop
1934 mir_surface_apply_spec(surface, change_spec);
1935 mir_surface_spec_release(change_spec);
1936
1937@@ -294,7 +303,10 @@
1938
1939 auto spec = mir_connection_create_spec_for_normal_surface(
1940 connection, 100, 100, mir_pixel_format_abgr_8888);
1941+#pragma GCC diagnostic push
1942+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1943 mir_surface_spec_set_streams(spec, infos.data(), infos.size());
1944+#pragma GCC diagnostic pop
1945 auto surface = mir_surface_create_sync(spec);
1946 mir_surface_spec_release(spec);
1947 EXPECT_TRUE(mir_surface_is_valid(surface));
1948@@ -304,7 +316,10 @@
1949 TEST_F(BufferStreamArrangement, when_non_default_streams_are_set_surface_get_stream_gives_null)
1950 {
1951 using namespace testing;
1952+#pragma GCC diagnostic push
1953+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1954 EXPECT_TRUE(mir_buffer_stream_is_valid(mir_surface_get_buffer_stream(surface)));
1955+#pragma GCC diagnostic pop
1956
1957 std::vector<MirBufferStreamInfo> infos(streams.size());
1958 auto i = 0u;
1959@@ -316,9 +331,12 @@
1960 stream->position().y.as_int()};
1961 }
1962 auto change_spec = mir_connection_create_spec_for_changes(connection);
1963+#pragma GCC diagnostic push
1964+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1965 mir_surface_spec_set_streams(change_spec, infos.data(), infos.size());
1966 mir_surface_apply_spec(surface, change_spec);
1967 mir_surface_spec_release(change_spec);
1968
1969 EXPECT_THAT(mir_surface_get_buffer_stream(surface), Eq(nullptr));
1970+#pragma GCC diagnostic pop
1971 }
1972
1973=== modified file 'tests/acceptance-tests/test_client_cookie.cpp'
1974--- tests/acceptance-tests/test_client_cookie.cpp 2016-07-18 07:38:38 +0000
1975+++ tests/acceptance-tests/test_client_cookie.cpp 2016-10-28 13:38:48 +0000
1976@@ -65,7 +65,10 @@
1977 surface = mir_surface_create_sync(spec);
1978 mir_surface_spec_release(spec);
1979
1980+#pragma GCC diagnostic push
1981+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1982 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
1983+#pragma GCC diagnostic pop
1984
1985 ready_to_accept_events.wait_for(max_wait);
1986 if (!ready_to_accept_events.raised())
1987
1988=== modified file 'tests/acceptance-tests/test_client_focus_notification.cpp'
1989--- tests/acceptance-tests/test_client_focus_notification.cpp 2016-07-18 07:38:38 +0000
1990+++ tests/acceptance-tests/test_client_focus_notification.cpp 2016-10-28 13:38:48 +0000
1991@@ -46,7 +46,10 @@
1992 surface = mir_surface_create_sync(spec);
1993 mir_surface_spec_release(spec);
1994
1995+#pragma GCC diagnostic push
1996+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1997 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
1998+#pragma GCC diagnostic pop
1999 }
2000
2001 ~FocusSurface()
2002
2003=== modified file 'tests/acceptance-tests/test_client_input.cpp'
2004--- tests/acceptance-tests/test_client_input.cpp 2016-10-12 06:03:15 +0000
2005+++ tests/acceptance-tests/test_client_input.cpp 2016-10-28 13:38:48 +0000
2006@@ -97,10 +97,12 @@
2007 if (!mir_surface_is_valid(surface))
2008 BOOST_THROW_EXCEPTION(std::runtime_error{std::string{"Failed creating a surface: "}+
2009 mir_surface_get_error_message(surface)});
2010-
2011+#pragma GCC diagnostic push
2012+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2013 mir_surface_set_event_handler(surface, handle_event, this);
2014 mir_buffer_stream_swap_buffers_sync(
2015 mir_surface_get_buffer_stream(surface));
2016+#pragma GCC diagnostic pop
2017
2018 ready_to_accept_events.wait_for(4s);
2019 if (!ready_to_accept_events.raised())
2020@@ -144,7 +146,10 @@
2021 // Remove the event handler to avoid handling spurious events unrelated
2022 // to the tests (e.g. pointer leave events when the surface is destroyed),
2023 // which can cause test expectations to fail.
2024+#pragma GCC diagnostic push
2025+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2026 mir_surface_set_event_handler(surface, null_event_handler, nullptr);
2027+#pragma GCC diagnostic pop
2028 mir_surface_release_sync(surface);
2029 mir_connection_release(connection);
2030 }
2031
2032=== modified file 'tests/acceptance-tests/test_client_library.cpp'
2033--- tests/acceptance-tests/test_client_library.cpp 2016-08-09 14:32:31 +0000
2034+++ tests/acceptance-tests/test_client_library.cpp 2016-10-28 13:38:48 +0000
2035@@ -113,6 +113,8 @@
2036 {
2037 for (int i = 0; i < 10; i++)
2038 {
2039+#pragma GCC diagnostic push
2040+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2041 mir_wait_for_one(mir_surface_set_state(surf,
2042 mir_surface_state_maximized));
2043 mir_wait_for_one(mir_surface_set_state(surf,
2044@@ -121,6 +123,7 @@
2045 mir_surface_state_fullscreen));
2046 mir_wait_for_one(mir_surface_set_state(surf,
2047 mir_surface_state_minimized));
2048+#pragma GCC diagnostic pop
2049 }
2050 }
2051
2052@@ -227,7 +230,10 @@
2053
2054 auto spec = mir_connection_create_spec_for_normal_surface(connection, request_width,
2055 request_height, request_format);
2056+#pragma GCC diagnostic push
2057+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2058 mir_surface_spec_set_buffer_usage(spec, request_buffer_usage);
2059+#pragma GCC diagnostic pop
2060 surface = mir_surface_create_sync(spec);
2061 mir_surface_spec_release(spec);
2062
2063@@ -236,7 +242,10 @@
2064 EXPECT_THAT(mir_surface_get_error_message(surface), StrEq(""));
2065
2066 MirSurfaceParameters response_params;
2067+#pragma GCC diagnostic push
2068+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2069 mir_surface_get_parameters(surface, &response_params);
2070+#pragma GCC diagnostic pop
2071 EXPECT_EQ(request_width, response_params.width);
2072 EXPECT_EQ(request_height, response_params.height);
2073 EXPECT_EQ(request_format, response_params.pixel_format);
2074@@ -257,6 +266,8 @@
2075 mir_wait_for(mir_surface_create(spec, create_surface_callback, this));
2076 mir_surface_spec_release(spec);
2077
2078+#pragma GCC diagnostic push
2079+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2080 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_restored));
2081
2082 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));
2083@@ -279,6 +290,7 @@
2084 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));
2085 ASSERT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_fullscreen));
2086 }
2087+#pragma GCC diagnostic pop
2088
2089 mir_surface_release_sync(surface);
2090 mir_connection_release(connection);
2091@@ -404,7 +416,10 @@
2092 surface = mir_surface_create_sync(spec);
2093 mir_surface_spec_release(spec);
2094
2095+#pragma GCC diagnostic push
2096+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2097 auto const buffer_stream = mir_surface_get_buffer_stream(surface);
2098+#pragma GCC diagnostic pop
2099
2100 MirGraphicsRegion graphics_region;
2101 mir_buffer_stream_get_graphics_region(buffer_stream, &graphics_region);
2102@@ -427,7 +442,10 @@
2103 mir_surface_spec_release(spec);
2104
2105 // Expect zero (not wired up to detect the physical display yet)
2106+#pragma GCC diagnostic push
2107+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2108 EXPECT_THAT(mir_surface_get_dpi(surface), Eq(0));
2109+#pragma GCC diagnostic pop
2110
2111 mir_surface_release_sync(surface);
2112 mir_connection_release(connection);
2113@@ -440,13 +458,19 @@
2114 auto const spec =
2115 mir_connection_create_spec_for_normal_surface(
2116 connection, 1280, 1024, mir_pixel_format_abgr_8888);
2117+#pragma GCC diagnostic push
2118+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2119 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
2120+#pragma GCC diagnostic pop
2121
2122 surface = mir_surface_create_sync(spec);
2123
2124 MirNativeBuffer *native;
2125+#pragma GCC diagnostic push
2126+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2127 auto bs = mir_surface_get_buffer_stream(surface);
2128 mir_buffer_stream_get_current_buffer(bs, &native);
2129+#pragma GCC diagnostic pop
2130 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
2131 mir_buffer_stream_swap_buffers_sync(bs);
2132 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
2133@@ -456,8 +480,11 @@
2134 mir_surface_spec_set_height(spec, 100);
2135
2136 surface = mir_surface_create_sync(spec);
2137+#pragma GCC diagnostic push
2138+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2139 bs = mir_surface_get_buffer_stream(surface);
2140 mir_buffer_stream_get_current_buffer(bs, &native);
2141+#pragma GCC diagnostic pop
2142 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
2143 mir_buffer_stream_swap_buffers_sync(bs);
2144 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
2145@@ -466,21 +493,33 @@
2146
2147 mir_surface_spec_set_width(spec, 800);
2148 mir_surface_spec_set_height(spec, 600);
2149+#pragma GCC diagnostic push
2150+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2151 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
2152+#pragma GCC diagnostic pop
2153
2154 surface = mir_surface_create_sync(spec);
2155+#pragma GCC diagnostic push
2156+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2157 bs = mir_surface_get_buffer_stream(surface);
2158 mir_buffer_stream_get_current_buffer(bs, &native);
2159+#pragma GCC diagnostic pop
2160 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
2161 mir_buffer_stream_swap_buffers_sync(bs);
2162 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
2163 mir_surface_release_sync(surface);
2164
2165+#pragma GCC diagnostic push
2166+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2167 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
2168+#pragma GCC diagnostic pop
2169
2170 surface = mir_surface_create_sync(spec);
2171+#pragma GCC diagnostic push
2172+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2173 bs = mir_surface_get_buffer_stream(surface);
2174 mir_buffer_stream_get_current_buffer(bs, &native);
2175+#pragma GCC diagnostic pop
2176 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
2177 mir_buffer_stream_swap_buffers_sync(bs);
2178 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
2179@@ -497,7 +536,10 @@
2180 auto const spec =
2181 mir_connection_create_spec_for_normal_surface(
2182 connection, 0, 0, mir_pixel_format_abgr_8888);
2183+#pragma GCC diagnostic push
2184+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2185 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
2186+#pragma GCC diagnostic pop
2187
2188 struct {int width, height;} const sizes[] =
2189 {
2190@@ -512,6 +554,8 @@
2191 mir_surface_spec_set_height(spec, size.height);
2192
2193 surface = mir_surface_create_sync(spec);
2194+#pragma GCC diagnostic push
2195+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2196 auto bs = mir_surface_get_buffer_stream(surface);
2197
2198 MirNativeBuffer *native = NULL;
2199@@ -525,6 +569,7 @@
2200 ASSERT_THAT(native, NotNull());
2201 EXPECT_THAT(native->width, Eq(size.width));
2202 ASSERT_THAT(native->height, Eq(size.height));
2203+#pragma GCC diagnostic pop
2204
2205 mir_surface_release_sync(surface);
2206 }
2207@@ -543,8 +588,10 @@
2208 auto const spec =
2209 mir_connection_create_spec_for_normal_surface(
2210 connection, 640, 480, mir_pixel_format_abgr_8888);
2211-
2212+#pragma GCC diagnostic push
2213+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2214 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
2215+#pragma GCC diagnostic pop
2216 for (int i = 0; i != n_surfaces; ++i)
2217 {
2218 old_surface_count = current_surface_count();
2219@@ -576,7 +623,10 @@
2220 surface = mtf::make_any_surface(connection);
2221
2222 buffers = 0;
2223+#pragma GCC diagnostic push
2224+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2225 mir_wait_for(mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), next_buffer_callback, this));
2226+#pragma GCC diagnostic pop
2227 EXPECT_THAT(buffers, Eq(1));
2228
2229 mir_wait_for(mir_surface_release(surface, release_surface_callback, this));
2230@@ -592,7 +642,10 @@
2231
2232 surface = mtf::make_any_surface(connection);
2233
2234+#pragma GCC diagnostic push
2235+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2236 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
2237+#pragma GCC diagnostic pop
2238 EXPECT_TRUE(mir_surface_is_valid(surface));
2239 EXPECT_STREQ(mir_surface_get_error_message(surface), "");
2240
2241@@ -617,7 +670,10 @@
2242 b.join();
2243 c.join();
2244
2245+#pragma GCC diagnostic push
2246+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2247 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_minimized));
2248+#pragma GCC diagnostic pop
2249
2250 mir_surface_release_sync(surface);
2251
2252@@ -634,7 +690,10 @@
2253 MirPlatformPackage platform_package;
2254 ::memset(&platform_package, -1, sizeof(platform_package));
2255
2256+#pragma GCC diagnostic push
2257+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2258 mir_connection_get_platform(connection, &platform_package);
2259+#pragma GCC diagnostic pop
2260 EXPECT_THAT(platform_package, mtf::IsStubPlatformPackage());
2261
2262 mir_connection_release(connection);
2263@@ -644,7 +703,10 @@
2264 {
2265 mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this));
2266
2267+#pragma GCC diagnostic push
2268+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2269 auto configuration = mir_connection_create_display_config(connection);
2270+#pragma GCC diagnostic pop
2271 ASSERT_THAT(configuration, NotNull());
2272 ASSERT_GT(configuration->num_outputs, 0u);
2273 ASSERT_THAT(configuration->outputs, NotNull());
2274@@ -674,10 +736,13 @@
2275
2276 while (buffers < 1024)
2277 {
2278+#pragma GCC diagnostic push
2279+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2280 mir_buffer_stream_swap_buffers_sync(
2281 mir_surface_get_buffer_stream(surf_one));
2282 mir_buffer_stream_swap_buffers_sync(
2283 mir_surface_get_buffer_stream(surf_two));
2284+#pragma GCC diagnostic pop
2285
2286 buffers++;
2287 }
2288@@ -726,12 +791,15 @@
2289 EXPECT_THAT(surface, IsValid());
2290
2291 MirNativeBuffer* native_buffer;
2292+#pragma GCC diagnostic push
2293+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2294 mir_buffer_stream_get_current_buffer(
2295 mir_surface_get_buffer_stream(surface), &native_buffer);
2296
2297 EXPECT_THAT(native_buffer->width, Eq(width));
2298 EXPECT_THAT(native_buffer->height, Eq(height));
2299 EXPECT_THAT(mir_surface_get_type(surface), Eq(mir_surface_type_normal));
2300+#pragma GCC diagnostic pop
2301
2302 mir_surface_release_sync(surface);
2303 mir_connection_release(connection);
2304@@ -753,12 +821,15 @@
2305 EXPECT_THAT(surface, IsValid());
2306
2307 MirNativeBuffer* native_buffer;
2308+#pragma GCC diagnostic push
2309+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2310 mir_buffer_stream_get_current_buffer(
2311 mir_surface_get_buffer_stream(surface), &native_buffer);
2312
2313 EXPECT_THAT(native_buffer->width, Eq(width));
2314 EXPECT_THAT(native_buffer->height, Eq(height));
2315 EXPECT_THAT(mir_surface_get_type(surface), Eq(mir_surface_type_normal));
2316+#pragma GCC diagnostic pop
2317
2318 mir_surface_release_sync(surface);
2319 mir_connection_release(connection);
2320@@ -781,11 +852,14 @@
2321 mir_surface_spec_set_width(surface_spec, width);
2322 mir_surface_spec_set_height(surface_spec, height);
2323
2324+#pragma GCC diagnostic push
2325+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2326 MirPixelFormat const pixel_format{mir_pixel_format_argb_8888};
2327 mir_surface_spec_set_pixel_format(surface_spec, pixel_format);
2328
2329 MirBufferUsage const buffer_usage{mir_buffer_usage_hardware};
2330 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);
2331+#pragma GCC diagnostic pop
2332
2333 auto surface = mir_surface_create_sync(surface_spec);
2334 mir_surface_spec_release(surface_spec);
2335@@ -807,7 +881,10 @@
2336 mir_pixel_format_xbgr_8888);
2337
2338 // We need to specify a valid output id, so we need to find which ones are valid...
2339+#pragma GCC diagnostic push
2340+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2341 auto configuration = mir_connection_create_display_config(connection);
2342+#pragma GCC diagnostic pop
2343 ASSERT_THAT(configuration->num_outputs, Ge(1));
2344
2345 auto const requested_output = configuration->outputs[0];
2346@@ -820,8 +897,11 @@
2347 EXPECT_THAT(surface, IsValid());
2348
2349 MirNativeBuffer* native_buffer;
2350+#pragma GCC diagnostic push
2351+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2352 mir_buffer_stream_get_current_buffer(
2353 mir_surface_get_buffer_stream(surface), &native_buffer);
2354+#pragma GCC diagnostic pop
2355
2356 EXPECT_THAT(native_buffer->width,
2357 Eq(requested_output.modes[requested_output.current_mode].horizontal_resolution));
2358@@ -854,7 +934,10 @@
2359 mir_pixel_format_bgr_888);
2360
2361 MirBufferUsage const buffer_usage{mir_buffer_usage_hardware};
2362+#pragma GCC diagnostic push
2363+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2364 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);
2365+#pragma GCC diagnostic pop
2366
2367 auto surface = mir_surface_create_sync(surface_spec);
2368 mir_surface_spec_release(surface_spec);
2369@@ -864,8 +947,11 @@
2370 MirNativeBuffer* native_buffer;
2371 // We use the fact that our stub client platform returns NULL if asked for a native
2372 // buffer on a surface with mir_buffer_usage_software set.
2373+#pragma GCC diagnostic push
2374+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2375 mir_buffer_stream_get_current_buffer(
2376 mir_surface_get_buffer_stream(surface), &native_buffer);
2377+#pragma GCC diagnostic pop
2378
2379 EXPECT_THAT(native_buffer, Not(Eq(nullptr)));
2380
2381@@ -884,7 +970,10 @@
2382 mir_pixel_format_bgr_888);
2383
2384 MirBufferUsage const buffer_usage{mir_buffer_usage_software};
2385+#pragma GCC diagnostic push
2386+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2387 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);
2388+#pragma GCC diagnostic pop
2389
2390 auto surface = mir_surface_create_sync(surface_spec);
2391 mir_surface_spec_release(surface_spec);
2392@@ -894,8 +983,11 @@
2393 MirGraphicsRegion graphics_region;
2394 // We use the fact that our stub client platform returns a NULL vaddr if
2395 // asked to map a hardware buffer.
2396+#pragma GCC diagnostic push
2397+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2398 mir_buffer_stream_get_graphics_region(
2399 mir_surface_get_buffer_stream(surface), &graphics_region);
2400+#pragma GCC diagnostic pop
2401
2402 EXPECT_THAT(graphics_region.vaddr, Not(Eq(nullptr)));
2403
2404@@ -936,8 +1028,11 @@
2405 *
2406 * Without manual dispatch, it's racy to try and test that.
2407 */
2408+#pragma GCC diagnostic push
2409+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2410 mir_surface_set_event_handler(surface, &dummy_event_handler_one, nullptr);
2411 mir_surface_set_event_handler(surface, &dummy_event_handler_two, nullptr);
2412+#pragma GCC diagnostic pop
2413
2414 mir_surface_release_sync(surface);
2415 mir_connection_release(connection);
2416@@ -1012,9 +1107,11 @@
2417 {
2418 connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
2419 ASSERT_TRUE(mir_connection_is_valid(connection));
2420-
2421+#pragma GCC diagnostic push
2422+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2423 auto stream = mir_connection_create_buffer_stream_sync(connection,
2424 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);
2425+#pragma GCC diagnostic pop
2426
2427 ASSERT_THAT(stream, NotNull());
2428 EXPECT_TRUE(mir_buffer_stream_is_valid(stream));
2429
2430=== modified file 'tests/acceptance-tests/test_client_library_callbacks.cpp'
2431--- tests/acceptance-tests/test_client_library_callbacks.cpp 2015-07-23 10:55:34 +0000
2432+++ tests/acceptance-tests/test_client_library_callbacks.cpp 2016-10-28 13:38:48 +0000
2433@@ -148,9 +148,11 @@
2434 {
2435 connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
2436 surface = mtf::make_any_surface(connection);
2437-
2438+#pragma GCC diagnostic push
2439+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2440 auto const wh = mir_buffer_stream_swap_buffers(
2441 mir_surface_get_buffer_stream(surface), next_buffer_callback, this);
2442+#pragma GCC diagnostic pop
2443 mir_wait_for(wh);
2444
2445 EXPECT_THAT(buffers, Eq(1));
2446
2447=== modified file 'tests/acceptance-tests/test_client_logging.cpp'
2448--- tests/acceptance-tests/test_client_logging.cpp 2016-07-18 07:38:38 +0000
2449+++ tests/acceptance-tests/test_client_logging.cpp 2016-10-28 13:38:48 +0000
2450@@ -61,7 +61,10 @@
2451 connection, 123, 456, mir_pixel_format_abgr_8888);
2452 ASSERT_THAT(spec, NotNull());
2453 mir_surface_spec_set_name(spec, "Rumpelstiltskin");
2454+#pragma GCC diagnostic push
2455+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2456 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
2457+#pragma GCC diagnostic pop
2458 auto surf = mir_surface_create_sync(spec);
2459 ASSERT_THAT(surf, NotNull());
2460 mir_surface_spec_release(spec);
2461@@ -69,7 +72,10 @@
2462 int const target_fps = 10;
2463 int const nseconds = 3;
2464 auto const target_render_time = std::chrono::milliseconds(3);
2465+#pragma GCC diagnostic push
2466+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2467 auto bs = mir_surface_get_buffer_stream(surf);
2468+#pragma GCC diagnostic pop
2469 for (int s = 0; s < nseconds; ++s)
2470 {
2471 for (int f = 0; f < target_fps; ++f)
2472
2473=== modified file 'tests/acceptance-tests/test_client_platform_operation.cpp'
2474--- tests/acceptance-tests/test_client_platform_operation.cpp 2015-06-25 03:00:08 +0000
2475+++ tests/acceptance-tests/test_client_platform_operation.cpp 2016-10-28 13:38:48 +0000
2476@@ -34,15 +34,20 @@
2477
2478 MirPlatformMessage* platform_operation_add(std::vector<int> const& nums)
2479 {
2480+#pragma GCC diagnostic push
2481+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2482 auto const request = mir_platform_message_create(add_opcode);
2483+#pragma GCC diagnostic push
2484 mir_platform_message_set_data(request, nums.data(), sizeof(int) * nums.size());
2485 MirPlatformMessage* reply;
2486
2487 auto const platform_op_done = mir_connection_platform_operation(
2488 connection, request, assign_reply, &reply);
2489 mir_wait_for(platform_op_done);
2490-
2491+#pragma GCC diagnostic push
2492+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2493 mir_platform_message_release(request);
2494+#pragma GCC diagnostic pop
2495
2496 return reply;
2497 }
2498@@ -52,7 +57,10 @@
2499 unsigned int const echo_fd_opcode =
2500 static_cast<unsigned int>(mtf::StubGraphicsPlatformOperation::echo_fd);
2501
2502+#pragma GCC diagnostic push
2503+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2504 auto const request = mir_platform_message_create(echo_fd_opcode);
2505+#pragma GCC diagnostic pop
2506 mir_platform_message_set_fds(request, &fd, 1);
2507 MirPlatformMessage* reply;
2508
2509@@ -60,7 +68,10 @@
2510 connection, request, assign_reply, &reply);
2511 mir_wait_for(platform_op_done);
2512
2513+#pragma GCC diagnostic push
2514+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2515 mir_platform_message_release(request);
2516+#pragma GCC diagnostic pop
2517
2518 return reply;
2519 }
2520@@ -72,7 +83,10 @@
2521 MATCHER_P(MessageDataAsIntsEq, v, "")
2522 {
2523 using namespace testing;
2524+#pragma GCC diagnostic push
2525+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2526 auto msg_data = mir_platform_message_get_data(arg);
2527+#pragma GCC diagnostic pop
2528 if (msg_data.size % sizeof(int) != 0)
2529 throw std::runtime_error("Data is not an array of ints");
2530
2531@@ -84,19 +98,28 @@
2532
2533 MATCHER(MessageDataIsEmpty, "")
2534 {
2535+#pragma GCC diagnostic push
2536+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2537 auto const msg_data = mir_platform_message_get_data(arg);
2538+#pragma GCC diagnostic pop
2539 return msg_data.size == 0 && msg_data.data == nullptr;
2540 }
2541
2542 MATCHER_P(MessageOpcodeEq, opcode, "")
2543 {
2544+#pragma GCC diagnostic push
2545+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2546 auto const msg_opcode = mir_platform_message_get_opcode(arg);
2547+#pragma GCC diagnostic pop
2548 return msg_opcode == opcode;
2549 }
2550
2551 MATCHER(MessageFdsIsEmpty, "")
2552 {
2553+#pragma GCC diagnostic push
2554+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2555 auto const msg_fds = mir_platform_message_get_fds(arg);
2556+#pragma GCC diagnostic pop
2557 return msg_fds.num_fds == 0 && msg_fds.fds == nullptr;
2558 }
2559
2560@@ -113,7 +136,10 @@
2561
2562 EXPECT_THAT(reply, MessageDataAsIntsEq(std::vector<int>{num1 + num2}));
2563
2564+#pragma GCC diagnostic push
2565+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2566 mir_platform_message_release(reply);
2567+#pragma GCC diagnostic pop
2568 }
2569
2570 TEST_F(ClientPlatformOperation, does_not_set_connection_error_message_on_success)
2571@@ -124,7 +150,10 @@
2572
2573 EXPECT_THAT(mir_connection_get_error_message(connection), StrEq(""));
2574
2575+#pragma GCC diagnostic push
2576+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2577 mir_platform_message_release(reply);
2578+#pragma GCC diagnostic pop
2579 }
2580
2581 TEST_F(ClientPlatformOperation, reply_has_opcode_of_request)
2582@@ -135,7 +164,10 @@
2583
2584 EXPECT_THAT(reply, MessageOpcodeEq(add_opcode));
2585
2586+#pragma GCC diagnostic push
2587+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2588 mir_platform_message_release(reply);
2589+#pragma GCC diagnostic pop
2590 }
2591
2592 TEST_F(ClientPlatformOperation, returns_empty_reply_on_error)
2593@@ -147,7 +179,10 @@
2594 EXPECT_THAT(reply, MessageDataIsEmpty());
2595 EXPECT_THAT(reply, MessageFdsIsEmpty());
2596
2597+#pragma GCC diagnostic push
2598+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2599 mir_platform_message_release(reply);
2600+#pragma GCC diagnostic pop
2601 }
2602
2603 TEST_F(ClientPlatformOperation, sets_connection_error_message_on_error)
2604@@ -158,7 +193,10 @@
2605
2606 EXPECT_THAT(mir_connection_get_error_message(connection), StrNe(""));
2607
2608+#pragma GCC diagnostic push
2609+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2610 mir_platform_message_release(reply);
2611+#pragma GCC diagnostic pop
2612 }
2613
2614 TEST_F(ClientPlatformOperation, exchanges_fd_items_with_platform)
2615@@ -173,7 +211,10 @@
2616 auto const reply = platform_operation_echo_fd(pipe.read_fd());
2617 EXPECT_THAT(reply, MessageDataIsEmpty());
2618
2619+#pragma GCC diagnostic push
2620+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2621 auto const reply_fds = mir_platform_message_get_fds(reply);
2622+#pragma GCC diagnostic pop
2623 EXPECT_THAT(reply_fds.num_fds, Eq(1));
2624
2625 auto const reply_fd = reply_fds.fds[0];
2626@@ -184,5 +225,8 @@
2627 EXPECT_THAT(reply_char, Eq(sent_char));
2628
2629 close(reply_fd);
2630+#pragma GCC diagnostic push
2631+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2632 mir_platform_message_release(reply);
2633+#pragma GCC diagnostic pop
2634 }
2635
2636=== modified file 'tests/acceptance-tests/test_client_scaling.cpp'
2637--- tests/acceptance-tests/test_client_scaling.cpp 2016-07-18 07:38:38 +0000
2638+++ tests/acceptance-tests/test_client_scaling.cpp 2016-10-28 13:38:48 +0000
2639@@ -160,7 +160,10 @@
2640 {
2641 using namespace std::literals::chrono_literals;
2642 auto scale = 2.0f;
2643+#pragma GCC diagnostic push
2644+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2645 auto stream = mir_surface_get_buffer_stream(surface);
2646+#pragma GCC diagnostic pop
2647 mir_buffer_stream_set_scale(stream, scale);
2648
2649 mir_buffer_stream_swap_buffers_sync(stream);
2650
2651=== modified file 'tests/acceptance-tests/test_client_screencast.cpp'
2652--- tests/acceptance-tests/test_client_screencast.cpp 2016-07-18 07:38:38 +0000
2653+++ tests/acceptance-tests/test_client_screencast.cpp 2016-10-28 13:38:48 +0000
2654@@ -70,6 +70,8 @@
2655
2656 MirScreencastParameters params = default_screencast_params;
2657 params.width = params.height = 0;
2658+#pragma GCC diagnostic push
2659+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2660 auto screencast = mir_connection_create_screencast_sync(connection, &params);
2661 EXPECT_FALSE(mir_screencast_is_valid(screencast));
2662
2663@@ -86,6 +88,7 @@
2664 params.pixel_format = mir_pixel_format_invalid;
2665
2666 screencast = mir_connection_create_screencast_sync(connection, &params);
2667+#pragma GCC diagnostic pop
2668 EXPECT_FALSE(mir_screencast_is_valid(screencast));
2669
2670 mir_screencast_release_sync(screencast);
2671@@ -101,7 +104,10 @@
2672
2673 auto const connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
2674
2675+#pragma GCC diagnostic push
2676+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2677 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
2678+#pragma GCC diagnostic pop
2679 EXPECT_FALSE(mir_screencast_is_valid(screencast));
2680
2681 mir_screencast_release_sync(screencast);
2682
2683=== modified file 'tests/acceptance-tests/test_client_surface_events.cpp'
2684--- tests/acceptance-tests/test_client_surface_events.cpp 2016-09-30 08:31:53 +0000
2685+++ tests/acceptance-tests/test_client_surface_events.cpp 2016-10-28 13:38:48 +0000
2686@@ -128,12 +128,15 @@
2687
2688 mtf::ConnectedClientWithASurface::SetUp();
2689
2690+#pragma GCC diagnostic push
2691+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2692 mir_surface_set_event_handler(surface, &event_callback, this);
2693
2694 scene_surface = the_latest_surface();
2695
2696 other_surface = mtf::make_any_surface(connection);
2697 mir_surface_set_event_handler(other_surface, nullptr, nullptr);
2698+#pragma GCC diagnostic pop
2699
2700 reset_last_event();
2701 }
2702@@ -153,8 +156,11 @@
2703 TEST_F(ClientSurfaceEvents, surface_receives_state_events)
2704 {
2705 {
2706+#pragma GCC diagnostic push
2707+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2708 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));
2709 mir_wait_for(mir_surface_set_state(other_surface, mir_surface_state_vertmaximized));
2710+#pragma GCC diagnostic pop
2711
2712 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};
2713
2714@@ -162,7 +168,10 @@
2715 }
2716
2717 {
2718+#pragma GCC diagnostic push
2719+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2720 mir_wait_for(mir_surface_set_state(surface, static_cast<MirSurfaceState>(999)));
2721+#pragma GCC diagnostic pop
2722
2723 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};
2724 EXPECT_THAT(last_event, mt::SurfaceEvent(mir_surface_attrib_state, mir_surface_state_fullscreen));
2725@@ -171,7 +180,10 @@
2726 reset_last_event();
2727
2728 {
2729+#pragma GCC diagnostic push
2730+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2731 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_vertmaximized));
2732+#pragma GCC diagnostic pop
2733
2734 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};
2735
2736@@ -181,8 +193,11 @@
2737 reset_last_event();
2738
2739 {
2740+#pragma GCC diagnostic push
2741+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2742 mir_wait_for(mir_surface_set_state(surface, static_cast<MirSurfaceState>(777)));
2743 mir_wait_for(mir_surface_set_state(other_surface, mir_surface_state_maximized));
2744+#pragma GCC diagnostic pop
2745
2746 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};
2747
2748@@ -225,8 +240,10 @@
2749 scene_surface->set_orientation(direction);
2750
2751 EXPECT_TRUE(wait_for_event(std::chrono::seconds(1)));
2752-
2753+#pragma GCC diagnostic push
2754+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2755 EXPECT_THAT(mir_surface_get_orientation(surface), Eq(direction));
2756+#pragma GCC diagnostic pop
2757 }
2758 }
2759
2760@@ -255,8 +272,11 @@
2761 {
2762 reset_last_event();
2763
2764+#pragma GCC diagnostic push
2765+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2766 mir_wait_for(mir_surface_set_preferred_orientation(surface, mode));
2767 EXPECT_THAT(mir_surface_get_preferred_orientation(surface), Eq(mode));
2768+#pragma GCC diagnostic pop
2769 }
2770 }
2771
2772@@ -306,7 +326,10 @@
2773 {
2774 set_event_filter(mir_event_type_close_surface);
2775
2776+#pragma GCC diagnostic push
2777+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2778 mir_surface_set_event_handler(surface, nullptr, nullptr);
2779+#pragma GCC diagnostic pop
2780 scene_surface->request_client_surface_close();
2781
2782 EXPECT_FALSE(wait_for_event(std::chrono::seconds(1)));
2783@@ -348,6 +371,8 @@
2784 auto surface = mtf::make_any_surface(connection);
2785
2786 mt::Signal focus_received;
2787+#pragma GCC diagnostic push
2788+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2789 mir_surface_set_event_handler(
2790 surface,
2791 [](MirSurface*, MirEvent const* event, void* ctx)
2792@@ -359,14 +384,20 @@
2793 }
2794 },
2795 &focus_received);
2796+#pragma GCC diagnostic pop
2797
2798 // Swap buffers to get the surface into the scene so it can be focused.
2799+#pragma GCC diagnostic push
2800+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2801 auto buffer_stream = mir_surface_get_buffer_stream(surface);
2802+#pragma GCC diagnostic pop
2803 mir_buffer_stream_swap_buffers_sync(buffer_stream);
2804
2805 ASSERT_TRUE(focus_received.wait_for(10s));
2806
2807 mt::Signal unfocus_received;
2808+#pragma GCC diagnostic push
2809+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2810 mir_surface_set_event_handler(
2811 surface,
2812 [](MirSurface*, MirEvent const* event, void* ctx)
2813@@ -378,6 +409,7 @@
2814 }
2815 },
2816 &unfocus_received);
2817+#pragma GCC diagnostic pop
2818
2819 mir_surface_release_sync(surface);
2820
2821@@ -392,6 +424,8 @@
2822 auto surface = mtf::make_any_surface(connection);
2823
2824 mt::Signal focus_received;
2825+#pragma GCC diagnostic push
2826+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2827 mir_surface_set_event_handler(
2828 surface,
2829 [](MirSurface*, MirEvent const* event, void* ctx)
2830@@ -403,14 +437,20 @@
2831 }
2832 },
2833 &focus_received);
2834+#pragma GCC diagnostic pop
2835
2836 // Swap buffers to get the surface into the scene so it can be focused.
2837+#pragma GCC diagnostic push
2838+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2839 auto buffer_stream = mir_surface_get_buffer_stream(surface);
2840+#pragma GCC diagnostic pop
2841 mir_buffer_stream_swap_buffers_sync(buffer_stream);
2842
2843 ASSERT_TRUE(focus_received.wait_for(10s));
2844
2845 mt::Signal unfocus_received;
2846+#pragma GCC diagnostic push
2847+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2848 mir_surface_set_event_handler(
2849 surface,
2850 [](MirSurface*, MirEvent const* event, void* ctx)
2851@@ -422,10 +462,14 @@
2852 }
2853 },
2854 &unfocus_received);
2855+#pragma GCC diagnostic pop
2856
2857 // Add a new surface that will take focus.
2858 auto focus_grabbing_surface = mtf::make_any_surface(connection);
2859+#pragma GCC diagnostic push
2860+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2861 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(focus_grabbing_surface));
2862+#pragma GCC diagnostic pop
2863
2864 ASSERT_TRUE(unfocus_received.wait_for(10s));
2865
2866@@ -483,7 +527,10 @@
2867 mt::Signal done;
2868
2869 auto spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);
2870+#pragma GCC diagnostic push
2871+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2872 mir_surface_spec_set_event_handler(spec, &raise_signal_on_close_event, &done);
2873+#pragma GCC diagnostic pop
2874
2875 auto surface = mir_surface_create_sync(spec);
2876
2877@@ -574,7 +621,10 @@
2878 EventContext context;
2879
2880 auto spec = mir_connection_create_spec_for_normal_surface(connection, 640, 480, mir_pixel_format_abgr_8888);
2881+#pragma GCC diagnostic push
2882+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2883 mir_surface_spec_set_event_handler(spec, &surface_output_capturing_callback, &context);
2884+#pragma GCC diagnostic pop
2885 auto surface = mir_surface_create_sync(spec);
2886 mir_surface_spec_release(spec);
2887
2888
2889=== modified file 'tests/acceptance-tests/test_client_surface_swap_buffers.cpp'
2890--- tests/acceptance-tests/test_client_surface_swap_buffers.cpp 2016-05-31 12:27:12 +0000
2891+++ tests/acceptance-tests/test_client_surface_swap_buffers.cpp 2016-10-28 13:38:48 +0000
2892@@ -63,7 +63,10 @@
2893 {
2894 mt::Signal buffers_swapped;
2895
2896+#pragma GCC diagnostic push
2897+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2898 mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), swap_buffers_callback, &buffers_swapped);
2899+#pragma GCC diagnostic pop
2900
2901 /*
2902 * ASSERT instead of EXPECT, since if we continue we will block in future
2903@@ -136,6 +139,9 @@
2904 //LP: #1584784
2905 TEST_F(SwapBuffersDoesntBlockOnSubmission, can_swap_nbuffers_times_without_blocking)
2906 {
2907+#pragma GCC diagnostic push
2908+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2909 for (auto i = 0u; i != nbuffers; ++i)
2910 mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), nullptr, nullptr);
2911+#pragma GCC diagnostic pop
2912 }
2913
2914=== modified file 'tests/acceptance-tests/test_client_surface_visibility.cpp'
2915--- tests/acceptance-tests/test_client_surface_visibility.cpp 2016-08-11 07:24:14 +0000
2916+++ tests/acceptance-tests/test_client_surface_visibility.cpp 2016-10-28 13:38:48 +0000
2917@@ -109,8 +109,11 @@
2918 auto const spec = mir_connection_create_spec_for_normal_surface(
2919 connection, size.width.as_int(), size.height.as_int(), mir_pixel_format_bgr_888);
2920 mir_surface_spec_set_name(spec, name);
2921+#pragma GCC diagnostic push
2922+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2923 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
2924 mir_surface_spec_set_event_handler(spec, &event_callback, &mock_callback);
2925+#pragma GCC diagnostic pop
2926 auto surface = mir_surface_create_sync(spec);
2927 mir_surface_spec_release(spec);
2928 return surface;
2929@@ -126,7 +129,10 @@
2930
2931 ~Surface()
2932 {
2933+#pragma GCC diagnostic push
2934+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2935 mir_surface_set_event_handler(surface, null_event_callback, nullptr);
2936+#pragma GCC diagnostic pop
2937 mir_surface_release_sync(surface);
2938 }
2939
2940@@ -156,12 +162,15 @@
2941 private:
2942 void wait_for_visible_and_focused()
2943 {
2944+#pragma GCC diagnostic push
2945+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2946 expect_surface_visibility_event_after(
2947 mir_surface_visibility_exposed,
2948 [this]
2949 {
2950 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
2951 });
2952+#pragma GCC diagnostic pop
2953
2954 // GMock is behaving strangely, checking expectations after they
2955 // have been cleared, so we use spin_wait() instead.
2956
2957=== modified file 'tests/acceptance-tests/test_client_surfaces.cpp'
2958--- tests/acceptance-tests/test_client_surfaces.cpp 2016-08-09 08:13:02 +0000
2959+++ tests/acceptance-tests/test_client_surfaces.cpp 2016-10-28 13:38:48 +0000
2960@@ -134,6 +134,8 @@
2961 mir_surface_spec_release(spec);
2962
2963 MirSurfaceParameters response_params;
2964+#pragma GCC diagnostic push
2965+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2966 mir_surface_get_parameters(ssync->surface, &response_params);
2967 EXPECT_EQ(640, response_params.width);
2968 EXPECT_EQ(480, response_params.height);
2969@@ -141,6 +143,7 @@
2970 EXPECT_EQ(mir_buffer_usage_hardware, response_params.buffer_usage);
2971
2972 mir_surface_get_parameters(ssync[1].surface, &response_params);
2973+#pragma GCC diagnostic pop
2974 EXPECT_EQ(1600, response_params.width);
2975 EXPECT_EQ(1200, response_params.height);
2976 EXPECT_EQ(mir_pixel_format_abgr_8888, response_params.pixel_format);
2977@@ -207,6 +210,8 @@
2978 ASSERT_THAT(spec, NotNull());
2979
2980 MirOrientationMode mode{GetParam()};
2981+#pragma GCC diagnostic push
2982+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2983 mir_surface_spec_set_preferred_orientation(spec, mode);
2984
2985 auto surface = mir_surface_create_sync(spec);
2986@@ -214,6 +219,7 @@
2987
2988 ASSERT_THAT(surface, IsValid());
2989 EXPECT_EQ(mir_surface_get_preferred_orientation(surface), mode);
2990+#pragma GCC diagnostic pop
2991
2992 mir_surface_release_sync(surface);
2993 }
2994@@ -238,7 +244,10 @@
2995 mir_surface_spec_release(spec);
2996
2997 ASSERT_THAT(menu, IsValid());
2998+#pragma GCC diagnostic push
2999+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3000 EXPECT_EQ(mir_surface_get_type(menu), mir_surface_type_menu);
3001+#pragma GCC diagnostic pop
3002
3003 mir_surface_release_sync(parent);
3004 mir_surface_release_sync(menu);
3005@@ -279,7 +288,10 @@
3006 mir_surface_spec_release(spec);
3007
3008 ASSERT_THAT(tooltip, IsValid());
3009+#pragma GCC diagnostic push
3010+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3011 EXPECT_EQ(mir_surface_get_type(tooltip), mir_surface_type_tip);
3012+#pragma GCC diagnostic pop
3013
3014 mir_surface_release_sync(parent);
3015 mir_surface_release_sync(tooltip);
3016@@ -295,7 +307,10 @@
3017 mir_surface_spec_release(spec);
3018
3019 ASSERT_THAT(dialog, IsValid());
3020+#pragma GCC diagnostic push
3021+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3022 EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog);
3023+#pragma GCC diagnostic pop
3024
3025 mir_surface_release_sync(dialog);
3026 }
3027@@ -311,7 +326,10 @@
3028 mir_surface_spec_release(spec);
3029
3030 ASSERT_THAT(dialog, IsValid());
3031+#pragma GCC diagnostic push
3032+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3033 EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog);
3034+#pragma GCC diagnostic pop
3035
3036 mir_surface_release_sync(parent);
3037 mir_surface_release_sync(dialog);
3038@@ -325,8 +343,10 @@
3039
3040 auto im = mir_surface_create_sync(spec);
3041 mir_surface_spec_release(spec);
3042-
3043+#pragma GCC diagnostic push
3044+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3045 EXPECT_EQ(mir_surface_get_type(im), mir_surface_type_inputmethod);
3046+#pragma GCC diagnostic pop
3047
3048 mir_surface_release_sync(im);
3049 }
3050
3051=== modified file 'tests/acceptance-tests/test_client_with_custom_display_config_deadlock.cpp'
3052--- tests/acceptance-tests/test_client_with_custom_display_config_deadlock.cpp 2015-02-22 07:46:25 +0000
3053+++ tests/acceptance-tests/test_client_with_custom_display_config_deadlock.cpp 2016-10-28 13:38:48 +0000
3054@@ -38,8 +38,11 @@
3055 auto second_surface = mtf::make_any_surface(connection);
3056 ASSERT_TRUE(mir_surface_is_valid(second_surface));
3057
3058+#pragma GCC diagnostic push
3059+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3060 auto configuration = mir_connection_create_display_config(connection);
3061 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
3062+#pragma GCC diagnostic pop
3063 EXPECT_STREQ("", mir_connection_get_error_message(connection));
3064 mir_display_config_destroy(configuration);
3065
3066
3067=== modified file 'tests/acceptance-tests/test_confined_pointer.cpp'
3068--- tests/acceptance-tests/test_confined_pointer.cpp 2016-09-09 03:47:07 +0000
3069+++ tests/acceptance-tests/test_confined_pointer.cpp 2016-10-28 13:38:48 +0000
3070@@ -88,9 +88,12 @@
3071 mir_surface_get_error_message(surface)});
3072 }
3073
3074+#pragma GCC diagnostic push
3075+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3076 mir_surface_set_event_handler(surface, handle_event, this);
3077 mir_buffer_stream_swap_buffers_sync(
3078 mir_surface_get_buffer_stream(surface));
3079+#pragma GCC diagnostic push
3080
3081 ready_to_accept_events.wait_for(4s);
3082 if (!ready_to_accept_events.raised())
3083@@ -147,7 +150,10 @@
3084 // Remove the event handler to avoid handling spurious events unrelated
3085 // to the tests (e.g. pointer leave events when the surface is destroyed),
3086 // which can cause test expectations to fail.
3087+#pragma GCC diagnostic push
3088+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3089 mir_surface_set_event_handler(surface, null_event_handler, nullptr);
3090+#pragma GCC diagnostic pop
3091 mir_surface_release_sync(surface);
3092 mir_connection_release(connection);
3093 }
3094
3095=== modified file 'tests/acceptance-tests/test_custom_window_management.cpp'
3096--- tests/acceptance-tests/test_custom_window_management.cpp 2016-09-20 04:32:25 +0000
3097+++ tests/acceptance-tests/test_custom_window_management.cpp 2016-10-28 13:38:48 +0000
3098@@ -281,8 +281,10 @@
3099
3100 EXPECT_CALL(window_manager, set_surface_attribute(_, WeakPtrEq(server_surface[i]), mir_surface_attrib_state,_))
3101 .WillOnce(WithArg<3>(Invoke([&](int value) { received.raise(); return value; })));
3102-
3103+#pragma GCC diagnostic push
3104+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3105 mir_surface_set_state(client_surface[i], mir_surface_state_maximized);
3106+#pragma GCC diagnostic pop
3107
3108 received.wait_for(400ms);
3109 }
3110
3111=== modified file 'tests/acceptance-tests/test_debug_api.cpp'
3112--- tests/acceptance-tests/test_debug_api.cpp 2016-01-29 08:18:22 +0000
3113+++ tests/acceptance-tests/test_debug_api.cpp 2016-10-28 13:38:48 +0000
3114@@ -157,7 +157,10 @@
3115 int screen_x, screen_y, x, y;
3116 x = 35, y = 21;
3117
3118+#pragma GCC diagnostic push
3119+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3120 ASSERT_TRUE(mir_debug_surface_coords_to_screen(surf, x, y, &screen_x, &screen_y));
3121+#pragma GCC diagnostic pop
3122 EXPECT_EQ(x + surface_location.top_left.x.as_int(), screen_x);
3123 EXPECT_EQ(y + surface_location.top_left.y.as_int(), screen_y);
3124
3125@@ -170,7 +173,10 @@
3126 surf = mtf::make_any_surface(connection);
3127 ASSERT_TRUE(mir_surface_is_valid(surf));
3128
3129+#pragma GCC diagnostic push
3130+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3131 ASSERT_TRUE(mir_debug_surface_coords_to_screen(surf, x, y, &screen_x, &screen_y));
3132+#pragma GCC diagnostic pop
3133 EXPECT_EQ(x + surface_location.top_left.x.as_int(), screen_x);
3134 EXPECT_EQ(y + surface_location.top_left.y.as_int(), screen_y);
3135
3136@@ -186,7 +192,10 @@
3137
3138 int screen_x, screen_y;
3139
3140+#pragma GCC diagnostic push
3141+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3142 EXPECT_FALSE(mir_debug_surface_coords_to_screen(surf, 0, 0, &screen_x, &screen_y));
3143+#pragma GCC diagnostic pop
3144
3145 mir_surface_release_sync(surf);
3146 }
3147@@ -206,7 +215,10 @@
3148
3149 int screen_x, screen_y;
3150
3151+#pragma GCC diagnostic push
3152+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3153 EXPECT_TRUE(mir_debug_surface_coords_to_screen(surf, 0, 0, &screen_x, &screen_y));
3154+#pragma GCC diagnostic pop
3155 EXPECT_EQ(testpoint.x.as_int(), screen_x);
3156 EXPECT_EQ(testpoint.y.as_int(), screen_y);
3157
3158
3159=== modified file 'tests/acceptance-tests/test_display_configuration.cpp'
3160--- tests/acceptance-tests/test_display_configuration.cpp 2016-07-18 07:38:38 +0000
3161+++ tests/acceptance-tests/test_display_configuration.cpp 2016-10-28 13:38:48 +0000
3162@@ -118,7 +118,10 @@
3163
3164 TEST_F(LegacyDisplayConfigurationTest, display_configuration_reaches_client)
3165 {
3166+#pragma GCC diagnostic push
3167+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3168 auto configuration = mir_connection_create_display_config(connection);
3169+#pragma GCC diagnostic pop
3170
3171 EXPECT_THAT(*configuration,
3172 mt::DisplayConfigMatches(std::cref(stub_display_config)));
3173@@ -130,7 +133,10 @@
3174 {
3175 void display_change_handler(MirConnection* connection, void* context)
3176 {
3177+#pragma GCC diagnostic push
3178+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3179 auto configuration = mir_connection_create_display_config(connection);
3180+#pragma GCC diagnostic pop
3181
3182 EXPECT_THAT(*configuration,
3183 mt::DisplayConfigMatches(std::cref(changed_stub_display_config)));
3184@@ -159,6 +165,8 @@
3185 // we're emulating a client that is passively subscribed, we will just wait for the display
3186 // configuration to change and then will check the new config.
3187
3188+#pragma GCC diagnostic push
3189+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3190 auto configuration = mir_connection_create_display_config(unsubscribed_connection);
3191 while(configuration->num_outputs != changed_stub_display_config.outputs.size())
3192 {
3193@@ -166,6 +174,7 @@
3194 std::this_thread::sleep_for(std::chrono::microseconds(500));
3195 configuration = mir_connection_create_display_config(unsubscribed_connection);
3196 }
3197+#pragma GCC diagnostic pop
3198
3199 EXPECT_THAT(*configuration,
3200 mt::DisplayConfigMatches(std::cref(changed_stub_display_config)));
3201@@ -180,10 +189,12 @@
3202 stub_authorizer.allow_configure_display = false;
3203
3204 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
3205-
3206+#pragma GCC diagnostic push
3207+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3208 auto configuration = mir_connection_create_display_config(connection);
3209
3210 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
3211+#pragma GCC diagnostic pop
3212 EXPECT_THAT(mir_connection_get_error_message(connection),
3213 testing::HasSubstr("not authorized to apply display configurations"));
3214
3215@@ -205,7 +216,10 @@
3216 auto const spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);
3217 surface = mir_surface_create_sync(spec);
3218 mir_surface_spec_release(spec);
3219+#pragma GCC diagnostic push
3220+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3221 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
3222+#pragma GCC diagnostic pop
3223 }
3224
3225 void disconnect()
3226@@ -230,21 +244,30 @@
3227
3228 void apply_config()
3229 {
3230+#pragma GCC diagnostic push
3231+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3232 auto configuration = mir_connection_create_display_config(connection);
3233 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
3234+#pragma GCC diagnostic pop
3235 EXPECT_STREQ("", mir_connection_get_error_message(connection));
3236 mir_display_config_destroy(configuration);
3237 }
3238
3239 std::unique_ptr<MirDisplayConfiguration,void(*)(MirDisplayConfiguration*)> get_base_config()
3240 {
3241+#pragma GCC diagnostic push
3242+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3243 return {mir_connection_create_display_config(connection),
3244 mir_display_config_destroy};
3245+#pragma GCC diagnostic pop
3246 }
3247
3248 void set_base_config(MirDisplayConfiguration* configuration)
3249 {
3250+#pragma GCC diagnostic push
3251+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3252 mir_wait_for(mir_connection_set_base_display_config(connection, configuration));
3253+#pragma GCC diagnostic pop
3254 EXPECT_STREQ("", mir_connection_get_error_message(connection));
3255 }
3256 };
3257@@ -281,8 +304,11 @@
3258 simple_client.connect();
3259
3260 /* Apply the display config while not focused */
3261+#pragma GCC diagnostic push
3262+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3263 auto const configuration = mir_connection_create_display_config(connection);
3264 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
3265+#pragma GCC diagnostic pop
3266 mir_display_config_destroy(configuration);
3267
3268 wait_for_server_actions_to_finish(*server.the_main_loop());
3269@@ -366,7 +392,10 @@
3270 {
3271 auto context = reinterpret_cast<DisplayConfigMatchingContext*>(ctx);
3272
3273+#pragma GCC diagnostic push
3274+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3275 auto config = mir_connection_create_display_config(connection);
3276+#pragma GCC diagnostic pop
3277 context->matcher(config);
3278 mir_display_config_destroy(config);
3279 context->done.raise();
3280@@ -499,8 +528,11 @@
3281
3282 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
3283
3284+#pragma GCC diagnostic push
3285+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3286 auto configuration = mir_connection_create_display_config(connection);
3287 mir_wait_for(mir_connection_set_base_display_config(connection, configuration));
3288+#pragma GCC diagnostic pop
3289 EXPECT_THAT(mir_connection_get_error_message(connection),
3290 testing::HasSubstr("not authorized to set base display configuration"));
3291
3292
3293=== modified file 'tests/acceptance-tests/test_latency.cpp'
3294--- tests/acceptance-tests/test_latency.cpp 2016-10-19 17:21:54 +0000
3295+++ tests/acceptance-tests/test_latency.cpp 2016-10-28 13:38:48 +0000
3296@@ -286,9 +286,12 @@
3297 {
3298 using namespace testing;
3299
3300+#pragma GCC diagnostic push
3301+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3302 auto stream = mir_surface_get_buffer_stream(surface);
3303 for(auto i = 0u; i < test_submissions; i++) {
3304 auto submission_id = mir_debug_surface_current_buffer_id(surface);
3305+#pragma GCC diagnostic pop
3306 stats.record_submission(submission_id);
3307 mir_buffer_stream_swap_buffers_sync(stream);
3308 }
3309@@ -308,9 +311,12 @@
3310 {
3311 using namespace testing;
3312
3313+#pragma GCC diagnostic push
3314+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3315 auto stream = mir_surface_get_buffer_stream(surface);
3316 for(auto i = 0u; i < test_submissions; i++) {
3317 auto submission_id = mir_debug_surface_current_buffer_id(surface);
3318+#pragma GCC diagnostic pop
3319 stats.record_submission(submission_id);
3320 mir_buffer_stream_swap_buffers_sync(stream);
3321 }
3322@@ -326,13 +332,19 @@
3323 {
3324 using namespace testing;
3325
3326+#pragma GCC diagnostic push
3327+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3328 auto stream = mir_surface_get_buffer_stream(surface);
3329 mir_buffer_stream_set_swapinterval(stream, 0);
3330+#pragma GCC diagnostic pop
3331 stats.swap_interval = 0;
3332
3333 do
3334 {
3335+#pragma GCC diagnostic push
3336+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3337 auto submission_id = mir_debug_surface_current_buffer_id(surface);
3338+#pragma GCC diagnostic pop
3339 stats.record_submission(submission_id);
3340 mir_buffer_stream_swap_buffers_sync(stream);
3341 } while (!stats.wait_for_posts(test_submissions, std::chrono::seconds(0)));
3342@@ -352,13 +364,15 @@
3343 std::chrono::microseconds const input_interval(1000000/throttled_input_rate);
3344 auto next_input_event = std::chrono::high_resolution_clock::now();
3345
3346+#pragma GCC diagnostic push
3347+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3348 auto stream = mir_surface_get_buffer_stream(surface);
3349 for (auto i = 0u; i < test_submissions; i++)
3350 {
3351 std::this_thread::sleep_until(next_input_event);
3352 next_input_event += input_interval;
3353-
3354 auto submission_id = mir_debug_surface_current_buffer_id(surface);
3355+#pragma GCC diagnostic pop
3356 stats.record_submission(submission_id);
3357 mir_buffer_stream_swap_buffers_sync(stream);
3358 }
3359
3360=== modified file 'tests/acceptance-tests/test_mirblob.cpp'
3361--- tests/acceptance-tests/test_mirblob.cpp 2015-09-03 11:54:34 +0000
3362+++ tests/acceptance-tests/test_mirblob.cpp 2016-10-28 13:38:48 +0000
3363@@ -34,7 +34,10 @@
3364 {
3365 std::vector<uint8_t> buffer;
3366
3367+#pragma GCC diagnostic push
3368+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3369 auto const save_display_config = mir_connection_create_display_config(connection);
3370+#pragma GCC diagnostic pop
3371
3372 {
3373 auto const save_blob = mir_blob_from_display_configuration(save_display_config);
3374@@ -55,4 +58,4 @@
3375
3376 mir_display_config_destroy(restore_display_config);
3377 mir_display_config_destroy(save_display_config);
3378-}
3379\ No newline at end of file
3380+}
3381
3382=== modified file 'tests/acceptance-tests/test_nested_input.cpp'
3383--- tests/acceptance-tests/test_nested_input.cpp 2016-10-12 06:03:15 +0000
3384+++ tests/acceptance-tests/test_nested_input.cpp 2016-10-28 13:38:48 +0000
3385@@ -126,8 +126,11 @@
3386 // Ensure the nested server posts a frame
3387 connection = mir_connect_sync(connect_string.c_str(), __PRETTY_FUNCTION__);
3388 surface = mtf::make_any_surface(connection);
3389+#pragma GCC diagnostic push
3390+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3391 mir_surface_set_event_handler(surface, handle_event, this);
3392 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
3393+#pragma GCC diagnostic pop
3394 }
3395
3396 MOCK_METHOD1(handle_input, void(MirEvent const*));
3397@@ -166,7 +169,10 @@
3398 static void null_event_handler(MirSurface*, MirEvent const*, void*) {};
3399 ~ExposedSurface()
3400 {
3401+#pragma GCC diagnostic push
3402+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3403 mir_surface_set_event_handler(surface, null_event_handler, nullptr);
3404+#pragma GCC diagnostic pop
3405 mir_surface_release_sync(surface);
3406 mir_connection_release(connection);
3407 }
3408
3409=== modified file 'tests/acceptance-tests/test_nested_mir.cpp'
3410--- tests/acceptance-tests/test_nested_mir.cpp 2016-10-13 14:30:55 +0000
3411+++ tests/acceptance-tests/test_nested_mir.cpp 2016-10-28 13:38:48 +0000
3412@@ -413,7 +413,10 @@
3413
3414 void wait_until_surface_ready(MirSurface* surface)
3415 {
3416+#pragma GCC diagnostic push
3417+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3418 mir_surface_set_event_handler(surface, wait_for_key_a_event, this);
3419+#pragma GCC diagnostic pop
3420
3421 auto const dummy_events_received = mt::spin_wait_for_condition_or_timeout(
3422 [this]
3423@@ -429,7 +432,10 @@
3424
3425 EXPECT_TRUE(dummy_events_received);
3426
3427+#pragma GCC diagnostic push
3428+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3429 mir_surface_set_event_handler(surface, nullptr, nullptr);
3430+#pragma GCC diagnostic pop
3431 }
3432
3433 protected:
3434@@ -608,9 +614,12 @@
3435
3436 void update_display_configuration(void (*changer)(MirDisplayConfiguration* config))
3437 {
3438+#pragma GCC diagnostic push
3439+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3440 auto const configuration = mir_connection_create_display_config(connection);
3441 changer(configuration);
3442 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
3443+#pragma GCC diagnostic pop
3444 mir_display_config_destroy(configuration);
3445 }
3446
3447@@ -618,7 +627,10 @@
3448 {
3449 mt::Signal initial_condition;
3450
3451+#pragma GCC diagnostic push
3452+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3453 auto const configuration = mir_connection_create_display_config(connection);
3454+#pragma GCC diagnostic pop
3455
3456 changer(configuration);
3457
3458@@ -626,8 +638,10 @@
3459 .WillRepeatedly(InvokeWithoutArgs([] {}));
3460 EXPECT_CALL(display, configure(mt::DisplayConfigMatches(configuration)))
3461 .WillRepeatedly(InvokeWithoutArgs([&] { initial_condition.raise(); }));
3462-
3463+#pragma GCC diagnostic push
3464+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3465 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
3466+#pragma GCC diagnostic pop
3467
3468 initial_condition.wait_for(timeout);
3469 mir_display_config_destroy(configuration);
3470@@ -654,14 +668,20 @@
3471 Client(nested_mir),
3472 surface(mtf::make_surface(connection, size, format))
3473 {
3474+#pragma GCC diagnostic push
3475+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3476 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
3477+#pragma GCC diagnostic pop
3478 }
3479
3480 ClientWithAPaintedSurface(NestedMirRunner& nested_mir) :
3481 Client(nested_mir),
3482 surface(mtf::make_any_surface(connection))
3483 {
3484+#pragma GCC diagnostic push
3485+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3486 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
3487+#pragma GCC diagnostic pop
3488 }
3489
3490 ~ClientWithAPaintedSurface()
3491@@ -683,6 +703,8 @@
3492
3493 struct ClientWithAPaintedSurfaceAndABufferStream : virtual Client, ClientWithAPaintedSurface
3494 {
3495+#pragma GCC diagnostic push
3496+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3497 ClientWithAPaintedSurfaceAndABufferStream(NestedMirRunner& nested_mir) :
3498 Client(nested_mir),
3499 ClientWithAPaintedSurface(nested_mir),
3500@@ -694,6 +716,7 @@
3501 {
3502 mir_buffer_stream_swap_buffers_sync(buffer_stream);
3503 }
3504+#pragma GCC diagnostic pop
3505
3506 ~ClientWithAPaintedSurfaceAndABufferStream()
3507 {
3508@@ -774,6 +797,8 @@
3509 mir_pixel_format_abgr_8888);
3510
3511 mt::Signal surface_event_received;
3512+#pragma GCC diagnostic push
3513+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3514 mir_surface_spec_set_event_handler(spec, [](MirSurface*, MirEvent const* event, void* ctx)
3515 {
3516 if (mir_event_get_type(event) == mir_event_type_surface_output)
3517@@ -786,6 +811,7 @@
3518 }
3519 },
3520 &surface_event_received);
3521+#pragma GCC diagnostic pop
3522
3523 auto surface = mir_surface_create_sync(spec);
3524 mir_surface_spec_release(spec);
3525@@ -873,7 +899,10 @@
3526 .WillOnce(InvokeWithoutArgs([]{}))
3527 .WillOnce(InvokeWithoutArgs([&] { wait.raise(); }));
3528
3529+#pragma GCC diagnostic push
3530+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3531 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
3532+#pragma GCC diagnostic pop
3533
3534 wait.wait_for(timeout);
3535 Mock::VerifyAndClearExpectations(mock_session_mediator_report.get());
3536@@ -926,7 +955,10 @@
3537
3538 ClientWithAPaintedSurface client(nested_mir);
3539
3540+#pragma GCC diagnostic push
3541+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3542 auto const configuration = mir_connection_create_display_config(client.connection);
3543+#pragma GCC diagnostic pop
3544
3545 for (auto new_orientation :
3546 {mir_orientation_left, mir_orientation_right, mir_orientation_inverted, mir_orientation_normal,
3547@@ -942,8 +974,10 @@
3548
3549 EXPECT_CALL(*the_mock_display_configuration_report(), new_configuration(mt::DisplayConfigMatches(configuration)))
3550 .WillRepeatedly(InvokeWithoutArgs([&] { config_reported.raise(); }));
3551-
3552+#pragma GCC diagnostic push
3553+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3554 mir_wait_for(mir_connection_apply_display_config(client.connection, configuration));
3555+#pragma GCC diagnostic pop
3556
3557 config_reported.wait_for(timeout);
3558 Mock::VerifyAndClearExpectations(the_mock_display_configuration_report().get());
3559@@ -978,7 +1012,10 @@
3560 }));
3561
3562 auto conf = mir_cursor_configuration_from_buffer_stream(client.buffer_stream, 0, 0);
3563+#pragma GCC diagnostic push
3564+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3565 mir_wait_for(mir_surface_configure_cursor(client.surface, conf));
3566+#pragma GCC diagnostic pop
3567 mir_cursor_configuration_destroy(conf);
3568
3569 EXPECT_TRUE(condition.wait_for(timeout));
3570@@ -1028,7 +1065,10 @@
3571 for (auto const name : cursor_names)
3572 {
3573 auto const cursor = mir_cursor_configuration_from_name(name);
3574+#pragma GCC diagnostic push
3575+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3576 mir_wait_for(mir_surface_configure_cursor(client.surface, cursor));
3577+#pragma GCC diagnostic pop
3578 mir_cursor_configuration_destroy(cursor);
3579
3580 EXPECT_TRUE(condition.wait_for(long_timeout));
3581@@ -1059,7 +1099,10 @@
3582 .WillOnce(mt::WakeUp(&condition));
3583
3584 auto conf = mir_cursor_configuration_from_buffer_stream(client.buffer_stream, 0, 0);
3585+#pragma GCC diagnostic push
3586+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3587 mir_wait_for(mir_surface_configure_cursor(client.surface, conf));
3588+#pragma GCC diagnostic pop
3589 mir_cursor_configuration_destroy(conf);
3590
3591 std::this_thread::sleep_for(500ms);
3592@@ -1258,7 +1301,10 @@
3593
3594 ASSERT_TRUE(client_config_changed.raised());
3595
3596+#pragma GCC diagnostic push
3597+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3598 auto const configuration = mir_connection_create_display_config(client.connection);
3599+#pragma GCC diagnostic pop
3600
3601 EXPECT_THAT(configuration, mt::DisplayConfigMatches(*new_config));
3602
3603@@ -1359,7 +1405,10 @@
3604 expected_config.for_each_output([](mg::UserDisplayConfigurationOutput& output)
3605 { output.top_left = {0, 0}; });
3606
3607+#pragma GCC diagnostic push
3608+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3609 auto const configuration = mir_connection_create_display_config(client.connection);
3610+#pragma GCC diagnostic pop
3611
3612 EXPECT_THAT(configuration, mt::DisplayConfigMatches(expected_config));
3613
3614@@ -1471,7 +1520,10 @@
3615
3616 EXPECT_TRUE(condition.raised());
3617
3618+#pragma GCC diagnostic push
3619+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3620 auto const configuration = mir_connection_create_display_config(client.connection);
3621+#pragma GCC diagnostic pop
3622
3623 EXPECT_THAT(configuration, mt::DisplayConfigMatches(*new_config));
3624
3625
3626=== modified file 'tests/acceptance-tests/test_new_display_configuration.cpp'
3627--- tests/acceptance-tests/test_new_display_configuration.cpp 2016-10-12 06:03:15 +0000
3628+++ tests/acceptance-tests/test_new_display_configuration.cpp 2016-10-28 13:38:48 +0000
3629@@ -200,7 +200,10 @@
3630 auto const spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);
3631 surface = mir_surface_create_sync(spec);
3632 mir_surface_spec_release(spec);
3633+#pragma GCC diagnostic push
3634+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3635 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
3636+#pragma GCC diagnostic pop
3637 }
3638
3639 void disconnect()
3640
3641=== modified file 'tests/acceptance-tests/test_render_override.cpp'
3642--- tests/acceptance-tests/test_render_override.cpp 2015-06-17 05:20:42 +0000
3643+++ tests/acceptance-tests/test_render_override.cpp 2016-10-28 13:38:48 +0000
3644@@ -126,7 +126,10 @@
3645 TEST_F(DisplayBufferCompositorOverride, composite_called_with_surface)
3646 {
3647 MirSurfaceParameters surface_params;
3648+#pragma GCC diagnostic push
3649+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3650 mir_surface_get_parameters(surface, &surface_params);
3651 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
3652+#pragma GCC diagnostic pop
3653 EXPECT_TRUE(tracker->wait_until_surface_is_rendered_with_size({surface_params.width, surface_params.height}));
3654 }
3655
3656=== modified file 'tests/acceptance-tests/test_server_disconnect.cpp'
3657--- tests/acceptance-tests/test_server_disconnect.cpp 2016-08-25 01:11:51 +0000
3658+++ tests/acceptance-tests/test_server_disconnect.cpp 2016-10-28 13:38:48 +0000
3659@@ -86,8 +86,11 @@
3660
3661 while (!signalled.load() && clock::now() < time_limit)
3662 {
3663+#pragma GCC diagnostic push
3664+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3665 mir_buffer_stream_swap_buffers_sync(
3666 mir_surface_get_buffer_stream(surface));
3667+#pragma GCC diagnostic pop
3668 }
3669
3670 mir_surface_release_sync(surface);
3671@@ -130,8 +133,11 @@
3672 });
3673
3674 configure_display.exec([&] {
3675+#pragma GCC diagnostic push
3676+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3677 auto config = mir_connection_create_display_config(connection);
3678 mir_wait_for(mir_connection_apply_display_config(connection, config));
3679+#pragma GCC diagnostic pop
3680 mir_display_config_destroy(config);
3681 });
3682
3683
3684=== modified file 'tests/acceptance-tests/test_session_mediator_report.cpp'
3685--- tests/acceptance-tests/test_session_mediator_report.cpp 2016-10-05 08:42:26 +0000
3686+++ tests/acceptance-tests/test_session_mediator_report.cpp 2016-10-28 13:38:48 +0000
3687@@ -136,7 +136,10 @@
3688 connect_client();
3689
3690 auto const surface = mtf::make_any_surface(connection);
3691+#pragma GCC diagnostic push
3692+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3693 auto const buffer_stream = mir_surface_get_buffer_stream(surface);
3694+#pragma GCC diagnostic pop
3695 mir_buffer_stream_swap_buffers_sync(buffer_stream);
3696 mir_surface_release_sync(surface);
3697 }
3698@@ -160,8 +163,11 @@
3699 connect_client();
3700
3701 EXPECT_CALL(report, session_create_buffer_stream_called(_));
3702+#pragma GCC diagnostic push
3703+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3704 auto const buffer_stream = mir_connection_create_buffer_stream_sync(connection,
3705 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);
3706+#pragma GCC diagnostic pop
3707 testing::Mock::VerifyAndClearExpectations(&report);
3708
3709 EXPECT_CALL(report, session_release_buffer_stream_called(_));
3710
3711=== modified file 'tests/acceptance-tests/test_surface_modifications.cpp'
3712--- tests/acceptance-tests/test_surface_modifications.cpp 2016-04-19 07:47:24 +0000
3713+++ tests/acceptance-tests/test_surface_modifications.cpp 2016-10-28 13:38:48 +0000
3714@@ -71,7 +71,10 @@
3715 scene_surface->add_observer(mt::fake_shared(surface_observer));
3716
3717 // Swap buffers to ensure surface is visible for event based tests
3718+#pragma GCC diagnostic push
3719+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3720 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
3721+#pragma GCC diagnostic pop
3722 }
3723
3724 void generate_alt_click_at(Point const& click_position)
3725@@ -527,7 +530,10 @@
3726
3727 apply_changes([&](MirSurfaceSpec* spec)
3728 {
3729+#pragma GCC diagnostic push
3730+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3731 mir_surface_spec_set_state(spec, new_state);
3732+#pragma GCC diagnostic pop
3733 });
3734 }
3735
3736@@ -541,12 +547,18 @@
3737
3738 apply_changes([&](MirSurfaceSpec* spec)
3739 {
3740+#pragma GCC diagnostic push
3741+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3742 mir_surface_spec_set_state(spec, initial_state);
3743+#pragma GCC diagnostic pop
3744 });
3745
3746 apply_changes([&](MirSurfaceSpec* spec)
3747 {
3748+#pragma GCC diagnostic push
3749+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3750 mir_surface_spec_set_state(spec, new_state);
3751+#pragma GCC diagnostic pop
3752 });
3753 }
3754
3755@@ -572,8 +584,11 @@
3756 EXPECT_CALL(surface_observer, hidden_set_to(is_visible(initial_state)));
3757 EXPECT_CALL(surface_observer, hidden_set_to(is_visible(new_state)));
3758
3759+#pragma GCC diagnostic push
3760+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3761 mir_wait_for(mir_surface_set_state(surface, initial_state));
3762 mir_wait_for(mir_surface_set_state(surface, new_state));
3763+#pragma GCC diagnostic pop
3764 }
3765
3766 INSTANTIATE_TEST_CASE_P(SurfaceModifications, SurfaceStateCase,
3767
3768=== modified file 'tests/acceptance-tests/test_surface_morphing.cpp'
3769--- tests/acceptance-tests/test_surface_morphing.cpp 2016-01-29 08:18:22 +0000
3770+++ tests/acceptance-tests/test_surface_morphing.cpp 2016-10-28 13:38:48 +0000
3771@@ -181,8 +181,11 @@
3772 mir_surface_spec_set_type(spec, old_type);
3773 mir_surface_spec_set_width(spec, width);
3774 mir_surface_spec_set_height(spec, height);
3775+#pragma GCC diagnostic push
3776+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3777 mir_surface_spec_set_pixel_format(spec, pixel_format);
3778 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3779+#pragma GCC diagnostic pop
3780 });
3781
3782 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
3783@@ -206,8 +209,11 @@
3784 mir_surface_spec_set_type(spec, mir_surface_type_normal);
3785 mir_surface_spec_set_width(spec, width);
3786 mir_surface_spec_set_height(spec, height);
3787+#pragma GCC diagnostic push
3788+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3789 mir_surface_spec_set_pixel_format(spec, pixel_format);
3790 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3791+#pragma GCC diagnostic pop
3792 });
3793
3794 auto const surface = create_surface([&](MirSurfaceSpec* spec)
3795@@ -215,8 +221,11 @@
3796 mir_surface_spec_set_type(spec, old_type);
3797 mir_surface_spec_set_width(spec, width);
3798 mir_surface_spec_set_height(spec, height);
3799+#pragma GCC diagnostic push
3800+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3801 mir_surface_spec_set_pixel_format(spec, pixel_format);
3802 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3803+#pragma GCC diagnostic pop
3804 });
3805
3806 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
3807@@ -247,8 +256,11 @@
3808 mir_surface_spec_set_type(spec, mir_surface_type_normal);
3809 mir_surface_spec_set_width(spec, width);
3810 mir_surface_spec_set_height(spec, height);
3811+#pragma GCC diagnostic push
3812+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3813 mir_surface_spec_set_pixel_format(spec, pixel_format);
3814 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3815+#pragma GCC diagnostic pop
3816 });
3817
3818 auto const surface = create_surface([&](MirSurfaceSpec* spec)
3819@@ -256,8 +268,11 @@
3820 mir_surface_spec_set_type(spec, old_type);
3821 mir_surface_spec_set_width(spec, width);
3822 mir_surface_spec_set_height(spec, height);
3823+#pragma GCC diagnostic push
3824+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3825 mir_surface_spec_set_pixel_format(spec, pixel_format);
3826 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3827+#pragma GCC diagnostic pop
3828 });
3829
3830 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
3831@@ -282,8 +297,11 @@
3832 mir_surface_spec_set_type(spec, old_type);
3833 mir_surface_spec_set_width(spec, width);
3834 mir_surface_spec_set_height(spec, height);
3835+#pragma GCC diagnostic push
3836+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3837 mir_surface_spec_set_pixel_format(spec, pixel_format);
3838 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3839+#pragma GCC diagnostic pop
3840 });
3841
3842 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
3843@@ -313,8 +331,11 @@
3844 mir_surface_spec_set_type(spec, mir_surface_type_normal);
3845 mir_surface_spec_set_width(spec, width);
3846 mir_surface_spec_set_height(spec, height);
3847+#pragma GCC diagnostic push
3848+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3849 mir_surface_spec_set_pixel_format(spec, pixel_format);
3850 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3851+#pragma GCC diagnostic pop
3852 });
3853
3854 auto const surface = create_surface([&](MirSurfaceSpec* spec)
3855@@ -322,8 +343,11 @@
3856 mir_surface_spec_set_type(spec, old_type);
3857 mir_surface_spec_set_width(spec, width);
3858 mir_surface_spec_set_height(spec, height);
3859+#pragma GCC diagnostic push
3860+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3861 mir_surface_spec_set_pixel_format(spec, pixel_format);
3862 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3863+#pragma GCC diagnostic pop
3864 });
3865
3866 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
3867@@ -348,8 +372,11 @@
3868 mir_surface_spec_set_type(spec, mir_surface_type_normal);
3869 mir_surface_spec_set_width(spec, width);
3870 mir_surface_spec_set_height(spec, height);
3871+#pragma GCC diagnostic push
3872+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3873 mir_surface_spec_set_pixel_format(spec, pixel_format);
3874 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3875+#pragma GCC diagnostic pop
3876 });
3877
3878 auto const surface = create_surface([&](MirSurfaceSpec* spec)
3879@@ -357,8 +384,11 @@
3880 mir_surface_spec_set_type(spec, old_type);
3881 mir_surface_spec_set_width(spec, width);
3882 mir_surface_spec_set_height(spec, height);
3883+#pragma GCC diagnostic push
3884+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3885 mir_surface_spec_set_pixel_format(spec, pixel_format);
3886 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3887+#pragma GCC diagnostic pop
3888 });
3889
3890 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
3891
3892=== modified file 'tests/acceptance-tests/test_surface_placement.cpp'
3893--- tests/acceptance-tests/test_surface_placement.cpp 2016-06-20 17:10:33 +0000
3894+++ tests/acceptance-tests/test_surface_placement.cpp 2016-10-28 13:38:48 +0000
3895@@ -479,8 +479,11 @@
3896 mir_surface_spec_set_type(spec, GetParam());
3897 mir_surface_spec_set_width(spec, width);
3898 mir_surface_spec_set_height(spec, height);
3899+#pragma GCC diagnostic push
3900+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3901 mir_surface_spec_set_pixel_format(spec, pixel_format);
3902 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3903+#pragma GCC diagnostic pop
3904 });
3905
3906 auto const shell_surface = latest_shell_surface();
3907@@ -540,8 +543,11 @@
3908 mir_surface_spec_set_type(spec, GetParam());
3909 mir_surface_spec_set_width(spec, width);
3910 mir_surface_spec_set_height(spec, height);
3911+#pragma GCC diagnostic push
3912+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3913 mir_surface_spec_set_pixel_format(spec, pixel_format);
3914 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3915+#pragma GCC diagnostic pop
3916 mir_surface_spec_set_parent(spec, parent);
3917 });
3918
3919
3920=== modified file 'tests/acceptance-tests/test_surface_raise.cpp'
3921--- tests/acceptance-tests/test_surface_raise.cpp 2016-07-18 07:38:38 +0000
3922+++ tests/acceptance-tests/test_surface_raise.cpp 2016-10-28 13:38:48 +0000
3923@@ -53,6 +53,8 @@
3924 ConnectedClientHeadlessServer::SetUp();
3925
3926 surface1 = mtf::make_any_surface(connection);
3927+#pragma GCC diagnostic push
3928+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3929 mir_surface_set_event_handler(surface1, &cookie_capturing_callback, this);
3930 mir_buffer_stream_swap_buffers_sync(
3931 mir_surface_get_buffer_stream(surface1));
3932@@ -61,6 +63,7 @@
3933 mir_surface_set_event_handler(surface2, &cookie_capturing_callback, this);
3934 mir_buffer_stream_swap_buffers_sync(
3935 mir_surface_get_buffer_stream(surface2));
3936+#pragma GCC diagnostic pop
3937
3938 // Need fullscreen for the cursor events
3939 auto const spec = mir_connection_create_spec_for_changes(connection);
3940@@ -68,12 +71,15 @@
3941 mir_surface_apply_spec(surface1, spec);
3942 mir_surface_apply_spec(surface2, spec);
3943 mir_surface_spec_release(spec);
3944-
3945+
3946 bool surface_fullscreen = mt::spin_wait_for_condition_or_timeout(
3947 [this]
3948 {
3949+#pragma GCC diagnostic push
3950+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3951 return mir_surface_get_state(surface1) == mir_surface_state_fullscreen &&
3952 mir_surface_get_state(surface2) == mir_surface_state_fullscreen;
3953+#pragma GCC diagnostic pop
3954 },
3955 std::chrono::seconds{max_wait});
3956
3957
3958=== modified file 'tests/acceptance-tests/test_surface_specification.cpp'
3959--- tests/acceptance-tests/test_surface_specification.cpp 2016-04-19 07:47:24 +0000
3960+++ tests/acceptance-tests/test_surface_specification.cpp 2016-10-28 13:38:48 +0000
3961@@ -213,8 +213,11 @@
3962 mir_surface_spec_set_type(spec, mir_surface_type_normal);
3963 mir_surface_spec_set_width(spec, width);
3964 mir_surface_spec_set_height(spec, height);
3965+#pragma GCC diagnostic push
3966+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3967 mir_surface_spec_set_pixel_format(spec, pixel_format);
3968 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3969+#pragma GCC diagnostic pop
3970 mir_surface_spec_set_min_width(spec, min_width);
3971 });
3972
3973@@ -238,8 +241,11 @@
3974 mir_surface_spec_set_type(spec, mir_surface_type_normal);
3975 mir_surface_spec_set_width(spec, width);
3976 mir_surface_spec_set_height(spec, height);
3977+#pragma GCC diagnostic push
3978+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3979 mir_surface_spec_set_pixel_format(spec, pixel_format);
3980 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3981+#pragma GCC diagnostic pop
3982 mir_surface_spec_set_min_height(spec, min_height);
3983 });
3984
3985@@ -263,8 +269,11 @@
3986 mir_surface_spec_set_type(spec, mir_surface_type_normal);
3987 mir_surface_spec_set_width(spec, width);
3988 mir_surface_spec_set_height(spec, height);
3989+#pragma GCC diagnostic push
3990+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3991 mir_surface_spec_set_pixel_format(spec, pixel_format);
3992 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
3993+#pragma GCC diagnostic pop
3994 mir_surface_spec_set_max_width(spec, max_width);
3995 });
3996
3997@@ -288,8 +297,11 @@
3998 mir_surface_spec_set_type(spec, mir_surface_type_normal);
3999 mir_surface_spec_set_width(spec, width);
4000 mir_surface_spec_set_height(spec, height);
4001+#pragma GCC diagnostic push
4002+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4003 mir_surface_spec_set_pixel_format(spec, pixel_format);
4004 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4005+#pragma GCC diagnostic pop
4006 mir_surface_spec_set_max_height(spec, max_height);
4007 });
4008
4009@@ -313,8 +325,11 @@
4010 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4011 mir_surface_spec_set_width(spec, width);
4012 mir_surface_spec_set_height(spec, height);
4013+#pragma GCC diagnostic push
4014+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4015 mir_surface_spec_set_pixel_format(spec, pixel_format);
4016 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4017+#pragma GCC diagnostic pop
4018 mir_surface_spec_set_width_increment(spec, width_inc);
4019 });
4020
4021@@ -342,8 +357,11 @@
4022 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4023 mir_surface_spec_set_width(spec, width);
4024 mir_surface_spec_set_height(spec, height);
4025+#pragma GCC diagnostic push
4026+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4027 mir_surface_spec_set_pixel_format(spec, pixel_format);
4028 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4029+#pragma GCC diagnostic pop
4030 mir_surface_spec_set_width_increment(spec, width_inc);
4031 mir_surface_spec_set_min_width(spec, min_width);
4032 });
4033@@ -371,8 +389,11 @@
4034 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4035 mir_surface_spec_set_width(spec, width);
4036 mir_surface_spec_set_height(spec, height);
4037+#pragma GCC diagnostic push
4038+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4039 mir_surface_spec_set_pixel_format(spec, pixel_format);
4040 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4041+#pragma GCC diagnostic pop
4042 mir_surface_spec_set_height_increment(spec, height_inc);
4043 });
4044
4045@@ -400,8 +421,11 @@
4046 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4047 mir_surface_spec_set_width(spec, width);
4048 mir_surface_spec_set_height(spec, height);
4049+#pragma GCC diagnostic push
4050+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4051 mir_surface_spec_set_pixel_format(spec, pixel_format);
4052 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4053+#pragma GCC diagnostic pop
4054 mir_surface_spec_set_height_increment(spec, height_inc);
4055 mir_surface_spec_set_min_height(spec, min_height);
4056 });
4057@@ -430,8 +454,11 @@
4058 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4059 mir_surface_spec_set_width(spec, width);
4060 mir_surface_spec_set_height(spec, height);
4061+#pragma GCC diagnostic push
4062+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4063 mir_surface_spec_set_pixel_format(spec, pixel_format);
4064 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4065+#pragma GCC diagnostic pop
4066 mir_surface_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height);
4067 });
4068
4069@@ -460,8 +487,11 @@
4070 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4071 mir_surface_spec_set_width(spec, width);
4072 mir_surface_spec_set_height(spec, height);
4073+#pragma GCC diagnostic push
4074+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4075 mir_surface_spec_set_pixel_format(spec, pixel_format);
4076 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4077+#pragma GCC diagnostic pop
4078 mir_surface_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height);
4079 });
4080
4081@@ -497,8 +527,11 @@
4082 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4083 mir_surface_spec_set_width(spec, width);
4084 mir_surface_spec_set_height(spec, height);
4085+#pragma GCC diagnostic push
4086+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4087 mir_surface_spec_set_pixel_format(spec, pixel_format);
4088 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4089+#pragma GCC diagnostic pop
4090
4091 mir_surface_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height);
4092 mir_surface_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height);
4093@@ -551,8 +584,11 @@
4094 mir_surface_spec_set_type(spec, type);
4095 mir_surface_spec_set_width(spec, width);
4096 mir_surface_spec_set_height(spec, height);
4097+#pragma GCC diagnostic push
4098+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4099 mir_surface_spec_set_pixel_format(spec, pixel_format);
4100 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4101+#pragma GCC diagnostic pop
4102 });
4103
4104 EXPECT_THAT(surface, IsValidSurface());
4105@@ -567,8 +603,11 @@
4106 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4107 mir_surface_spec_set_width(spec, width);
4108 mir_surface_spec_set_height(spec, height);
4109+#pragma GCC diagnostic push
4110+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4111 mir_surface_spec_set_pixel_format(spec, pixel_format);
4112 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4113+#pragma GCC diagnostic pop
4114 });
4115
4116 auto const surface = create_surface([&](MirSurfaceSpec* spec)
4117@@ -576,8 +615,11 @@
4118 mir_surface_spec_set_type(spec, type);
4119 mir_surface_spec_set_width(spec, width);
4120 mir_surface_spec_set_height(spec, height);
4121+#pragma GCC diagnostic push
4122+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4123 mir_surface_spec_set_pixel_format(spec, pixel_format);
4124 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4125+#pragma GCC diagnostic pop
4126 mir_surface_spec_set_parent(spec, parent);
4127 });
4128
4129@@ -593,8 +635,11 @@
4130 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4131 mir_surface_spec_set_width(spec, width);
4132 mir_surface_spec_set_height(spec, height);
4133+#pragma GCC diagnostic push
4134+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4135 mir_surface_spec_set_pixel_format(spec, pixel_format);
4136 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4137+#pragma GCC diagnostic pop
4138 });
4139
4140 auto const surface = create_surface([&](MirSurfaceSpec* spec)
4141@@ -602,8 +647,11 @@
4142 mir_surface_spec_set_type(spec, type);
4143 mir_surface_spec_set_width(spec, width);
4144 mir_surface_spec_set_height(spec, height);
4145+#pragma GCC diagnostic push
4146+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4147 mir_surface_spec_set_pixel_format(spec, pixel_format);
4148 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4149+#pragma GCC diagnostic pop
4150 mir_surface_spec_set_parent(spec, parent);
4151 });
4152
4153@@ -619,8 +667,11 @@
4154 mir_surface_spec_set_type(spec, type);
4155 mir_surface_spec_set_width(spec, width);
4156 mir_surface_spec_set_height(spec, height);
4157+#pragma GCC diagnostic push
4158+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4159 mir_surface_spec_set_pixel_format(spec, pixel_format);
4160 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4161+#pragma GCC diagnostic pop
4162 });
4163
4164 EXPECT_THAT(surface, Not(IsValidSurface()));
4165@@ -635,8 +686,11 @@
4166 mir_surface_spec_set_type(spec, mir_surface_type_normal);
4167 mir_surface_spec_set_width(spec, width);
4168 mir_surface_spec_set_height(spec, height);
4169+#pragma GCC diagnostic push
4170+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4171 mir_surface_spec_set_pixel_format(spec, pixel_format);
4172 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4173+#pragma GCC diagnostic pop
4174 });
4175
4176 auto const surface = create_surface([&](MirSurfaceSpec* spec)
4177@@ -644,8 +698,11 @@
4178 mir_surface_spec_set_type(spec, type);
4179 mir_surface_spec_set_width(spec, width);
4180 mir_surface_spec_set_height(spec, height);
4181+#pragma GCC diagnostic push
4182+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4183 mir_surface_spec_set_pixel_format(spec, pixel_format);
4184 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4185+#pragma GCC diagnostic pop
4186 mir_surface_spec_set_parent(spec, parent);
4187 });
4188
4189@@ -661,8 +718,11 @@
4190 mir_surface_spec_set_type(spec, type);
4191 mir_surface_spec_set_width(spec, width);
4192 mir_surface_spec_set_height(spec, height);
4193+#pragma GCC diagnostic push
4194+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4195 mir_surface_spec_set_pixel_format(spec, pixel_format);
4196 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4197+#pragma GCC diagnostic pop
4198 });
4199
4200 EXPECT_THAT(surface, IsValidSurface());
4201
4202=== modified file 'tests/acceptance-tests/test_surfaces_with_output_id.cpp'
4203--- tests/acceptance-tests/test_surfaces_with_output_id.cpp 2016-01-29 08:18:22 +0000
4204+++ tests/acceptance-tests/test_surfaces_with_output_id.cpp 2016-10-28 13:38:48 +0000
4205@@ -110,8 +110,10 @@
4206 initial_display_layout(display_rects);
4207 mtf::ConnectedClientHeadlessServer::SetUp();
4208 ASSERT_THAT(tracking_shell, NotNull());
4209-
4210+#pragma GCC diagnostic push
4211+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4212 config = mir_connection_create_display_config(connection);
4213+#pragma GCC diagnostic pop
4214 ASSERT_TRUE(config != NULL);
4215 }
4216
4217
4218=== modified file 'tests/acceptance-tests/test_system_compositor_window_manager.cpp'
4219--- tests/acceptance-tests/test_system_compositor_window_manager.cpp 2016-06-08 13:49:11 +0000
4220+++ tests/acceptance-tests/test_system_compositor_window_manager.cpp 2016-10-28 13:38:48 +0000
4221@@ -50,7 +50,10 @@
4222
4223 void post_buffer()
4224 {
4225+#pragma GCC diagnostic push
4226+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4227 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
4228+#pragma GCC diagnostic pop
4229 }
4230
4231 SurfaceHandle(SurfaceHandle const&& that) : surface{that.surface} { surface = nullptr; }
4232@@ -81,7 +84,10 @@
4233 auto const surface = mir_surface_create_sync(spec);
4234 mir_surface_spec_release(spec);
4235
4236+#pragma GCC diagnostic push
4237+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4238 mir_surface_set_event_handler(surface, on_surface_event, this);
4239+#pragma GCC diagnostic pop
4240
4241 return SurfaceHandle{surface};
4242 };
4243
4244=== modified file 'tests/acceptance-tests/throwback/test_client_cursor_api.cpp'
4245--- tests/acceptance-tests/throwback/test_client_cursor_api.cpp 2016-07-18 07:38:38 +0000
4246+++ tests/acceptance-tests/throwback/test_client_cursor_api.cpp 2016-10-28 13:38:48 +0000
4247@@ -137,10 +137,11 @@
4248 mir_surface_spec_set_name(spec, client_name.c_str());
4249 auto const surface = mir_surface_create_sync(spec);
4250 mir_surface_spec_release(spec);
4251-
4252+#pragma GCC diagnostic push
4253+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4254 mir_buffer_stream_swap_buffers_sync(
4255 mir_surface_get_buffer_stream(surface));
4256-
4257+#pragma GCC diagnostic pop
4258 wait_for_surface_to_become_focused_and_exposed(surface);
4259
4260 setup_cursor(surface);
4261@@ -189,7 +190,10 @@
4262 void setup_cursor(MirSurface* surface) override
4263 {
4264 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);
4265+#pragma GCC diagnostic push
4266+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4267 mir_wait_for(mir_surface_configure_cursor(surface, conf));
4268+#pragma GCC diagnostic pop
4269 mir_cursor_configuration_destroy(conf);
4270 }
4271 };
4272@@ -208,7 +212,10 @@
4273 void setup_cursor(MirSurface* surface) override
4274 {
4275 auto conf = mir_cursor_configuration_from_name(cursor_name.c_str());
4276+#pragma GCC diagnostic push
4277+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4278 mir_wait_for(mir_surface_configure_cursor(surface, conf));
4279+#pragma GCC diagnostic pop
4280 mir_cursor_configuration_destroy(conf);
4281 }
4282
4283@@ -377,10 +384,11 @@
4284 {
4285 auto conf1 = mir_cursor_configuration_from_name(cursor_name.c_str());
4286 auto conf2 = mir_cursor_configuration_from_name(mir_disabled_cursor_name);
4287-
4288+#pragma GCC diagnostic push
4289+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4290 mir_wait_for(mir_surface_configure_cursor(surface, conf1));
4291 mir_wait_for(mir_surface_configure_cursor(surface, conf2));
4292-
4293+#pragma GCC diagnostic pop
4294 mir_cursor_configuration_destroy(conf1);
4295 mir_cursor_configuration_destroy(conf2);
4296 }
4297@@ -415,14 +423,20 @@
4298
4299 void setup_cursor(MirSurface* surface) override
4300 {
4301+#pragma GCC diagnostic push
4302+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4303 auto stream = mir_connection_create_buffer_stream_sync(
4304 connection, 24, 24, mir_pixel_format_argb_8888,
4305 mir_buffer_usage_software);
4306+#pragma GCC diagnostic pop
4307 auto conf = mir_cursor_configuration_from_buffer_stream(stream, hotspot_x, hotspot_y);
4308
4309 mir_buffer_stream_swap_buffers_sync(stream);
4310
4311+#pragma GCC diagnostic push
4312+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4313 mir_wait_for(mir_surface_configure_cursor(surface, conf));
4314+#pragma GCC diagnostic pop
4315
4316 mir_cursor_configuration_destroy(conf);
4317
4318@@ -468,9 +482,12 @@
4319 // for the test logic. - alan_g
4320 std::this_thread::sleep_for(std::chrono::milliseconds(20));
4321
4322+#pragma GCC diagnostic push
4323+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4324 mir_surface_set_state(surface, mir_surface_state_fullscreen);
4325 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);
4326 mir_surface_configure_cursor(surface, conf);
4327+#pragma GCC diagnostic pop
4328 mir_cursor_configuration_destroy(conf);
4329 }
4330 };
4331
4332=== modified file 'tests/acceptance-tests/throwback/test_client_library_errors.cpp'
4333--- tests/acceptance-tests/throwback/test_client_library_errors.cpp 2016-10-21 07:53:23 +0000
4334+++ tests/acceptance-tests/throwback/test_client_library_errors.cpp 2016-10-28 13:38:48 +0000
4335@@ -234,9 +234,11 @@
4336 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
4337
4338 ASSERT_THAT(connection, IsValid());
4339-
4340+#pragma GCC diagnostic push
4341+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4342 auto stream = mir_connection_create_buffer_stream_sync(connection,
4343 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);
4344+#pragma GCC diagnostic pop
4345 ASSERT_NE(stream, nullptr);
4346 EXPECT_FALSE(mir_buffer_stream_is_valid(stream));
4347 EXPECT_THAT(mir_buffer_stream_get_error_message(stream), testing::HasSubstr(exception_text));
4348@@ -438,5 +440,8 @@
4349 TEST_F(ClientLibraryErrorsDeathTest, creating_screencast_with_invalid_connection)
4350 {
4351 MirScreencastParameters params{{0, 0, 1, 1}, 1, 1, mir_pixel_format_abgr_8888};
4352+#pragma GCC diagnostic push
4353+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4354 EXPECT_DEATH(mir_connection_create_screencast_sync(nullptr, &params), "");
4355+#pragma GCC diagnostic pop
4356 }
4357
4358=== modified file 'tests/acceptance-tests/throwback/test_presentation_chain.cpp'
4359--- tests/acceptance-tests/throwback/test_presentation_chain.cpp 2016-10-21 07:53:23 +0000
4360+++ tests/acceptance-tests/throwback/test_presentation_chain.cpp 2016-10-28 13:38:48 +0000
4361@@ -347,7 +347,10 @@
4362 TEST_F(PresentationChain, destroying_a_chain_will_return_buffers_associated_with_chain)
4363 {
4364 auto chain = mir_connection_create_presentation_chain_sync(connection);
4365+#pragma GCC diagnostic push
4366+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4367 auto stream = mir_connection_create_buffer_stream_sync(connection, 25, 12, mir_pixel_format_abgr_8888, mir_buffer_usage_hardware);
4368+#pragma GCC diagnostic pop
4369 ASSERT_TRUE(mir_presentation_chain_is_valid(chain));
4370
4371 auto spec = mir_connection_create_spec_for_normal_surface(
4372
4373=== modified file 'tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp'
4374--- tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp 2016-01-29 08:18:22 +0000
4375+++ tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp 2016-10-28 13:38:48 +0000
4376@@ -88,9 +88,11 @@
4377 EXPECT_CALL(*mock_window_manager,
4378 set_surface_attribute(_, _, mir_surface_attrib_state, Eq(mir_surface_state_maximized)));
4379
4380+#pragma GCC diagnostic push
4381+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4382 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_maximized));
4383-
4384 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_maximized));
4385+#pragma GCC diagnostic pop
4386 }
4387
4388 TEST_F(ShellSurfaceConfiguration, the_window_manager_may_interfere_with_attribute_changes)
4389@@ -109,7 +111,9 @@
4390 set_surface_attribute(_, _, mir_surface_attrib_state, Eq(mir_surface_state_maximized)))
4391 .WillOnce(Invoke(set_to_vertmax));
4392
4393+#pragma GCC diagnostic push
4394+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4395 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_maximized));
4396-
4397 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_vertmaximized));
4398+#pragma GCC diagnostic pop
4399 }
4400
4401=== modified file 'tests/integration-tests/test_client_screencast.cpp'
4402--- tests/integration-tests/test_client_screencast.cpp 2016-10-12 06:03:15 +0000
4403+++ tests/integration-tests/test_client_screencast.cpp 2016-10-28 13:38:48 +0000
4404@@ -121,7 +121,10 @@
4405
4406 EXPECT_CALL(mock_screencast(), destroy_session(screencast_session_id));
4407
4408+#pragma GCC diagnostic push
4409+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4410 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
4411+#pragma GCC diagnostic pop
4412 ASSERT_NE(nullptr, screencast);
4413 ASSERT_TRUE(mir_screencast_is_valid(screencast));
4414
4415@@ -151,7 +154,10 @@
4416
4417 EXPECT_CALL(mock_screencast(), destroy_session(_));
4418
4419+#pragma GCC diagnostic push
4420+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4421 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
4422+#pragma GCC diagnostic pop
4423 ASSERT_NE(nullptr, screencast);
4424 ASSERT_TRUE(mir_screencast_is_valid(screencast));
4425
4426@@ -171,12 +177,15 @@
4427 .WillOnce(Return(stub_buffer));
4428 EXPECT_CALL(mock_screencast(), destroy_session(_));
4429
4430+#pragma GCC diagnostic push
4431+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4432 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
4433 ASSERT_NE(nullptr, screencast);
4434 ASSERT_TRUE(mir_screencast_is_valid(screencast));
4435
4436 auto egl_native_window =
4437 mir_buffer_stream_get_egl_native_window(mir_screencast_get_buffer_stream(screencast));
4438+#pragma GCC diagnostic pop
4439 EXPECT_NE(MirEGLNativeWindowType(), egl_native_window);
4440
4441 mir_screencast_release_sync(screencast);
4442@@ -189,7 +198,10 @@
4443 EXPECT_CALL(mock_screencast(), create_session(_, _, _, _, _))
4444 .WillOnce(Throw(std::runtime_error(an_error_message)));
4445
4446+#pragma GCC diagnostic push
4447+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4448 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
4449+#pragma GCC diagnostic pop
4450 ASSERT_NE(nullptr, screencast);
4451 ASSERT_FALSE(mir_screencast_is_valid(screencast));
4452
4453@@ -230,7 +242,10 @@
4454 MirRectangle const capture_region = as_mir_rect(region);
4455 mir_screencast_spec_set_capture_region(spec, &capture_region);
4456
4457+#pragma GCC diagnostic push
4458+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4459 mir_screencast_spec_set_number_of_buffers(spec, num_buffers);
4460+#pragma GCC diagnostic pop
4461 mir_screencast_spec_set_mirror_mode(spec, mirror_mode);
4462
4463 auto screencast = mir_screencast_create_sync(spec);
4464
4465=== modified file 'tests/integration-tests/test_focus_selection.cpp'
4466--- tests/integration-tests/test_focus_selection.cpp 2015-06-26 08:00:59 +0000
4467+++ tests/integration-tests/test_focus_selection.cpp 2016-10-28 13:38:48 +0000
4468@@ -133,7 +133,10 @@
4469 ASSERT_TRUE(mir_connection_is_valid(connection));
4470
4471 auto const surface = mtf::make_any_surface(connection);
4472+#pragma GCC diagnostic push
4473+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4474 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
4475+#pragma GCC diagnostic pop
4476 mir_surface_release_sync(surface);
4477
4478 mir_connection_release(connection);
4479
4480=== modified file 'tests/integration-tests/test_server_shutdown.cpp'
4481--- tests/integration-tests/test_server_shutdown.cpp 2016-01-29 08:18:22 +0000
4482+++ tests/integration-tests/test_server_shutdown.cpp 2016-10-28 13:38:48 +0000
4483@@ -95,15 +95,21 @@
4484
4485 void swap_sync()
4486 {
4487+#pragma GCC diagnostic push
4488+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4489 mir_buffer_stream_swap_buffers_sync(
4490 mir_surface_get_buffer_stream(surface));
4491+#pragma GCC diagnostic pop
4492 }
4493
4494 void swap_async()
4495 {
4496+#pragma GCC diagnostic push
4497+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4498 mir_buffer_stream_swap_buffers(
4499 mir_surface_get_buffer_stream(surface),
4500 null_buffer_stream_callback, nullptr);
4501+#pragma GCC diagnostic pop
4502 }
4503
4504 MirConnection* const connection;
4505
4506=== modified file 'tests/integration-tests/test_stale_frames.cpp'
4507--- tests/integration-tests/test_stale_frames.cpp 2016-08-01 14:43:19 +0000
4508+++ tests/integration-tests/test_stale_frames.cpp 2016-10-28 13:38:48 +0000
4509@@ -183,6 +183,8 @@
4510
4511 std::set<mg::BufferID> stale_buffers;
4512
4513+#pragma GCC diagnostic push
4514+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4515 stale_buffers.emplace(mir_debug_surface_current_buffer_id(surface));
4516
4517 auto bs = mir_surface_get_buffer_stream(surface);
4518@@ -194,6 +196,7 @@
4519 EXPECT_THAT(stale_buffers.size(), Eq(2));
4520
4521 auto const fresh_buffer = mg::BufferID{mir_debug_surface_current_buffer_id(surface)};
4522+#pragma GCC diagnostic pop
4523 mir_buffer_stream_swap_buffers_sync(bs);
4524
4525 start_compositor();
4526@@ -212,11 +215,14 @@
4527
4528 stop_compositor();
4529
4530+#pragma GCC diagnostic push
4531+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4532 auto bs = mir_surface_get_buffer_stream(surface);
4533 mir_buffer_stream_swap_buffers_sync(bs);
4534 mir_buffer_stream_swap_buffers_sync(bs);
4535
4536 auto const fresh_buffer = mg::BufferID{mir_debug_surface_current_buffer_id(surface)};
4537+#pragma GCC diagnostic pop
4538 mir_buffer_stream_swap_buffers_sync(bs);
4539
4540 start_compositor();
4541
4542=== modified file 'tests/integration-tests/test_submit_buffer.cpp'
4543--- tests/integration-tests/test_submit_buffer.cpp 2016-10-20 14:17:36 +0000
4544+++ tests/integration-tests/test_submit_buffer.cpp 2016-10-28 13:38:48 +0000
4545@@ -314,8 +314,11 @@
4546 while(Clock::now() < pt)
4547 {
4548 //auto z = mir_debug_surface_current_buffer_id(surface);
4549+#pragma GCC diagnostic push
4550+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4551 if (mir_debug_surface_current_buffer_id(surface) == id.as_value())
4552 return true;
4553+#pragma GCC diagnostic pop
4554 std::this_thread::yield();
4555 }
4556 return false;
4557
4558=== modified file 'tests/integration-tests/test_surface_first_frame_sync.cpp'
4559--- tests/integration-tests/test_surface_first_frame_sync.cpp 2016-08-01 14:43:19 +0000
4560+++ tests/integration-tests/test_surface_first_frame_sync.cpp 2016-10-28 13:38:48 +0000
4561@@ -210,8 +210,11 @@
4562 */
4563 EXPECT_EQ(0, number_of_executed_render_operations());
4564
4565+#pragma GCC diagnostic push
4566+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4567 mir_buffer_stream_swap_buffers_sync(
4568 mir_surface_get_buffer_stream(surface));
4569+#pragma GCC diagnostic pop
4570
4571 /* After submitting the buffer we should get some render operations */
4572 mir::test::spin_wait_for_condition_or_timeout(
4573
4574=== modified file 'tests/integration-tests/test_swapinterval.cpp'
4575--- tests/integration-tests/test_swapinterval.cpp 2016-10-26 05:15:38 +0000
4576+++ tests/integration-tests/test_swapinterval.cpp 2016-10-28 13:38:48 +0000
4577@@ -113,8 +113,11 @@
4578 {
4579 mtf::BasicClientServerFixture<ServerConfig>::SetUp();
4580 surface = mtf::make_any_surface(connection);
4581+#pragma GCC diagnostic push
4582+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4583 stream = mir_connection_create_buffer_stream_sync(
4584 connection, 10, 10, mir_pixel_format_abgr_8888, mir_buffer_usage_hardware);
4585+#pragma GCC diagnostic pop
4586 }
4587
4588 void TearDown()
4589@@ -135,6 +138,8 @@
4590
4591 }
4592
4593+#pragma GCC diagnostic push
4594+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4595 TEST_F(SwapInterval, defaults_to_one)
4596 {
4597 EXPECT_EQ(1, mir_buffer_stream_get_swapinterval(stream));
4598@@ -192,3 +197,4 @@
4599 EXPECT_EQ(original_swapinterval, mir_surface_get_swapinterval(surface));
4600 EXPECT_EQ(original_framedropping, framedropping_enabled());
4601 }
4602+#pragma GCC diagnostic pop
4603
4604=== modified file 'tests/mir_test/display_config_matchers.cpp'
4605--- tests/mir_test/display_config_matchers.cpp 2016-10-20 15:05:56 +0000
4606+++ tests/mir_test/display_config_matchers.cpp 2016-10-28 13:38:48 +0000
4607@@ -190,11 +190,14 @@
4608 TestDisplayConfiguration(MirDisplayConfig const* config)
4609 {
4610 /* Cards; fake it, 'cause we only ever support 1 card at the moment */
4611+#pragma GCC diagnostic push
4612+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4613 cards.push_back(
4614 mg::DisplayConfigurationCard{
4615 mg::DisplayConfigurationCardId{1},
4616 static_cast<size_t>(mir_display_config_get_max_simultaneous_outputs(config))
4617 });
4618+#pragma GCC diagnostic pop
4619
4620 /* Outputs */
4621 for (int i = 0; i < mir_display_config_get_num_outputs(config); i++)
4622
4623=== modified file 'tests/mir_test_framework/connected_client_with_a_surface.cpp'
4624--- tests/mir_test_framework/connected_client_with_a_surface.cpp 2016-01-29 08:18:22 +0000
4625+++ tests/mir_test_framework/connected_client_with_a_surface.cpp 2016-10-28 13:38:48 +0000
4626@@ -27,7 +27,11 @@
4627 auto const spec = mir_connection_create_spec_for_normal_surface(
4628 connection, surface_size.width.as_int(), surface_size.height.as_int(), mir_pixel_format_abgr_8888);
4629 mir_surface_spec_set_name(spec, "ConnectedClientWithASurfaceFixtureSurface");
4630+
4631+#pragma GCC diagnostic push
4632+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4633 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
4634+#pragma GCC diagnostic pop
4635
4636 surface = mir_surface_create_sync(spec);
4637 mir_surface_spec_release(spec);
4638
4639=== modified file 'tests/mir_test_framework/visible_surface.cpp'
4640--- tests/mir_test_framework/visible_surface.cpp 2016-01-08 12:40:51 +0000
4641+++ tests/mir_test_framework/visible_surface.cpp 2016-10-28 13:38:48 +0000
4642@@ -27,7 +27,10 @@
4643 // Swap buffers to ensure surface is visible for event based tests
4644 if (mir_surface_is_valid(surface))
4645 {
4646+#pragma GCC diagnostic push
4647+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4648 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
4649+#pragma GCC diagnostic pop
4650
4651 std::unique_lock<std::mutex> lk(mutex);
4652 if (!cv.wait_for(lk, std::chrono::seconds(5), [this] { return visible; }))
4653
4654=== modified file 'tests/performance-tests/test_client_startup.cpp'
4655--- tests/performance-tests/test_client_startup.cpp 2016-05-10 23:20:32 +0000
4656+++ tests/performance-tests/test_client_startup.cpp 2016-10-28 13:38:48 +0000
4657@@ -92,7 +92,10 @@
4658
4659 auto conn = create_connection();
4660 auto surf = make_surface(conn);
4661+#pragma GCC diagnostic push
4662+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4663 auto stream = mir_surface_get_buffer_stream(surf);
4664+#pragma GCC diagnostic pop
4665 if (!mir_buffer_stream_is_valid(stream))
4666 {
4667 std::string error_msg{"Could not get buffer stream from surface: "};
4668
4669=== modified file 'tests/privileged-tests/test_input_events.cpp'
4670--- tests/privileged-tests/test_input_events.cpp 2016-08-09 08:13:02 +0000
4671+++ tests/privileged-tests/test_input_events.cpp 2016-10-28 13:38:48 +0000
4672@@ -213,9 +213,12 @@
4673 if (!mir_surface_is_valid(surface))
4674 throw std::runtime_error("Failed to create MirSurface");
4675
4676+#pragma GCC diagnostic push
4677+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4678 mir_surface_set_event_handler(surface, handle_input, handler);
4679 mir_buffer_stream_swap_buffers_sync(
4680 mir_surface_get_buffer_stream(surface));
4681+#pragma GCC diagnostic pop
4682
4683 wait_for_surface_to_become_focused_and_exposed(surface);
4684
4685
4686=== modified file 'tests/test-clients/impolite-shutdown/scroll.cpp'
4687--- tests/test-clients/impolite-shutdown/scroll.cpp 2016-03-29 16:37:11 +0000
4688+++ tests/test-clients/impolite-shutdown/scroll.cpp 2016-10-28 13:38:48 +0000
4689@@ -64,9 +64,11 @@
4690 rc = eglChooseConfig(disp, attribs, &egl_config, 1, &n);
4691 assert(rc == EGL_TRUE);
4692 assert(n == 1);
4693-
4694+#pragma GCC diagnostic push
4695+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4696 MirPixelFormat pixel_format =
4697 mir_connection_get_egl_pixel_format(connection, disp, egl_config);
4698+#pragma GCC diagnostic pop
4699
4700 printf("Mir chose pixel format %d\n", pixel_format);
4701
4702@@ -80,7 +82,10 @@
4703 assert(spec != nullptr);
4704
4705 mir_surface_spec_set_name(spec.get(), __PRETTY_FUNCTION__);
4706+#pragma GCC diagnostic push
4707+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4708 mir_surface_spec_set_buffer_usage(spec.get(), mir_buffer_usage_hardware);
4709+#pragma GCC diagnostic pop
4710
4711 MirSurface *surface = mir_surface_create_sync(spec.get());
4712 spec.reset();
4713@@ -90,9 +95,12 @@
4714 assert(strcmp(mir_surface_get_error_message(surface), "") == 0);
4715 puts("Surface created");
4716
4717+#pragma GCC diagnostic push
4718+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4719 EGLNativeWindowType native_window =
4720 (EGLNativeWindowType)mir_buffer_stream_get_egl_native_window(
4721 mir_surface_get_buffer_stream(surface));
4722+#pragma GCC diagnostic pop
4723 assert(native_window != (EGLNativeWindowType)NULL);
4724
4725 egl_surface = eglCreateWindowSurface(disp, egl_config, native_window, NULL);
4726@@ -171,7 +179,10 @@
4727 assert(strcmp(mir_connection_get_error_message(connection), "") == 0);
4728 puts("Connected");
4729
4730+#pragma GCC diagnostic push
4731+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4732 EGLNativeDisplayType native_display = (EGLNativeDisplayType) mir_connection_get_egl_native_display(connection);
4733+#pragma GCC diagnostic pop
4734 disp = eglGetDisplay(native_display);
4735 assert(disp != EGL_NO_DISPLAY);
4736
4737
4738=== modified file 'tests/test-clients/mir-stress/src/client.cpp'
4739--- tests/test-clients/mir-stress/src/client.cpp 2015-06-17 05:20:42 +0000
4740+++ tests/test-clients/mir-stress/src/client.cpp 2016-10-28 13:38:48 +0000
4741@@ -60,7 +60,10 @@
4742
4743 bool UnacceleratedClient::create_surface()
4744 {
4745+#pragma GCC diagnostic push
4746+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4747 auto display_configuration = mir_connection_create_display_config(connection_);
4748+#pragma GCC diagnostic pop
4749 if (display_configuration->num_outputs < 1)
4750 return false;
4751
4752@@ -75,7 +78,10 @@
4753 auto const spec = mir_connection_create_spec_for_normal_surface(
4754 connection_, 640, 480, pixel_format);
4755 mir_surface_spec_set_name(spec, __PRETTY_FUNCTION__);
4756+#pragma GCC diagnostic push
4757+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4758 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
4759+#pragma GCC diagnostic pop
4760
4761 surface_ = mir_surface_create_sync(spec);
4762 mir_surface_spec_release(spec);
4763
4764=== modified file 'tests/unit-tests/client/test_mir_connection.cpp'
4765--- tests/unit-tests/client/test_mir_connection.cpp 2016-10-21 09:20:55 +0000
4766+++ tests/unit-tests/client/test_mir_connection.cpp 2016-10-28 13:38:48 +0000
4767@@ -615,12 +615,15 @@
4768 using namespace testing;
4769
4770 unsigned int const opcode{42};
4771+#pragma GCC diagnostic push
4772+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4773 auto const request = mir::raii::deleter_for(
4774 mir_platform_message_create(opcode),
4775 &mir_platform_message_release);
4776 auto const response = mir::raii::deleter_for(
4777 mir_platform_message_create(opcode),
4778 &mir_platform_message_release);
4779+#pragma GCC diagnostic pop
4780
4781 EXPECT_CALL(*mock_platform, platform_operation(request.get()))
4782 .WillOnce(Return(response.get()));
4783@@ -645,9 +648,12 @@
4784 using namespace testing;
4785
4786 unsigned int const opcode{42};
4787+#pragma GCC diagnostic push
4788+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4789 auto const request = mir::raii::deleter_for(
4790 mir_platform_message_create(opcode),
4791 &mir_platform_message_release);
4792+#pragma GCC diagnostic pop
4793
4794 EXPECT_CALL(*mock_platform, platform_operation(_))
4795 .WillOnce(Return(nullptr));
4796@@ -664,8 +670,11 @@
4797 request.get(), assign_response, &returned_response);
4798 mir_wait_for(op_wh);
4799
4800+#pragma GCC diagnostic push
4801+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4802 EXPECT_THAT(mir_platform_message_get_opcode(returned_response), Eq(opcode));
4803 mir_platform_message_release(returned_response);
4804+#pragma GCC diagnostic pop
4805 }
4806
4807 TEST_F(MirConnectionTest, wait_handle_is_signalled_during_stream_creation_error)
4808
4809=== modified file 'tests/unit-tests/platforms/mesa/client/test_client_platform.cpp'
4810--- tests/unit-tests/platforms/mesa/client/test_client_platform.cpp 2016-09-01 23:08:33 +0000
4811+++ tests/unit-tests/platforms/mesa/client/test_client_platform.cpp 2016-10-28 13:38:48 +0000
4812@@ -58,11 +58,14 @@
4813 {
4814 MirPlatformMessage* set_gbm_device(gbm_device* dev)
4815 {
4816+#pragma GCC diagnostic push
4817+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4818 auto request_msg = mir::raii::deleter_for(
4819 mir_platform_message_create(MirMesaPlatformOperation::set_gbm_device),
4820 &mir_platform_message_release);
4821 MirMesaSetGBMDeviceRequest const request{dev};
4822 mir_platform_message_set_data(request_msg.get(), &request, sizeof(request));
4823+#pragma GCC diagnostic pop
4824
4825 return platform->platform_operation(request_msg.get());
4826 }
4827@@ -97,12 +100,18 @@
4828 int const success{0};
4829 auto const gbm_dev_dummy = reinterpret_cast<gbm_device*>(this);
4830
4831+#pragma GCC diagnostic push
4832+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4833 auto response_msg = mir::raii::deleter_for(
4834 set_gbm_device(gbm_dev_dummy),
4835 &mir_platform_message_release);
4836+#pragma GCC diagnostic pop
4837
4838 ASSERT_THAT(response_msg, NotNull());
4839+#pragma GCC diagnostic push
4840+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4841 auto const response_data = mir_platform_message_get_data(response_msg.get());
4842+#pragma GCC diagnostic pop
4843 ASSERT_THAT(response_data.size, Eq(sizeof(MirMesaSetGBMDeviceResponse)));
4844
4845 MirMesaSetGBMDeviceResponse response{-1};
4846@@ -119,9 +128,12 @@
4847 int const previous_data_count{pkg.data_items};
4848 auto const gbm_dev_dummy = reinterpret_cast<gbm_device*>(this);
4849
4850+#pragma GCC diagnostic push
4851+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4852 auto response_msg = mir::raii::deleter_for(
4853 set_gbm_device(gbm_dev_dummy),
4854 &mir_platform_message_release);
4855+#pragma GCC diagnostic pop
4856
4857 platform->populate(pkg);
4858 EXPECT_THAT(pkg.data_items, Eq(previous_data_count + (sizeof(gbm_dev_dummy) / sizeof(int))));

Subscribers

People subscribed via source and target branches