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
=== modified file 'benchmarks/frame-uniformity/touch_measuring_client.cpp'
--- benchmarks/frame-uniformity/touch_measuring_client.cpp 2015-06-17 05:20:42 +0000
+++ benchmarks/frame-uniformity/touch_measuring_client.cpp 2016-10-28 13:38:48 +0000
@@ -38,7 +38,10 @@
38 auto const spec = mir_connection_create_spec_for_normal_surface(38 auto const spec = mir_connection_create_spec_for_normal_surface(
39 connection, 1024, 1024, pixel_format);39 connection, 1024, 1024, pixel_format);
40 mir_surface_spec_set_name(spec, "frame-uniformity-test");40 mir_surface_spec_set_name(spec, "frame-uniformity-test");
41#pragma GCC diagnostic push
42#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
41 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);43 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
44#pragma GCC diagnostic pop
4245
43 auto surface = mir_surface_create_sync(spec);46 auto surface = mir_surface_create_sync(spec);
44 mir_surface_spec_release(spec);47 mir_surface_spec_release(spec);
@@ -61,7 +64,10 @@
6164
62void collect_input_and_frame_timing(MirSurface *surface, mt::Barrier& client_ready, std::chrono::high_resolution_clock::duration duration, std::shared_ptr<TouchSamples> const& results)65void collect_input_and_frame_timing(MirSurface *surface, mt::Barrier& client_ready, std::chrono::high_resolution_clock::duration duration, std::shared_ptr<TouchSamples> const& results)
63{66{
67#pragma GCC diagnostic push
68#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
64 mir_surface_set_event_handler(surface, input_callback, results.get());69 mir_surface_set_event_handler(surface, input_callback, results.get());
70#pragma GCC diagnostic pop
65 71
66 client_ready.ready();72 client_ready.ready();
6773
@@ -69,7 +75,10 @@
69 auto end_time = std::chrono::high_resolution_clock::now() + duration;75 auto end_time = std::chrono::high_resolution_clock::now() + duration;
70 while (std::chrono::high_resolution_clock::now() < end_time)76 while (std::chrono::high_resolution_clock::now() < end_time)
71 {77 {
78#pragma GCC diagnostic push
79#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
72 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));80 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
81#pragma GCC diagnostic pop
73 results->record_frame_time(std::chrono::high_resolution_clock::now());82 results->record_frame_time(std::chrono::high_resolution_clock::now());
74 }83 }
75}84}
7685
=== modified file 'examples/animated_cursor_demo_client.c'
--- examples/animated_cursor_demo_client.c 2016-10-21 07:53:23 +0000
+++ examples/animated_cursor_demo_client.c 2016-10-28 13:38:48 +0000
@@ -68,13 +68,19 @@
6868
69MirBufferStream* make_cursor_stream(MirConnection *connection, MirSurface *surface)69MirBufferStream* make_cursor_stream(MirConnection *connection, MirSurface *surface)
70{70{
71#pragma GCC diagnostic push
72#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
71 MirBufferStream* stream = mir_connection_create_buffer_stream_sync(connection,73 MirBufferStream* stream = mir_connection_create_buffer_stream_sync(connection,
72 24, 24, mir_pixel_format_argb_8888, mir_buffer_usage_software);74 24, 24, mir_pixel_format_argb_8888, mir_buffer_usage_software);
75#pragma GCC diagnostic pop
7376
74 animate_cursor(stream);77 animate_cursor(stream);
7578
76 MirCursorConfiguration* conf = mir_cursor_configuration_from_buffer_stream(stream, 0, 0);79 MirCursorConfiguration* conf = mir_cursor_configuration_from_buffer_stream(stream, 0, 0);
80#pragma GCC diagnostic push
81#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
77 mir_wait_for(mir_surface_configure_cursor(surface, conf));82 mir_wait_for(mir_surface_configure_cursor(surface, conf));
83#pragma GCC diagnostic pop
78 mir_cursor_configuration_destroy(conf);84 mir_cursor_configuration_destroy(conf);
79 85
80 return stream;86 return stream;
8187
=== modified file 'examples/basic.c'
--- examples/basic.c 2016-01-29 08:18:22 +0000
+++ examples/basic.c 2016-10-28 13:38:48 +0000
@@ -112,7 +112,10 @@
112 platform_package.data_items = -1;112 platform_package.data_items = -1;
113 platform_package.fd_items = -1;113 platform_package.fd_items = -1;
114114
115#pragma GCC diagnostic push
116#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
115 mir_connection_get_platform(mcd.connection, &platform_package);117 mir_connection_get_platform(mcd.connection, &platform_package);
118#pragma GCC diagnostic pop
116 assert(0 <= platform_package.data_items);119 assert(0 <= platform_package.data_items);
117 assert(0 <= platform_package.fd_items);120 assert(0 <= platform_package.fd_items);
118 }121 }
@@ -120,7 +123,10 @@
120 {123 {
121 MirModuleProperties properties = { NULL, -1, -1, -1, NULL };124 MirModuleProperties properties = { NULL, -1, -1, -1, NULL };
122125
126#pragma GCC diagnostic push
127#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
123 mir_connection_get_graphics_module(mcd.connection, &properties);128 mir_connection_get_graphics_module(mcd.connection, &properties);
129#pragma GCC diagnostic pop
124130
125 assert(NULL != properties.name);131 assert(NULL != properties.name);
126 assert(0 <= properties.major_version);132 assert(0 <= properties.major_version);
@@ -160,8 +166,11 @@
160 else166 else
161 assert(strcmp(mir_surface_get_error_message(mcd.surface), "") == 0);167 assert(strcmp(mir_surface_get_error_message(mcd.surface), "") == 0);
162168
169#pragma GCC diagnostic push
170#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
163 MirBufferStream *bs =171 MirBufferStream *bs =
164 mir_surface_get_buffer_stream(mcd.surface);172 mir_surface_get_buffer_stream(mcd.surface);
173#pragma GCC diagnostic pop
165174
166 // We can keep exchanging the current buffer for a new one175 // We can keep exchanging the current buffer for a new one
167 for (int i = 0; i < buffer_swap_count; i++)176 for (int i = 0; i < buffer_swap_count; i++)
@@ -170,7 +179,10 @@
170 {179 {
171 ///\internal [get_current_buffer_tag]180 ///\internal [get_current_buffer_tag]
172 MirNativeBuffer* buffer_package = NULL;181 MirNativeBuffer* buffer_package = NULL;
182#pragma GCC diagnostic push
183#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
173 mir_buffer_stream_get_current_buffer(bs, &buffer_package);184 mir_buffer_stream_get_current_buffer(bs, &buffer_package);
185#pragma GCC diagnostic pop
174 assert(buffer_package != NULL);186 assert(buffer_package != NULL);
175 MirGraphicsRegion graphics_region;187 MirGraphicsRegion graphics_region;
176 mir_buffer_stream_get_graphics_region(bs, &graphics_region);188 mir_buffer_stream_get_graphics_region(bs, &graphics_region);
177189
=== modified file 'examples/camera.c'
--- examples/camera.c 2016-10-26 05:15:38 +0000
+++ examples/camera.c 2016-10-28 13:38:48 +0000
@@ -388,7 +388,10 @@
388 if (ultrafast)388 if (ultrafast)
389 {389 {
390 pref = camera_pref_speed;390 pref = camera_pref_speed;
391#pragma GCC diagnostic push
392#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
391 mir_surface_set_swapinterval(mir_eglapp_native_surface(), 0);393 mir_surface_set_swapinterval(mir_eglapp_native_surface(), 0);
394#pragma GCC diagnostic pop
392 }395 }
393 Camera *cam = open_camera(dev_video, pref, 1);396 Camera *cam = open_camera(dev_video, pref, 1);
394 if (!cam)397 if (!cam)
@@ -470,7 +473,10 @@
470 PTHREAD_MUTEX_INITIALIZER,473 PTHREAD_MUTEX_INITIALIZER,
471 true474 true
472 };475 };
476#pragma GCC diagnostic push
477#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
473 mir_surface_set_event_handler(surface, on_event, &state);478 mir_surface_set_event_handler(surface, on_event, &state);
479#pragma GCC diagnostic pop
474480
475 bool first_frame = true;481 bool first_frame = true;
476 while (mir_eglapp_running())482 while (mir_eglapp_running())
@@ -563,7 +569,10 @@
563 mir_eglapp_swap_buffers();569 mir_eglapp_swap_buffers();
564 }570 }
565571
572#pragma GCC diagnostic push
573#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
566 mir_surface_set_event_handler(surface, NULL, NULL);574 mir_surface_set_event_handler(surface, NULL, NULL);
575#pragma GCC diagnostic pop
567 mir_eglapp_cleanup();576 mir_eglapp_cleanup();
568 close_camera(cam);577 close_camera(cam);
569578
570579
=== modified file 'examples/client_helpers.cpp'
--- examples/client_helpers.cpp 2016-01-29 08:18:22 +0000
+++ examples/client_helpers.cpp 2016-10-28 13:38:48 +0000
@@ -100,12 +100,15 @@
100 }100 }
101 }101 }
102102
103#pragma GCC diagnostic push
104#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
103 return mir_connection_create_buffer_stream_sync(105 return mir_connection_create_buffer_stream_sync(
104 connection,106 connection,
105 width,107 width,
106 height,108 height,
107 selected_format,109 selected_format,
108 hardware ? mir_buffer_usage_hardware : mir_buffer_usage_software);110 hardware ? mir_buffer_usage_hardware : mir_buffer_usage_software);
111#pragma GCC diagnostic pop
109}112}
110113
111me::NormalSurface::NormalSurface(me::Connection& connection, unsigned int width, unsigned int height, bool prefers_alpha, bool hardware) :114me::NormalSurface::NormalSurface(me::Connection& connection, unsigned int width, unsigned int height, bool prefers_alpha, bool hardware) :
@@ -153,11 +156,16 @@
153 };156 };
154157
155 mir_surface_spec_set_name(spec.get(), __PRETTY_FUNCTION__);158 mir_surface_spec_set_name(spec.get(), __PRETTY_FUNCTION__);
159#pragma GCC diagnostic push
160#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
156 mir_surface_spec_set_buffer_usage(spec.get(), hardware ? mir_buffer_usage_hardware : mir_buffer_usage_software);161 mir_surface_spec_set_buffer_usage(spec.get(), hardware ? mir_buffer_usage_hardware : mir_buffer_usage_software);
162#pragma GCC diagnostic pop
157 auto surface = mir_surface_create_sync(spec.get());163 auto surface = mir_surface_create_sync(spec.get());
158 return surface;164 return surface;
159}165}
160166
167#pragma GCC diagnostic push
168#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
161me::Context::Context(Connection& connection, MirSurface* surface, int swap_interval) :169me::Context::Context(Connection& connection, MirSurface* surface, int swap_interval) :
162 native_display(reinterpret_cast<EGLNativeDisplayType>(170 native_display(reinterpret_cast<EGLNativeDisplayType>(
163 mir_connection_get_egl_native_display(connection))),171 mir_connection_get_egl_native_display(connection))),
@@ -171,6 +179,7 @@
171 make_current();179 make_current();
172 eglSwapInterval(display.disp, swap_interval);180 eglSwapInterval(display.disp, swap_interval);
173}181}
182#pragma GCC diagnostic pop
174183
175void me::Context::make_current()184void me::Context::make_current()
176{185{
177186
=== modified file 'examples/client_touch_validator.cpp'
--- examples/client_touch_validator.cpp 2016-10-21 07:53:23 +0000
+++ examples/client_touch_validator.cpp 2016-10-28 13:38:48 +0000
@@ -168,7 +168,10 @@
168 TouchState state;168 TouchState state;
169169
170 MirSurface *surface = mir_eglapp_native_surface();170 MirSurface *surface = mir_eglapp_native_surface();
171#pragma GCC diagnostic push
172#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
171 mir_surface_set_event_handler(surface, on_event, &state);173 mir_surface_set_event_handler(surface, on_event, &state);
174#pragma GCC diagnostic pop
172175
173 float const opacity = mir_eglapp_background_opacity;176 float const opacity = mir_eglapp_background_opacity;
174 Color red = {opacity, 0.0f, 0.0f, opacity};177 Color red = {opacity, 0.0f, 0.0f, opacity};
175178
=== modified file 'examples/cursors_demo_client.c'
--- examples/cursors_demo_client.c 2016-10-21 07:53:23 +0000
+++ examples/cursors_demo_client.c 2016-10-28 13:38:48 +0000
@@ -48,9 +48,10 @@
48 size_t real_index = cursor_index % num_cursors;48 size_t real_index = cursor_index % num_cursors;
49 49
50 MirCursorConfiguration *conf = mir_cursor_configuration_from_name(cursors[real_index]);50 MirCursorConfiguration *conf = mir_cursor_configuration_from_name(cursors[real_index]);
5151#pragma GCC diagnostic push
52#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
52 mir_wait_for(mir_surface_configure_cursor(surface, conf));53 mir_wait_for(mir_surface_configure_cursor(surface, conf));
53 54#pragma GCC diagnostic pop
54 mir_cursor_configuration_destroy(conf);55 mir_cursor_configuration_destroy(conf);
55}56}
5657
5758
=== modified file 'examples/demo_client_display_config.c'
--- examples/demo_client_display_config.c 2016-10-21 07:53:23 +0000
+++ examples/demo_client_display_config.c 2016-10-28 13:38:48 +0000
@@ -97,7 +97,10 @@
9797
98static void print_current_configuration(MirConnection *connection)98static void print_current_configuration(MirConnection *connection)
99{99{
100#pragma GCC diagnostic push
101#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
100 MirDisplayConfiguration *conf = mir_connection_create_display_config(connection);102 MirDisplayConfiguration *conf = mir_connection_create_display_config(connection);
103#pragma GCC diagnostic pop
101104
102 for (uint32_t i = 0; i < conf->num_outputs; i++)105 for (uint32_t i = 0; i < conf->num_outputs; i++)
103 {106 {
@@ -124,7 +127,10 @@
124127
125static int apply_configuration(MirConnection *connection, MirDisplayConfiguration *conf)128static int apply_configuration(MirConnection *connection, MirDisplayConfiguration *conf)
126{129{
130#pragma GCC diagnostic push
131#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
127 MirWaitHandle* handle = mir_connection_apply_display_config(connection, conf);132 MirWaitHandle* handle = mir_connection_apply_display_config(connection, conf);
133#pragma GCC diagnostic pop
128 if (!handle)134 if (!handle)
129 {135 {
130 printf("Failed to apply configuration, check that the configuration is valid.\n");136 printf("Failed to apply configuration, check that the configuration is valid.\n");
@@ -250,8 +256,11 @@
250static void configure_display(struct ClientContext *context, ConfigurationMode mode,256static void configure_display(struct ClientContext *context, ConfigurationMode mode,
251 int mode_data)257 int mode_data)
252{258{
259#pragma GCC diagnostic push
260#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
253 MirDisplayConfiguration *conf =261 MirDisplayConfiguration *conf =
254 mir_connection_create_display_config(context->connection);262 mir_connection_create_display_config(context->connection);
263#pragma GCC diagnostic pop
255264
256 if (mode == configuration_mode_clone)265 if (mode == configuration_mode_clone)
257 {266 {
@@ -368,7 +377,10 @@
368 mir_connection_set_display_config_change_callback(377 mir_connection_set_display_config_change_callback(
369 connection, display_change_callback, &ctx);378 connection, display_change_callback, &ctx);
370379
380#pragma GCC diagnostic push
381#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
371 mir_surface_set_event_handler(surface, event_callback, &ctx);382 mir_surface_set_event_handler(surface, event_callback, &ctx);
383#pragma GCC diagnostic pop
372384
373 time_t start = time(NULL);385 time_t start = time(NULL);
374386
375387
=== modified file 'examples/eglapp.c'
--- examples/eglapp.c 2016-10-21 07:53:23 +0000
+++ examples/eglapp.c 2016-10-28 13:38:48 +0000
@@ -409,8 +409,11 @@
409 CHECK(ok, "Could not eglChooseConfig");409 CHECK(ok, "Could not eglChooseConfig");
410 CHECK(neglconfigs > 0, "No EGL config available");410 CHECK(neglconfigs > 0, "No EGL config available");
411411
412#pragma GCC diagnostic push
413#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
412 MirPixelFormat pixel_format =414 MirPixelFormat pixel_format =
413 mir_connection_get_egl_pixel_format(connection, egldisplay, eglconfig);415 mir_connection_get_egl_pixel_format(connection, egldisplay, eglconfig);
416#pragma GCC diagnostic pop
414417
415 printf("Mir chose pixel format %d.\n", pixel_format);418 printf("Mir chose pixel format %d.\n", pixel_format);
416 if (alpha_bits == 0)419 if (alpha_bits == 0)
@@ -431,8 +434,11 @@
431434
432 /* eglapps are interested in the screen size, so435 /* eglapps are interested in the screen size, so
433 use mir_connection_create_display_config */436 use mir_connection_create_display_config */
437#pragma GCC diagnostic push
438#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
434 MirDisplayConfiguration* display_config =439 MirDisplayConfiguration* display_config =
435 mir_connection_create_display_config(connection);440 mir_connection_create_display_config(connection);
441#pragma GCC diagnostic pop
436442
437 const MirDisplayOutput *output = find_active_output(display_config);443 const MirDisplayOutput *output = find_active_output(display_config);
438444
@@ -477,14 +483,20 @@
477483
478 CHECK(mir_surface_is_valid(surface), "Can't create a surface");484 CHECK(mir_surface_is_valid(surface), "Can't create a surface");
479485
486#pragma GCC diagnostic push
487#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
480 mir_surface_set_event_handler(surface, mir_eglapp_handle_event, NULL);488 mir_surface_set_event_handler(surface, mir_eglapp_handle_event, NULL);
489#pragma GCC diagnostic pop
481 490
482 MirCursorConfiguration *conf = mir_cursor_configuration_from_name(cursor_name);491 MirCursorConfiguration *conf = mir_cursor_configuration_from_name(cursor_name);
492#pragma GCC diagnostic push
493#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
483 mir_surface_configure_cursor(surface, conf);494 mir_surface_configure_cursor(surface, conf);
484 mir_cursor_configuration_destroy(conf);495 mir_cursor_configuration_destroy(conf);
485496
486 eglsurface = eglCreateWindowSurface(egldisplay, eglconfig,497 eglsurface = eglCreateWindowSurface(egldisplay, eglconfig,
487 (EGLNativeWindowType)mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(surface)), NULL);498 (EGLNativeWindowType)mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(surface)), NULL);
499#pragma GCC diagnostic pop
488 500
489 CHECK(eglsurface != EGL_NO_SURFACE, "eglCreateWindowSurface failed");501 CHECK(eglsurface != EGL_NO_SURFACE, "eglCreateWindowSurface failed");
490502
491503
=== modified file 'examples/eglsquare.cpp'
--- examples/eglsquare.cpp 2015-05-29 12:53:18 +0000
+++ examples/eglsquare.cpp 2016-10-28 13:38:48 +0000
@@ -109,7 +109,10 @@
109 context{connection, surface, swap_interval},109 context{connection, surface, swap_interval},
110 program{context, dimensions.width, dimensions.height}110 program{context, dimensions.width, dimensions.height}
111 {111 {
112#pragma GCC diagnostic push
113#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
112 mir_surface_set_event_handler(surface, &on_event, this);114 mir_surface_set_event_handler(surface, &on_event, this);
115#pragma GCC diagnostic pop
113 }116 }
114117
115 void on_event(MirEvent const* ev)118 void on_event(MirEvent const* ev)
@@ -159,7 +162,10 @@
159 {162 {
160 unsigned int width{0};163 unsigned int width{0};
161 unsigned int height{0};164 unsigned int height{0};
165#pragma GCC diagnostic push
166#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
162 auto display_config = mir_connection_create_display_config(connection);167 auto display_config = mir_connection_create_display_config(connection);
168#pragma GCC diagnostic pop
163 for (auto i = 0u; i < display_config->num_outputs; i++)169 for (auto i = 0u; i < display_config->num_outputs; i++)
164 {170 {
165 MirDisplayOutput const* out = display_config->outputs + i;171 MirDisplayOutput const* out = display_config->outputs + i;
166172
=== modified file 'examples/eglstateswitcher.c'
--- examples/eglstateswitcher.c 2016-10-21 07:53:23 +0000
+++ examples/eglstateswitcher.c 2016-10-28 13:38:48 +0000
@@ -43,7 +43,10 @@
43 return 1;43 return 1;
4444
45 MirSurface* const surface = mir_eglapp_native_surface();45 MirSurface* const surface = mir_eglapp_native_surface();
46#pragma GCC diagnostic push
47#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
46 MirSurfaceState state = mir_surface_get_state(surface);48 MirSurfaceState state = mir_surface_get_state(surface);
49#pragma GCC diagnostic pop
4750
48 /* This is probably the simplest GL you can do */51 /* This is probably the simplest GL you can do */
49 while (mir_eglapp_running())52 while (mir_eglapp_running())
@@ -72,6 +75,8 @@
7275
73void toggle_surface_state(MirSurface* const surface, MirSurfaceState* state)76void toggle_surface_state(MirSurface* const surface, MirSurfaceState* state)
74{77{
78#pragma GCC diagnostic push
79#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
75 switch (mir_surface_get_state(surface))80 switch (mir_surface_get_state(surface))
76 {81 {
77 PRINT_STATE(mir_surface_state_unknown);82 PRINT_STATE(mir_surface_state_unknown);
@@ -84,6 +89,7 @@
84 default:89 default:
85 puts("Current state: unknown");90 puts("Current state: unknown");
86 }91 }
92#pragma GCC diagnostic pop
8793
88 switch (*state)94 switch (*state)
89 {95 {
@@ -115,5 +121,8 @@
115 NEW_STATE(mir_surface_state_maximized);121 NEW_STATE(mir_surface_state_maximized);
116 break;122 break;
117 }123 }
124#pragma GCC diagnostic push
125#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
118 mir_surface_set_state(surface, *state);126 mir_surface_set_state(surface, *state);
127#pragma GCC diagnostic pop
119}128}
120129
=== modified file 'examples/fingerpaint.c'
--- examples/fingerpaint.c 2016-01-29 08:18:22 +0000
+++ examples/fingerpaint.c 2016-10-28 13:38:48 +0000
@@ -425,9 +425,11 @@
425 fprintf(stderr, "Could not connect to a display server: %s\n", mir_connection_get_error_message(conn));425 fprintf(stderr, "Could not connect to a display server: %s\n", mir_connection_get_error_message(conn));
426 return 1;426 return 1;
427 }427 }
428428#pragma GCC diagnostic push
429#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
429 MirDisplayConfiguration *display_config =430 MirDisplayConfiguration *display_config =
430 mir_connection_create_display_config(conn);431 mir_connection_create_display_config(conn);
432#pragma GCC diagnostic pop
431433
432 const MirDisplayOutput *dinfo = find_active_output(display_config);434 const MirDisplayOutput *dinfo = find_active_output(display_config);
433 if (dinfo == NULL)435 if (dinfo == NULL)
@@ -467,16 +469,21 @@
467469
468 MirSurfaceSpec *spec = mir_connection_create_spec_for_normal_surface(conn, width, height, pixel_format);470 MirSurfaceSpec *spec = mir_connection_create_spec_for_normal_surface(conn, width, height, pixel_format);
469 mir_surface_spec_set_name(spec, "Mir Fingerpaint");471 mir_surface_spec_set_name(spec, "Mir Fingerpaint");
472#pragma GCC diagnostic push
473#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
470 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);474 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
475#pragma GCC diagnostic pop
471476
472 surf = mir_surface_create_sync(spec);477 surf = mir_surface_create_sync(spec);
473 mir_surface_spec_release(spec);478 mir_surface_spec_release(spec);
474479
475 if (surf != NULL)480 if (surf != NULL)
476 {481 {
482#pragma GCC diagnostic push
483#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
477 mir_surface_set_swapinterval(surf, swap_interval);484 mir_surface_set_swapinterval(surf, swap_interval);
478 mir_surface_set_event_handler(surf, &on_event, &canvas);485 mir_surface_set_event_handler(surf, &on_event, &canvas);
479 486#pragma GCC diagnostic pop
480 canvas.width = width;487 canvas.width = width;
481 canvas.height = height;488 canvas.height = height;
482 canvas.stride = canvas.width * BYTES_PER_PIXEL(pixel_format);489 canvas.stride = canvas.width * BYTES_PER_PIXEL(pixel_format);
@@ -488,10 +495,12 @@
488 signal(SIGINT, shutdown);495 signal(SIGINT, shutdown);
489 signal(SIGTERM, shutdown);496 signal(SIGTERM, shutdown);
490 signal(SIGHUP, shutdown);497 signal(SIGHUP, shutdown);
491 498
492 clear_region(&canvas, &background);499 clear_region(&canvas, &background);
493 500#pragma GCC diagnostic push
501#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
494 MirBufferStream *bs = mir_surface_get_buffer_stream(surf);502 MirBufferStream *bs = mir_surface_get_buffer_stream(surf);
503#pragma GCC diagnostic pop
495504
496 while (running)505 while (running)
497 {506 {
@@ -509,7 +518,10 @@
509 }518 }
510519
511 /* Ensure canvas won't be used after it's freed */520 /* Ensure canvas won't be used after it's freed */
521#pragma GCC diagnostic push
522#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
512 mir_surface_set_event_handler(surf, NULL, NULL);523 mir_surface_set_event_handler(surf, NULL, NULL);
524#pragma GCC diagnostic pop
513 free(canvas.vaddr);525 free(canvas.vaddr);
514 }526 }
515 else527 else
516528
=== modified file 'examples/flicker.c'
--- examples/flicker.c 2016-07-18 07:38:38 +0000
+++ examples/flicker.c 2016-10-28 13:38:48 +0000
@@ -157,7 +157,10 @@
157 mir_connection_create_spec_for_normal_surface(connection, 640, 480, pixel_format);157 mir_connection_create_spec_for_normal_surface(connection, 640, 480, pixel_format);
158 assert(spec != NULL);158 assert(spec != NULL);
159 mir_surface_spec_set_name(spec, __FILE__);159 mir_surface_spec_set_name(spec, __FILE__);
160#pragma GCC diagnostic push
161#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
160 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);162 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
163#pragma GCC diagnostic pop
161164
162 surface = mir_surface_create_sync(spec);165 surface = mir_surface_create_sync(spec);
163 mir_surface_spec_release(spec);166 mir_surface_spec_release(spec);
@@ -167,14 +170,20 @@
167 assert(strcmp(mir_surface_get_error_message(surface), "") == 0);170 assert(strcmp(mir_surface_get_error_message(surface), "") == 0);
168 puts("Surface created");171 puts("Surface created");
169172
173#pragma GCC diagnostic push
174#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
170 mir_surface_set_swapinterval(surface, swapinterval);175 mir_surface_set_swapinterval(surface, swapinterval);
176#pragma GCC diagnostic pop
171177
172 uint32_t pattern[2] = {0};178 uint32_t pattern[2] = {0};
173 fill_pattern(pattern, pixel_format);179 fill_pattern(pattern, pixel_format);
174180
175 MirGraphicsRegion graphics_region;181 MirGraphicsRegion graphics_region;
176 int i=0;182 int i=0;
183#pragma GCC diagnostic push
184#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
177 MirBufferStream *bs = mir_surface_get_buffer_stream(surface);185 MirBufferStream *bs = mir_surface_get_buffer_stream(surface);
186#pragma GCC diagnostic pop
178187
179 signal(SIGINT, shutdown);188 signal(SIGINT, shutdown);
180 signal(SIGTERM, shutdown);189 signal(SIGTERM, shutdown);
181190
=== modified file 'examples/multi_stream.cpp'
--- examples/multi_stream.cpp 2016-10-20 14:26:23 +0000
+++ examples/multi_stream.cpp 2016-10-28 13:38:48 +0000
@@ -206,7 +206,10 @@
206 me::Connection connection{socket, "Multiple MirBufferStream example"};206 me::Connection connection{socket, "Multiple MirBufferStream example"};
207207
208 me::NormalSurface surface{connection, 200, 200, true, false};208 me::NormalSurface surface{connection, 200, 200, true, false};
209#pragma GCC diagnostic push
210#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
209 MirBufferStream* surface_stream = mir_surface_get_buffer_stream(surface);211 MirBufferStream* surface_stream = mir_surface_get_buffer_stream(surface);
212#pragma GCC diagnostic pop
210 int topSize = 100, dTopSize = 2;213 int topSize = 100, dTopSize = 2;
211 auto top = std::make_unique<me::BufferStream>(connection, topSize, topSize, true, false);214 auto top = std::make_unique<me::BufferStream>(connection, topSize, topSize, true, false);
212 me::BufferStream bottom(connection, 50, 50, true, false);215 me::BufferStream bottom(connection, 50, 50, true, false);
@@ -276,7 +279,10 @@
276 fill_stream_with(bottom, 0, 0, bottomColour, 128);279 fill_stream_with(bottom, 0, 0, bottomColour, 128);
277 fill_stream_with(*top, 0, topColour, 0, 128);280 fill_stream_with(*top, 0, topColour, 0, 128);
278281
282#pragma GCC diagnostic push
283#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
279 mir_surface_spec_set_streams(spec, arrangement.data(), arrangement.size());284 mir_surface_spec_set_streams(spec, arrangement.data(), arrangement.size());
285#pragma GCC diagnostic pop
280 mir_buffer_stream_swap_buffers_sync(surface_stream);286 mir_buffer_stream_swap_buffers_sync(surface_stream);
281 mir_buffer_stream_swap_buffers_sync(bottom);287 mir_buffer_stream_swap_buffers_sync(bottom);
282 mir_buffer_stream_swap_buffers_sync(*top);288 mir_buffer_stream_swap_buffers_sync(*top);
283289
=== modified file 'examples/multiwin.c'
--- examples/multiwin.c 2015-07-16 07:03:19 +0000
+++ examples/multiwin.c 2016-10-28 13:38:48 +0000
@@ -164,7 +164,10 @@
164static void draw_window(Window *win)164static void draw_window(Window *win)
165{165{
166 MirGraphicsRegion region;166 MirGraphicsRegion region;
167#pragma GCC diagnostic push
168#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
167 MirBufferStream *bs = mir_surface_get_buffer_stream(win->surface);169 MirBufferStream *bs = mir_surface_get_buffer_stream(win->surface);
170#pragma GCC diagnostic pop
168171
169 mir_buffer_stream_get_graphics_region(bs, &region);172 mir_buffer_stream_get_graphics_region(bs, &region);
170 clear_region(&region, &win->fill);173 clear_region(&region, &win->fill);
@@ -252,7 +255,10 @@
252 return 1;255 return 1;
253 }256 }
254257
258#pragma GCC diagnostic push
259#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
255 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);260 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
261#pragma GCC diagnostic pop
256 mir_surface_spec_set_name(spec, "red");262 mir_surface_spec_set_name(spec, "red");
257263
258 win[0].surface = mir_surface_create_sync(spec);264 win[0].surface = mir_surface_create_sync(spec);
259265
=== modified file 'examples/pointer_confinement.c'
--- examples/pointer_confinement.c 2016-10-21 07:53:23 +0000
+++ examples/pointer_confinement.c 2016-10-28 13:38:48 +0000
@@ -112,7 +112,10 @@
112 mir_surface_spec_release(spec);112 mir_surface_spec_release(spec);
113113
114 // If we are grabbing we'll make it NULL which will hide the cursor114 // If we are grabbing we'll make it NULL which will hide the cursor
115#pragma GCC diagnostic push
116#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
115 mir_surface_configure_cursor(surface, conf);117 mir_surface_configure_cursor(surface, conf);
118#pragma GCC diagnostic pop
116 mir_cursor_configuration_destroy(conf);119 mir_cursor_configuration_destroy(conf);
117 }120 }
118 else if (key_code == XKB_KEY_f)121 else if (key_code == XKB_KEY_f)
@@ -221,7 +224,10 @@
221 glUseProgram(prog);224 glUseProgram(prog);
222225
223 MirSurface* surface = mir_eglapp_native_surface();226 MirSurface* surface = mir_eglapp_native_surface();
227#pragma GCC diagnostic push
228#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
224 mir_surface_set_event_handler(surface, handle_event, NULL);229 mir_surface_set_event_handler(surface, handle_event, NULL);
230#pragma GCC diagnostic pop
225231
226 spec = mir_connection_create_spec_for_changes(mir_eglapp_native_connection());232 spec = mir_connection_create_spec_for_changes(mir_eglapp_native_connection());
227 mir_surface_spec_set_pointer_confinement(spec, mir_pointer_confined_to_surface);233 mir_surface_spec_set_pointer_confinement(spec, mir_pointer_confined_to_surface);
@@ -230,7 +236,10 @@
230 mir_surface_spec_release(spec);236 mir_surface_spec_release(spec);
231237
232 // Hide cursor238 // Hide cursor
239#pragma GCC diagnostic push
240#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
233 mir_surface_configure_cursor(surface, NULL);241 mir_surface_configure_cursor(surface, NULL);
242#pragma GCC diagnostic pop
234243
235 glClearColor(0.3f, 0.3f, 0.3f, 1.0f);244 glClearColor(0.3f, 0.3f, 0.3f, 1.0f);
236245
237246
=== modified file 'examples/progressbar.c'
--- examples/progressbar.c 2015-06-17 05:20:42 +0000
+++ examples/progressbar.c 2016-10-28 13:38:48 +0000
@@ -184,8 +184,10 @@
184static void redraw(MirSurface *surface, const MirGraphicsRegion *canvas)184static void redraw(MirSurface *surface, const MirGraphicsRegion *canvas)
185{185{
186 MirGraphicsRegion backbuffer;186 MirGraphicsRegion backbuffer;
187#pragma GCC diagnostic push
188#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
187 MirBufferStream *bs = mir_surface_get_buffer_stream(surface);189 MirBufferStream *bs = mir_surface_get_buffer_stream(surface);
188190#pragma GCC diagnostic pop
189 mir_buffer_stream_get_graphics_region(bs, &backbuffer);191 mir_buffer_stream_get_graphics_region(bs, &backbuffer);
190 clear_region(&backbuffer, background);192 clear_region(&backbuffer, background);
191 copy_region(&backbuffer, canvas);193 copy_region(&backbuffer, canvas);
@@ -266,7 +268,10 @@
266 mir_surface_spec_set_name(spec, name);268 mir_surface_spec_set_name(spec, name);
267 }269 }
268270
271#pragma GCC diagnostic push
272#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
269 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);273 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
274#pragma GCC diagnostic pop
270275
271 surf = mir_surface_create_sync(spec);276 surf = mir_surface_create_sync(spec);
272 mir_surface_spec_release(spec);277 mir_surface_spec_release(spec);
273278
=== modified file 'examples/prompt_session.c'
--- examples/prompt_session.c 2016-09-08 02:58:56 +0000
+++ examples/prompt_session.c 2016-10-28 13:38:48 +0000
@@ -116,7 +116,10 @@
116 platform_package.data_items = -1;116 platform_package.data_items = -1;
117 platform_package.fd_items = -1;117 platform_package.fd_items = -1;
118118
119#pragma GCC diagnostic push
120#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
119 mir_connection_get_platform(mcd->connection, &platform_package);121 mir_connection_get_platform(mcd->connection, &platform_package);
122#pragma GCC diagnostic pop
120 assert(0 <= platform_package.data_items);123 assert(0 <= platform_package.data_items);
121 assert(0 <= platform_package.fd_items);124 assert(0 <= platform_package.fd_items);
122 }125 }
123126
=== modified file 'examples/target.c'
--- examples/target.c 2016-10-21 07:53:23 +0000
+++ examples/target.c 2016-10-28 13:38:48 +0000
@@ -352,7 +352,10 @@
352 }352 }
353353
354 MirSurface *surface = mir_eglapp_native_surface();354 MirSurface *surface = mir_eglapp_native_surface();
355#pragma GCC diagnostic push
356#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
355 mir_surface_set_event_handler(surface, on_event, &state);357 mir_surface_set_event_handler(surface, on_event, &state);
358#pragma GCC diagnostic pop
356359
357 while (true)360 while (true)
358 {361 {
@@ -421,7 +424,10 @@
421 mir_eglapp_swap_buffers();424 mir_eglapp_swap_buffers();
422 }425 }
423426
427#pragma GCC diagnostic push
428#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
424 mir_surface_set_event_handler(surface, NULL, NULL);429 mir_surface_set_event_handler(surface, NULL, NULL);
430#pragma GCC diagnostic pop
425 mir_eglapp_cleanup();431 mir_eglapp_cleanup();
426432
427 pthread_join(shutdown_handler_thread, NULL);433 pthread_join(shutdown_handler_thread, NULL);
428434
=== modified file 'examples/tooltip.c'
--- examples/tooltip.c 2016-10-21 07:53:23 +0000
+++ examples/tooltip.c 2016-10-28 13:38:48 +0000
@@ -105,7 +105,10 @@
105 MirSurfaceSpec* const spec = mir_connection_create_spec_for_tip(105 MirSurfaceSpec* const spec = mir_connection_create_spec_for_tip(
106 connection, width, height, format, parent, &zone, mir_edge_attachment_vertical);106 connection, width, height, format, parent, &zone, mir_edge_attachment_vertical);
107107
108#pragma GCC diagnostic push
109#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
108 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);110 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
111#pragma GCC diagnostic pop
109 mir_surface_spec_set_name(spec, "tooltip");112 mir_surface_spec_set_name(spec, "tooltip");
110 mir_surface_spec_set_min_width(spec, width);113 mir_surface_spec_set_min_width(spec, width);
111 mir_surface_spec_set_max_width(spec, width);114 mir_surface_spec_set_max_width(spec, width);
@@ -115,7 +118,10 @@
115 MirSurface* tooltip = mir_surface_create_sync(spec);118 MirSurface* tooltip = mir_surface_create_sync(spec);
116 mir_surface_spec_release(spec);119 mir_surface_spec_release(spec);
117120
121#pragma GCC diagnostic push
122#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
118 MirBufferStream* const bs = mir_surface_get_buffer_stream(tooltip);123 MirBufferStream* const bs = mir_surface_get_buffer_stream(tooltip);
124#pragma GCC diagnostic pop
119 MirGraphicsRegion buffer;125 MirGraphicsRegion buffer;
120 mir_buffer_stream_get_graphics_region(bs, &buffer);126 mir_buffer_stream_get_graphics_region(bs, &buffer);
121127
122128
=== modified file 'include/client/mir_toolkit/debug/surface.h'
--- include/client/mir_toolkit/debug/surface.h 2015-02-22 07:46:25 +0000
+++ include/client/mir_toolkit/debug/surface.h 2016-10-28 13:38:48 +0000
@@ -36,16 +36,23 @@
3636
37/**37/**
38 * Get the ID of the surface's current buffer (only useful for debug purposes)38 * Get the ID of the surface's current buffer (only useful for debug purposes)
39 *
40 * \deprecated Not useful anymore
41 *
39 * \pre The surface is valid42 * \pre The surface is valid
40 * \param [in] surface The surface43 * \param [in] surface The surface
41 * \return The internal buffer ID of the surface's current buffer.44 * \return The internal buffer ID of the surface's current buffer.
42 * This is the buffer that is currently being drawn to,45 * This is the buffer that is currently being drawn to,
43 * and would be returned by mir_surface_get_current_buffer.46 * and would be returned by mir_surface_get_current_buffer.
44 */47 */
48__attribute__ ((deprecated))
45uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface);49uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface);
4650
47/**51/**
48 * Get the screen coordinates corresponding to a pair of surface coordinates52 * Get the screen coordinates corresponding to a pair of surface coordinates
53 *
54 * \deprecated Use the "debug_surface_coords" extension instead
55 *
49 * \pre The surface is valid56 * \pre The surface is valid
50 * \param [in] surface The surface57 * \param [in] surface The surface
51 * \param [in] x, y Surface coordinates to map to screen coordinates58 * \param [in] x, y Surface coordinates to map to screen coordinates
@@ -59,6 +66,7 @@
59 * This call will only be interesting for automated testing, where both the client66 * This call will only be interesting for automated testing, where both the client
60 * and shell state is known and constrained.67 * and shell state is known and constrained.
61 */68 */
69__attribute__ ((deprecated))
62bool mir_debug_surface_coords_to_screen(MirSurface* surface,70bool mir_debug_surface_coords_to_screen(MirSurface* surface,
63 int x, int y,71 int x, int y,
64 int* screen_x, int* screen_y);72 int* screen_x, int* screen_y);
6573
=== modified file 'include/client/mir_toolkit/mir_buffer_stream.h'
--- include/client/mir_toolkit/mir_buffer_stream.h 2016-10-12 06:03:15 +0000
+++ include/client/mir_toolkit/mir_buffer_stream.h 2016-10-28 13:38:48 +0000
@@ -52,6 +52,8 @@
52/**52/**
53 * Create a new buffer stream. 53 * Create a new buffer stream.
54 *54 *
55 * \deprecated See mir_render_surface_create_buffer_stream
56 *
55 * For example, the resulting buffer stream may be used57 * For example, the resulting buffer stream may be used
56 * with mir_cursor_configuration_from_buffer_stream, 58 * with mir_cursor_configuration_from_buffer_stream,
57 * in order to post images to the system cursor.59 * in order to post images to the system cursor.
@@ -70,6 +72,7 @@
70 *72 *
71 * \return A handle that can be supplied to mir_wait_for73 * \return A handle that can be supplied to mir_wait_for
72 */74 */
75__attribute__ ((deprecated))
73MirWaitHandle* mir_connection_create_buffer_stream(MirConnection *connection,76MirWaitHandle* mir_connection_create_buffer_stream(MirConnection *connection,
74 int width, int height,77 int width, int height,
75 MirPixelFormat format,78 MirPixelFormat format,
@@ -83,6 +86,8 @@
83 * mir_cursor_configuration_from_buffer_stream in order to post images 86 * mir_cursor_configuration_from_buffer_stream in order to post images
84 * to the system cursor.87 * to the system cursor.
85 *88 *
89 * \deprecated See mir_render_surface_create_buffer_stream_sync
90 *
86 * \param [in] connection A valid connection91 * \param [in] connection A valid connection
87 * \param [in] width Requested buffer width92 * \param [in] width Requested buffer width
88 * \param [in] height Requested buffer height93 * \param [in] height Requested buffer height
@@ -93,6 +98,7 @@
93 * \return The new buffer stream. This is guaranteed non-null, 98 * \return The new buffer stream. This is guaranteed non-null,
94 * but may be invalid in the case of error.99 * but may be invalid in the case of error.
95 */100 */
101__attribute__ ((deprecated))
96MirBufferStream* mir_connection_create_buffer_stream_sync(MirConnection *connection,102MirBufferStream* mir_connection_create_buffer_stream_sync(MirConnection *connection,
97 int width, int height,103 int width, int height,
98 MirPixelFormat format,104 MirPixelFormat format,
@@ -100,6 +106,9 @@
100106
101/**107/**
102 * Release the supplied stream and any associated buffer. The returned wait108 * Release the supplied stream and any associated buffer. The returned wait
109 *
110 * \note TODO: Cleanup remove callback?
111 *
103 * handle remains valid until the connection to the server is released.112 * handle remains valid until the connection to the server is released.
104 * \warning callback could be called from another thread. You must do any113 * \warning callback could be called from another thread. You must do any
105 * locking appropriate to protect your data accessed in the114 * locking appropriate to protect your data accessed in the
@@ -140,17 +149,19 @@
140 * \return One of mir_platform_type_android or 149 * \return One of mir_platform_type_android or
141 * mir_platform_type_gbm150 * mir_platform_type_gbm
142 */151 */
143/// @cond
144__attribute__ ((deprecated))152__attribute__ ((deprecated))
145/// @endcond
146MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream);153MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream);
147154
148/**155/**
149 * Retrieve the current buffer in "raw" representation.156 * Retrieve the current buffer in "raw" representation.
157 *
158 * \deprecated Replaced by a platform specific extension
159 *
150 * \pre The buffer stream is valid160 * \pre The buffer stream is valid
151 * \param [in] buffer_stream The buffer stream161 * \param [in] buffer_stream The buffer stream
152 * \param [out] buffer_package Structure to be populated162 * \param [out] buffer_package Structure to be populated
153 */163 */
164__attribute__ ((deprecated))
154void mir_buffer_stream_get_current_buffer(MirBufferStream *buffer_stream,165void mir_buffer_stream_get_current_buffer(MirBufferStream *buffer_stream,
155 MirNativeBuffer **buffer_package);166 MirNativeBuffer **buffer_package);
156167
@@ -181,35 +192,47 @@
181192
182/**193/**
183 * Retrieve a buffer stream's graphics region194 * Retrieve a buffer stream's graphics region
195 *
184 * \warning Depending on platform, this can map the graphics buffer each196 * \warning Depending on platform, this can map the graphics buffer each
185 * time its called. The region remains mapped until197 * time its called. The region remains mapped until
186 * mir_buffer_stream_swap_buffers().198 * mir_buffer_stream_swap_buffers().
187 * \pre The buffer stream is valid199 * \pre The buffer stream is valid
188 * \param [in] buffer_stream The buffer stream200 * \param [in] buffer_stream The buffer stream
189 * \param [out] graphics_region Structure to be populated201 * \param [out] graphics_region Structure to be populated
202 * \return True if the region is valid, false otherwise.
190 */203 */
191void mir_buffer_stream_get_graphics_region(204bool mir_buffer_stream_get_graphics_region(
192 MirBufferStream *buffer_stream,205 MirBufferStream *buffer_stream,
193 MirGraphicsRegion *graphics_region);206 MirGraphicsRegion *graphics_region);
194207
195/**208/**
196 * Retrieve a window type which may be used by EGL.209 * Retrieve a window type which may be used by EGL.
210 *
211 * \deprecated No replacement, use MirRenderSurface * directly with EGL
212 *
197 * \param [in] buffer_stream The buffer stream213 * \param [in] buffer_stream The buffer stream
198 * \return An EGLNativeWindowType that the client can use214 * \return An EGLNativeWindowType that the client can use
199 */215 */
216__attribute__ ((deprecated))
200MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream *buffer_stream);217MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream *buffer_stream);
201218
202/**219/**
203 * Set the scale associated with all buffers in the stream220 * Set the scale associated with all buffers in the stream
221 *
222 * \note May need deprecation - Need a consistent API for high DPI scaling/destination size
223 *
204 * \param [in] buffer_stream The buffer stream224 * \param [in] buffer_stream The buffer stream
205 * \param [in] scale The scale225 * \param [in] scale The scale
206 * \return A handle that can be passed to mir_wait_for226 * \return A handle that can be passed to mir_wait_for
207 */227 */
208MirWaitHandle *mir_buffer_stream_set_scale(MirBufferStream* buffer_stream, float scale);228MirWaitHandle *mir_buffer_stream_set_scale(MirBufferStream* buffer_stream, float scale);
209229
210/**230/**
211 * Set the scale as in mir_buffer_stream_set_scale(), but also wait for the231 * Set the scale as in mir_buffer_stream_set_scale(), but also wait for the
212 * operation to complete.232 * operation to complete.
233 *
234 * \note May need deprecation - Need a consistent API for high DPI scaling/destination size
235 *
213 * \param [in] buffer_stream The buffer stream236 * \param [in] buffer_stream The buffer stream
214 * \param [in] scale The scale237 * \param [in] scale The scale
215 */238 */
216239
=== modified file 'include/client/mir_toolkit/mir_connection.h'
--- include/client/mir_toolkit/mir_connection.h 2016-10-12 06:03:15 +0000
+++ include/client/mir_toolkit/mir_connection.h 2016-10-28 13:38:48 +0000
@@ -89,20 +89,26 @@
89/**89/**
90 * Query platform-specific data and/or file descriptors that are required to90 * Query platform-specific data and/or file descriptors that are required to
91 * initialize GL/EGL features.91 * initialize GL/EGL features.
92 *
93 * \deprecated Use "get_platform" extension
94 *
92 * \param [in] connection The connection95 * \param [in] connection The connection
93 * \param [out] platform_package Structure to be populated96 * \param [out] platform_package Structure to be populated
94 */97 */
98__attribute__ ((deprecated))
95void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package);99void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package);
96100
97/**101/**
98 * Query graphics platform module.102 * Query graphics platform module.
99 *103 *
104 * \deprecated Use "get_graphics_module" extension
100 * \note The char pointers in MirModuleProperties are owned by the connection and should not be105 * \note The char pointers in MirModuleProperties are owned by the connection and should not be
101 * freed. They remain valid until the connection is released.106 * freed. They remain valid until the connection is released.
102 *107 *
103 * \param [in] connection The connection108 * \param [in] connection The connection
104 * \param [out] properties Structure to be populated109 * \param [out] properties Structure to be populated
105 */110 */
111__attribute__ ((deprecated))
106void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties);112void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties);
107113
108/**114/**
@@ -146,13 +152,14 @@
146/**152/**
147 * Query the display153 * Query the display
148 *154 *
149 * \deprecated Use mir_connection_create_display_configuration() instead.155 * \deprecated See mir_connection_create_display_configuration()
150 *156 *
151 * \warning return value must be destroyed via mir_display_config_destroy()157 * \warning return value must be destroyed via mir_display_config_destroy()
152 * \warning may return null if connection is invalid158 * \warning may return null if connection is invalid
153 * \param [in] connection The connection159 * \param [in] connection The connection
154 * \return structure that describes the display configuration160 * \return structure that describes the display configuration
155 */161 */
162__attribute__ ((deprecated))
156MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection);163MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection);
157164
158/**165/**
@@ -189,6 +196,8 @@
189/**196/**
190 * Apply the display configuration197 * Apply the display configuration
191 *198 *
199 * \deprecated Replace with mir_connection_apply_display_configuration(...)
200 *
192 * The display configuration is applied to this connection only (per-connection201 * The display configuration is applied to this connection only (per-connection
193 * configuration) and is invalidated when a hardware change occurs. Clients should202 * configuration) and is invalidated when a hardware change occurs. Clients should
194 * register a callback with mir_connection_set_display_config_change_callback()203 * register a callback with mir_connection_set_display_config_change_callback()
@@ -199,11 +208,14 @@
199 * \param [in] display_configuration The display_configuration to apply208 * \param [in] display_configuration The display_configuration to apply
200 * \return A handle that can be passed to mir_wait_for209 * \return A handle that can be passed to mir_wait_for
201 */210 */
211__attribute__ ((deprecated))
202MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration);212MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration);
203213
204/**214/**
205 * Set the base display configuration215 * Set the base display configuration
206 *216 *
217 * \deprecated Use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration
218 *
207 * The base display configuration is the configuration the server applies when219 * The base display configuration is the configuration the server applies when
208 * there is no active per-connection configuration.220 * there is no active per-connection configuration.
209 *221 *
@@ -222,6 +234,7 @@
222 * \param [in] display_configuration The display_configuration to set as base234 * \param [in] display_configuration The display_configuration to set as base
223 * \return A handle that can be passed to mir_wait_for235 * \return A handle that can be passed to mir_wait_for
224 */236 */
237__attribute__ ((deprecated))
225MirWaitHandle* mir_connection_set_base_display_config(238MirWaitHandle* mir_connection_set_base_display_config(
226 MirConnection* connection,239 MirConnection* connection,
227 MirDisplayConfiguration const* display_configuration);240 MirDisplayConfiguration const* display_configuration);
@@ -298,6 +311,9 @@
298311
299/**312/**
300 * Get a display type that can be used for OpenGL ES 2.0 acceleration.313 * Get a display type that can be used for OpenGL ES 2.0 acceleration.
314 *
315 * \deprecated No replacement. Use MirConnection * directly with EGL
316 *
301 * \param [in] connection The connection317 * \param [in] connection The connection
302 * \return An EGLNativeDisplayType that the client can use318 * \return An EGLNativeDisplayType that the client can use
303 */319 */
@@ -306,11 +322,15 @@
306/**322/**
307 * Get the exact MirPixelFormat to use in creating a surface for a chosen323 * Get the exact MirPixelFormat to use in creating a surface for a chosen
308 * EGLConfig.324 * EGLConfig.
325 *
326 * \deprecated No replacement. Use EGL configs directly.
327 *
309 * \param [in] connection The connection328 * \param [in] connection The connection
310 * \param [in] egldisplay The EGLDisplay for the given config329 * \param [in] egldisplay The EGLDisplay for the given config
311 * \param [in] eglconfig The EGLConfig you have chosen to use330 * \param [in] eglconfig The EGLConfig you have chosen to use
312 * \return The MirPixelFormat to use in surface creation331 * \return The MirPixelFormat to use in surface creation
313 */332 */
333__attribute__ ((deprecated))
314MirPixelFormat mir_connection_get_egl_pixel_format(334MirPixelFormat mir_connection_get_egl_pixel_format(
315 MirConnection *connection, void *egldisplay, void *eglconfig);335 MirConnection *connection, void *egldisplay, void *eglconfig);
316336
@@ -336,6 +356,8 @@
336/**356/**
337 * Perform a platform specific operation.357 * Perform a platform specific operation.
338 *358 *
359 * \deprecated Use the platform extensions API instead
360 *
339 * The MirPlatformMessage used for the request needs to remain valid361 * The MirPlatformMessage used for the request needs to remain valid
340 * until this operation finishes.362 * until this operation finishes.
341 *363 *
@@ -345,6 +367,7 @@
345 * \param [in,out] context User data passed to the callback function367 * \param [in,out] context User data passed to the callback function
346 * \return A handle that can be passed to mir_wait_for368 * \return A handle that can be passed to mir_wait_for
347 */369 */
370__attribute__ ((deprecated))
348MirWaitHandle* mir_connection_platform_operation(371MirWaitHandle* mir_connection_platform_operation(
349 MirConnection* connection,372 MirConnection* connection,
350 MirPlatformMessage const* request,373 MirPlatformMessage const* request,
351374
=== modified file 'include/client/mir_toolkit/mir_cursor_configuration.h'
--- include/client/mir_toolkit/mir_cursor_configuration.h 2016-09-08 02:58:56 +0000
+++ include/client/mir_toolkit/mir_cursor_configuration.h 2016-10-28 13:38:48 +0000
@@ -57,6 +57,9 @@
57 * Returns a new cursor configuration tied to a given buffer stream.57 * Returns a new cursor configuration tied to a given buffer stream.
58 * If the configuration is successfully applied buffers from the stream will be used 58 * If the configuration is successfully applied buffers from the stream will be used
59 * to fill the system cursor.59 * to fill the system cursor.
60 *
61 * \note Replace MirBufferStream with MirRenderSurface
62 *
60 * \param [in] stream The buffer stream63 * \param [in] stream The buffer stream
61 * \param [in] hotspot_x The x-coordinate to use as the cursor's hotspot.64 * \param [in] hotspot_x The x-coordinate to use as the cursor's hotspot.
62 * \param [in] hotspot_y The y-coordinate to use as the cursor's hotspot.65 * \param [in] hotspot_y The y-coordinate to use as the cursor's hotspot.
6366
=== modified file 'include/client/mir_toolkit/mir_display_configuration.h'
--- include/client/mir_toolkit/mir_display_configuration.h 2016-10-20 15:07:39 +0000
+++ include/client/mir_toolkit/mir_display_configuration.h 2016-10-28 13:38:48 +0000
@@ -50,6 +50,8 @@
50 * Get the maximum possible number of simultaneously active outputs this system50 * Get the maximum possible number of simultaneously active outputs this system
51 * supports.51 * supports.
52 *52 *
53 * No replacement. API is not useful.
54 *
53 * \note There may be restrictions on the configuration required to achieve this55 * \note There may be restrictions on the configuration required to achieve this
54 * many active outputs. Typically the achievable number of simultaneously active56 * many active outputs. Typically the achievable number of simultaneously active
55 * outputs is lower than this number.57 * outputs is lower than this number.
@@ -58,6 +60,7 @@
58 * \returns The maximum number of simultaneously active outputs60 * \returns The maximum number of simultaneously active outputs
59 * supportable at this time.61 * supportable at this time.
60 */62 */
63__attribute__ ((deprecated))
61int mir_display_config_get_max_simultaneous_outputs(64int mir_display_config_get_max_simultaneous_outputs(
62 MirDisplayConfig const* config);65 MirDisplayConfig const* config);
6366
@@ -263,9 +266,12 @@
263/**266/**
264 * Get the textual name of an output type.267 * Get the textual name of an output type.
265 *268 *
269 * \deprecated See mir_output_type_name
270 *
266 * \param [in] type The MirDisplayOutputType to describe.271 * \param [in] type The MirDisplayOutputType to describe.
267 * \returns The name of the output type.272 * \returns The name of the output type.
268 */273 */
274__attribute__ ((deprecated))
269char const* mir_display_output_type_name(MirDisplayOutputType type);275char const* mir_display_output_type_name(MirDisplayOutputType type);
270276
271/**277/**
272278
=== modified file 'include/client/mir_toolkit/mir_platform_message.h'
--- include/client/mir_toolkit/mir_platform_message.h 2014-12-10 11:02:04 +0000
+++ include/client/mir_toolkit/mir_platform_message.h 2016-10-28 13:38:48 +0000
@@ -48,16 +48,22 @@
48 * Each call to mir_platform_message_create() should be matched by48 * Each call to mir_platform_message_create() should be matched by
49 * a call to mir_platform_message_release() to avoid memory leaks.49 * a call to mir_platform_message_release() to avoid memory leaks.
50 *50 *
51 * \deprecated Use platform extensions API
52 *
51 * \param [in] opcode The platform message opcode53 * \param [in] opcode The platform message opcode
52 * \return The created MirPlatformMessage54 * \return The created MirPlatformMessage
53 */55 */
56__attribute__ ((deprecated))
54MirPlatformMessage* mir_platform_message_create(unsigned int opcode);57MirPlatformMessage* mir_platform_message_create(unsigned int opcode);
5558
56/**59/**
57 * Release a platform message.60 * Release a platform message.
58 *61 *
62 * \deprecated Use platform extensions API
63 *
59 * \param [in] message The MirPlatformMessage64 * \param [in] message The MirPlatformMessage
60 */65 */
66__attribute__ ((deprecated))
61void mir_platform_message_release(MirPlatformMessage const* message);67void mir_platform_message_release(MirPlatformMessage const* message);
6268
63/**69/**
@@ -65,10 +71,13 @@
65 *71 *
66 * The data is copied into the message.72 * The data is copied into the message.
67 *73 *
74 * \deprecated Use platform extensions API
75 *
68 * \param [in] message The MirPlatformMessage76 * \param [in] message The MirPlatformMessage
69 * \param [in] data Pointer to the data77 * \param [in] data Pointer to the data
70 * \param [in] data_size The size of the data in bytes78 * \param [in] data_size The size of the data in bytes
71 */79 */
80__attribute__ ((deprecated))
72void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size);81void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size);
7382
74/**83/**
@@ -82,18 +91,24 @@
82 * is released. The caller is responsible for closing the fds when the message91 * is released. The caller is responsible for closing the fds when the message
83 * doesn't need them anymore (see also mir_platform_message_get_fds()).92 * doesn't need them anymore (see also mir_platform_message_get_fds()).
84 *93 *
94 * \deprecated Use platform extensions API
95 *
85 * \param [in] message The MirPlatformMessage96 * \param [in] message The MirPlatformMessage
86 * \param [in] fds Pointer to the array of fds97 * \param [in] fds Pointer to the array of fds
87 * \param [in] num_fds The number of fds98 * \param [in] num_fds The number of fds
88 */99 */
100__attribute__ ((deprecated))
89void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds);101void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds);
90102
91/**103/**
92 * Get the opcode of a message.104 * Get the opcode of a message.
93 *105 *
106 * \deprecated Use platform extensions API
107 *
94 * \param [in] message The MirPlatformMessage108 * \param [in] message The MirPlatformMessage
95 * \return The opcode109 * \return The opcode
96 */110 */
111__attribute__ ((deprecated))
97unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message);112unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message);
98113
99/**114/**
@@ -103,9 +118,11 @@
103 * valid only as long as the message is valid and mir_platform_set_data() is118 * valid only as long as the message is valid and mir_platform_set_data() is
104 * not called. You must not change or free the returned data array.119 * not called. You must not change or free the returned data array.
105 *120 *
121 * \deprecated Use platform extensions API
106 * \param [in] message The MirPlatformMessage122 * \param [in] message The MirPlatformMessage
107 * \return The data123 * \return The data
108 */124 */
125__attribute__ ((deprecated))
109MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message);126MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message);
110127
111/**128/**
@@ -119,9 +136,11 @@
119 * message is released. Users are responsible for getting and closing the136 * message is released. Users are responsible for getting and closing the
120 * fds to avoid leaks.137 * fds to avoid leaks.
121 *138 *
139 * \deprecated Use platform extensions API
122 * \param [in] message The MirPlatformMessage140 * \param [in] message The MirPlatformMessage
123 * \return The fds141 * \return The fds
124 */142 */
143__attribute__ ((deprecated))
125MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message);144MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message);
126145
127#ifdef __cplusplus146#ifdef __cplusplus
128147
=== modified file 'include/client/mir_toolkit/mir_screencast.h'
--- include/client/mir_toolkit/mir_screencast.h 2016-07-18 07:38:38 +0000
+++ include/client/mir_toolkit/mir_screencast.h 2016-10-28 13:38:48 +0000
@@ -89,10 +89,13 @@
89/**89/**
90 * Set the requested number of buffers to use.90 * Set the requested number of buffers to use.
91 *91 *
92 * \deprecated See mir_screencast_capture_to_buffer
93 *
92 * \param [in] spec Specification to mutate94 * \param [in] spec Specification to mutate
93 * \param [in] nbuffers The number of buffers to allocate for screencasting95 * \param [in] nbuffers The number of buffers to allocate for screencasting
94 *96 *
95 */97 */
98__attribute__ ((deprecated))
96void mir_screencast_spec_set_number_of_buffers(MirScreencastSpec* spec, unsigned int nbuffers);99void mir_screencast_spec_set_number_of_buffers(MirScreencastSpec* spec, unsigned int nbuffers);
97100
98/**101/**
@@ -135,11 +138,14 @@
135 *138 *
136 * A screencast allows clients to read the contents of the screen.139 * A screencast allows clients to read the contents of the screen.
137 *140 *
141 * \deprecated See mir_screencast_create_sync
142 *
138 * \warning This request may be denied.143 * \warning This request may be denied.
139 * \param [in] connection The connection144 * \param [in] connection The connection
140 * \param [in] parameters The screencast parameters145 * \param [in] parameters The screencast parameters
141 * \return The resulting screencast146 * \return The resulting screencast
142 */147 */
148__attribute__ ((deprecated))
143MirScreencast* mir_connection_create_screencast_sync(149MirScreencast* mir_connection_create_screencast_sync(
144 MirConnection* connection,150 MirConnection* connection,
145 MirScreencastParameters* parameters);151 MirScreencastParameters* parameters);
@@ -155,8 +161,11 @@
155 * Retrieve the MirBufferStream associated with a screencast 161 * Retrieve the MirBufferStream associated with a screencast
156 * (to advance buffers, obtain EGLNativeWindowType, etc...)162 * (to advance buffers, obtain EGLNativeWindowType, etc...)
157 * 163 *
164 * \deprecated See mir_screencast_capture_to_buffer
165 *
158 * \param[in] screencast The screencast166 * \param[in] screencast The screencast
159 */167 */
168__attribute__ ((deprecated))
160MirBufferStream* mir_screencast_get_buffer_stream(MirScreencast* screencast);169MirBufferStream* mir_screencast_get_buffer_stream(MirScreencast* screencast);
161170
162#ifdef __cplusplus171#ifdef __cplusplus
163172
=== modified file 'include/client/mir_toolkit/mir_surface.h'
--- include/client/mir_toolkit/mir_surface.h 2016-10-12 06:03:15 +0000
+++ include/client/mir_toolkit/mir_surface.h 2016-10-28 13:38:48 +0000
@@ -232,6 +232,7 @@
232/**232/**
233 * Create a surface from a given specification233 * Create a surface from a given specification
234 *234 *
235 * \note There is no implicit buffer stream creation. See mir_xxx to attach content.
235 *236 *
236 * \param [in] requested_specification Specification of the attributes for the created surface237 * \param [in] requested_specification Specification of the attributes for the created surface
237 * \param [in] callback Callback function to be invoked when creation is complete238 * \param [in] callback Callback function to be invoked when creation is complete
@@ -411,6 +412,9 @@
411412
412/**413/**
413 * Set the requested pixel format.414 * Set the requested pixel format.
415 *
416 * \deprecated No replacement. This property is now part of the backing content
417 *
414 * \param [in] spec Specification to mutate418 * \param [in] spec Specification to mutate
415 * \param [in] format Requested pixel format419 * \param [in] format Requested pixel format
416 *420 *
@@ -418,10 +422,14 @@
418 * If the server is unable to create a surface with this pixel format at422 * If the server is unable to create a surface with this pixel format at
419 * the point mir_surface_create() is called it will instead return an invalid surface.423 * the point mir_surface_create() is called it will instead return an invalid surface.
420 */424 */
425__attribute__ ((deprecated))
421void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format);426void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format);
422427
423/**428/**
424 * Set the requested buffer usage.429 * Set the requested buffer usage.
430 *
431 * \deprecated No replacement. This property is now part of the backing content
432 *
425 * \param [in] spec Specification to mutate433 * \param [in] spec Specification to mutate
426 * \param [in] usage Requested buffer usage434 * \param [in] usage Requested buffer usage
427 *435 *
@@ -429,13 +437,15 @@
429 * If the server is unable to create a surface with this buffer usage at437 * If the server is unable to create a surface with this buffer usage at
430 * the point mir_surface_create() is called it will instead return an invalid surface.438 * the point mir_surface_create() is called it will instead return an invalid surface.
431 */439 */
440__attribute__ ((deprecated))
432void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage);441void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage);
433442
434/**443/**
435 * \param [in] spec Specification to mutate444 * \param [in] spec Specification to mutate
436 * \param [in] output_id ID of output to place surface on. From MirDisplayOutput.output_id445 * \param [in] output_id ID of output to place surface on. From MirDisplayOutput.output_id
437 *446 *
438 * \note If this call returns %true then a valid surface returned from mir_surface_create() is447 * \note Update comment below
448 * \note If this call returns %t then a valid surface returned from mir_surface_create() is
439 * guaranteed to be fullscreen on the specified output. An invalid surface is returned449 * guaranteed to be fullscreen on the specified output. An invalid surface is returned
440 * if the server unable to, or policy prevents it from, honouring this request.450 * if the server unable to, or policy prevents it from, honouring this request.
441 */451 */
@@ -501,6 +511,8 @@
501 * but is in the list will be associated with the surface.511 * but is in the list will be associated with the surface.
502 * Streams set a displacement from the top-left corner of the surface.512 * Streams set a displacement from the top-left corner of the surface.
503 * 513 *
514 * \deprecated Replaced by mir_surface_set_render_surfaces
515 *
504 * \warning disassociating streams from the surface will not release() them.516 * \warning disassociating streams from the surface will not release() them.
505 * \warning It is wiser to arrange the streams within the bounds of the517 * \warning It is wiser to arrange the streams within the bounds of the
506 * surface the spec is applied to. Shells can define their own518 * surface the spec is applied to. Shells can define their own
@@ -510,6 +522,7 @@
510 * \param [in] streams An array of non-null streams info.522 * \param [in] streams An array of non-null streams info.
511 * \param [in] num_streams The number of elements in the streams array.523 * \param [in] num_streams The number of elements in the streams array.
512 */524 */
525__attribute__ ((deprecated))
513void mir_surface_spec_set_streams(MirSurfaceSpec* spec,526void mir_surface_spec_set_streams(MirSurfaceSpec* spec,
514 MirBufferStreamInfo* streams,527 MirBufferStreamInfo* streams,
515 unsigned int num_streams);528 unsigned int num_streams);
@@ -600,6 +613,9 @@
600613
601/**614/**
602 * Set the event handler to be called when events arrive for a surface.615 * Set the event handler to be called when events arrive for a surface.
616 *
617 * \deprecated Use mir_surface_spec_set_event_handler instead.
618 *
603 * \warning event_handler could be called from another thread. You must do619 * \warning event_handler could be called from another thread. You must do
604 * any locking appropriate to protect your data accessed in the620 * any locking appropriate to protect your data accessed in the
605 * callback. There is also a chance that different events will be621 * callback. There is also a chance that different events will be
@@ -609,6 +625,7 @@
609 * \param [in] callback The callback function625 * \param [in] callback The callback function
610 * \param [in] context Additional argument to be passed to callback626 * \param [in] context Additional argument to be passed to callback
611 */627 */
628__attribute__ ((deprecated))
612void mir_surface_set_event_handler(MirSurface *surface,629void mir_surface_set_event_handler(MirSurface *surface,
613 mir_surface_event_callback callback,630 mir_surface_event_callback callback,
614 void* context);631 void* context);
@@ -626,6 +643,7 @@
626 * be removed, and this function will return NULL.643 * be removed, and this function will return NULL.
627 * \param[in] surface The surface644 * \param[in] surface The surface
628 */645 */
646__attribute__ ((deprecated))
629MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface);647MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface);
630648
631/**649/**
@@ -649,10 +667,14 @@
649667
650/**668/**
651 * Get a surface's parameters.669 * Get a surface's parameters.
670 *
671 * \deprecated MirSurfaceParameters is obsolete.
672 *
652 * \pre The surface is valid673 * \pre The surface is valid
653 * \param [in] surface The surface674 * \param [in] surface The surface
654 * \param [out] parameters Structure to be populated675 * \param [out] parameters Structure to be populated
655 */676 */
677__attribute__ ((deprecated))
656void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters);678void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters);
657679
658/**680/**
@@ -681,29 +703,44 @@
681703
682/**704/**
683 * Get the type (purpose) of a surface.705 * Get the type (purpose) of a surface.
706 *
707 * \deprecated ? Mostly a convenience function. Look for MirSurfaceType events instead?
708 *
684 * \param [in] surface The surface to query709 * \param [in] surface The surface to query
685 * \return The type of the surface710 * \return The type of the surface
686 */711 */
712__attribute__ ((deprecated))
687MirSurfaceType mir_surface_get_type(MirSurface *surface);713MirSurfaceType mir_surface_get_type(MirSurface *surface);
688714
689/**715/**
690 * Change the state of a surface.716 * Change the state of a surface.
717 *
718 * \deprecated Use mir_surface_apply_spec instead
719 *
691 * \param [in] surface The surface to operate on720 * \param [in] surface The surface to operate on
692 * \param [in] state The new state of the surface721 * \param [in] state The new state of the surface
693 * \return A wait handle that can be passed to mir_wait_for722 * \return A wait handle that can be passed to mir_wait_for
694 */723 */
724__attribute__ ((deprecated))
695MirWaitHandle* mir_surface_set_state(MirSurface *surface,725MirWaitHandle* mir_surface_set_state(MirSurface *surface,
696 MirSurfaceState state);726 MirSurfaceState state);
697727
698/**728/**
699 * Get the current state of a surface.729 * Get the current state of a surface.
730 *
731 * \deprecated ? Mostly a convenience function. Look for MirSurfaceState events instead?
732 *
700 * \param [in] surface The surface to query733 * \param [in] surface The surface to query
701 * \return The state of the surface734 * \return The state of the surface
702 */735 */
736__attribute__ ((deprecated))
703MirSurfaceState mir_surface_get_state(MirSurface *surface);737MirSurfaceState mir_surface_get_state(MirSurface *surface);
704738
705/**739/**
706 * Set the swapinterval for the default stream.740 * Set the swapinterval for the default stream.
741 *
742 * \deprecated No replacement. This is not a property of the surface anymore.
743 *
707 * \warning EGL users should use eglSwapInterval directly.744 * \warning EGL users should use eglSwapInterval directly.
708 * \warning Only swapinterval of 0 or 1 is supported.745 * \warning Only swapinterval of 0 or 1 is supported.
709 * \warning If the surface was created with, or modified to have a746 * \warning If the surface was created with, or modified to have a
@@ -716,27 +753,39 @@
716 * \return A wait handle that can be passed to mir_wait_for,753 * \return A wait handle that can be passed to mir_wait_for,
717 * or NULL if the interval could not be supported754 * or NULL if the interval could not be supported
718 */755 */
756__attribute__ ((deprecated))
719MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval);757MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval);
720758
721/**759/**
722 * Query the swapinterval that the surface is operating with.760 * Query the swapinterval that the surface is operating with.
723 * The default interval is 1.761 * The default interval is 1.
762 *
763 * \deprecated No replacement. This is not a property of the surface anymore.
764 *
724 * \param [in] surface The surface to operate on765 * \param [in] surface The surface to operate on
725 * \return The swapinterval value that the client is operating with.766 * \return The swapinterval value that the client is operating with.
726 * Returns -1 if surface is invalid, or if the default stream767 * Returns -1 if surface is invalid, or if the default stream
727 * was removed by use of mir_surface_spec_set_streams().768 * was removed by use of mir_surface_spec_set_streams().
728 */769 */
770__attribute__ ((deprecated))
729int mir_surface_get_swapinterval(MirSurface* surface);771int mir_surface_get_swapinterval(MirSurface* surface);
730772
731/**773/**
732 * Query the DPI value of the surface (dots per inch). This will vary depending774 * Query the DPI value of the surface (dots per inch). This will vary depending
733 * on the physical display configuration and where the surface is within it.775 * on the physical display configuration and where the surface is within it.
776 *
777 * \deprecated ? Mostly a convenience function - Use dpi events instead?
778 *
734 * \return The DPI of the surface, or zero if unknown.779 * \return The DPI of the surface, or zero if unknown.
735 */780 */
781__attribute__ ((deprecated))
736int mir_surface_get_dpi(MirSurface* surface);782int mir_surface_get_dpi(MirSurface* surface);
737 783
738/**784/**
739 * Query the focus state for a surface.785 * Query the focus state for a surface.
786 *
787 * \deprecated
788 *
740 * \param [in] surface The surface to operate on789 * \param [in] surface The surface to operate on
741 * \return The focus state of said surface790 * \return The focus state of said surface
742 */791 */
@@ -744,6 +793,9 @@
744793
745/**794/**
746 * Query the visibility state for a surface.795 * Query the visibility state for a surface.
796 *
797 * \deprecated
798 *
747 * \param [in] surface The surface to operate on799 * \param [in] surface The surface to operate on
748 * \return The visibility state of said surface800 * \return The visibility state of said surface
749 */801 */
@@ -752,6 +804,9 @@
752/**804/**
753 * Choose the cursor state for a surface: whether a cursor is shown, 805 * Choose the cursor state for a surface: whether a cursor is shown,
754 * and which cursor if so.806 * and which cursor if so.
807 *
808 * \deprecated Use mir_surface_apply_spec instead
809 *
755 * \param [in] surface The surface to operate on810 * \param [in] surface The surface to operate on
756 * \param [in] parameters The configuration parameters obtained811 * \param [in] parameters The configuration parameters obtained
757 * from mir_cursor* family of functions.812 * from mir_cursor* family of functions.
@@ -759,30 +814,43 @@
759 * or NULL if parameters is invalid.814 * or NULL if parameters is invalid.
760 *815 *
761 */816 */
817__attribute__ ((deprecated))
762MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters);818MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters);
763819
764/**820/**
765 * Get the orientation of a surface.821 * Get the orientation of a surface.
822 *
823 * \deprecated ? Mostly a convenience function - Use dpi events instead?
824 *
766 * \param [in] surface The surface to query825 * \param [in] surface The surface to query
767 * \return The orientation of the surface826 * \return The orientation of the surface
768 */827 */
828__attribute__ ((deprecated))
769MirOrientation mir_surface_get_orientation(MirSurface *surface);829MirOrientation mir_surface_get_orientation(MirSurface *surface);
770830
771/**831/**
772 * Request to set the preferred orientations of a surface.832 * Request to set the preferred orientations of a surface.
773 * The request may be rejected by the server; to check wait on the833 * The request may be rejected by the server; to check wait on the
774 * result and check the applied value using mir_surface_get_preferred_orientation834 * result and check the applied value using mir_surface_get_preferred_orientation
835 *
836 * \deprecated Use mir_surface_apply_spec instead
837 *
775 * \param [in] surface The surface to operate on838 * \param [in] surface The surface to operate on
776 * \param [in] orientation The preferred orientation modes839 * \param [in] orientation The preferred orientation modes
777 * \return A wait handle that can be passed to mir_wait_for840 * \return A wait handle that can be passed to mir_wait_for
778 */841 */
842__attribute__ ((deprecated))
779MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation);843MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation);
780844
781/**845/**
782 * Get the preferred orientation modes of a surface.846 * Get the preferred orientation modes of a surface.
847 *
848 * \deprecated No alternative as client should already know what the preferred orientation the surface is set to.
849 *
783 * \param [in] surface The surface to query850 * \param [in] surface The surface to query
784 * \return The preferred orientation modes851 * \return The preferred orientation modes
785 */852 */
853__attribute__ ((deprecated))
786MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface);854MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface);
787855
788/**856/**
789857
=== modified file 'include/core/mir_toolkit/common.h'
--- include/core/mir_toolkit/common.h 2016-10-20 15:05:56 +0000
+++ include/core/mir_toolkit/common.h 2016-10-28 13:38:48 +0000
@@ -349,6 +349,7 @@
349{349{
350 mir_shell_chrome_normal,350 mir_shell_chrome_normal,
351 mir_shell_chrome_low,351 mir_shell_chrome_low,
352 mir_shell_chrome_none
352} MirShellChrome;353} MirShellChrome;
353354
354/**355/**
355356
=== modified file 'playground/eglflash_render_surface.c'
--- playground/eglflash_render_surface.c 2016-10-12 21:49:18 +0000
+++ playground/eglflash_render_surface.c 2016-10-28 13:38:48 +0000
@@ -104,8 +104,11 @@
104 CHECK(ok, "Could not eglChooseConfig");104 CHECK(ok, "Could not eglChooseConfig");
105 CHECK(neglconfigs > 0, "No EGL config available");105 CHECK(neglconfigs > 0, "No EGL config available");
106106
107#pragma GCC diagnostic push
108#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
107 MirPixelFormat pixel_format =109 MirPixelFormat pixel_format =
108 mir_connection_get_egl_pixel_format(connection, egldisplay, eglconfig);110 mir_connection_get_egl_pixel_format(connection, egldisplay, eglconfig);
111#pragma GCC diagnostic pop
109112
110 printf("Mir chose pixel format %d.\n", pixel_format);113 printf("Mir chose pixel format %d.\n", pixel_format);
111114
@@ -114,7 +117,10 @@
114 CHECK(spec, "Can't create a surface spec");117 CHECK(spec, "Can't create a surface spec");
115118
116 mir_surface_spec_set_name(spec, appname);119 mir_surface_spec_set_name(spec, appname);
120#pragma GCC diagnostic push
121#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
117 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);122 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
123#pragma GCC diagnostic pop
118124
119 render_surface = mir_connection_create_render_surface(connection);125 render_surface = mir_connection_create_render_surface(connection);
120 CHECK(mir_render_surface_is_valid(render_surface), "could not create render surface");126 CHECK(mir_render_surface_is_valid(render_surface), "could not create render surface");
121127
=== modified file 'playground/render_surface.cpp'
--- playground/render_surface.cpp 2016-10-12 21:49:18 +0000
+++ playground/render_surface.cpp 2016-10-28 13:38:48 +0000
@@ -206,7 +206,10 @@
206 pixel_format);206 pixel_format);
207207
208 mir_surface_spec_set_name(spec, "Stream");208 mir_surface_spec_set_name(spec, "Stream");
209#pragma GCC diagnostic push
210#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
209 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);211 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
212#pragma GCC diagnostic pop
210213
211 auto buffer_stream =214 auto buffer_stream =
212 mir_render_surface_create_buffer_stream_sync(render_surface,215 mir_render_surface_create_buffer_stream_sync(render_surface,
213216
=== modified file 'src/client/mir_buffer_stream_api.cpp'
--- src/client/mir_buffer_stream_api.cpp 2016-10-13 16:32:59 +0000
+++ src/client/mir_buffer_stream_api.cpp 2016-10-28 13:38:48 +0000
@@ -72,8 +72,11 @@
72try72try
73{73{
74 MirBufferStream *stream = nullptr;74 MirBufferStream *stream = nullptr;
75#pragma GCC diagnostic push
76#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
75 mir_connection_create_buffer_stream(connection, width, height, format, buffer_usage,77 mir_connection_create_buffer_stream(connection, width, height, format, buffer_usage,
76 reinterpret_cast<mir_buffer_stream_callback>(assign_result), &stream)->wait_for_all();78 reinterpret_cast<mir_buffer_stream_callback>(assign_result), &stream)->wait_for_all();
79#pragma GCC diagnostic push
77 return stream;80 return stream;
78}81}
79catch (std::exception const& ex)82catch (std::exception const& ex)
@@ -148,7 +151,7 @@
148 nullptr));151 nullptr));
149}152}
150153
151void mir_buffer_stream_get_graphics_region(154bool mir_buffer_stream_get_graphics_region(
152 MirBufferStream *buffer_stream,155 MirBufferStream *buffer_stream,
153 MirGraphicsRegion *region_out)156 MirGraphicsRegion *region_out)
154try157try
@@ -161,10 +164,13 @@
161 region_out->stride = secured_region->stride.as_uint32_t();164 region_out->stride = secured_region->stride.as_uint32_t();
162 region_out->pixel_format = secured_region->format;165 region_out->pixel_format = secured_region->format;
163 region_out->vaddr = secured_region->vaddr.get();166 region_out->vaddr = secured_region->vaddr.get();
167
168 return true;
164}169}
165catch (std::exception const& ex)170catch (std::exception const& ex)
166{171{
167 MIR_LOG_UNCAUGHT_EXCEPTION(ex);172 MIR_LOG_UNCAUGHT_EXCEPTION(ex);
173 return false;
168}174}
169175
170MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream* buffer_stream)176MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream* buffer_stream)
171177
=== modified file 'src/client/mir_connection.cpp'
--- src/client/mir_connection.cpp 2016-10-21 09:20:55 +0000
+++ src/client/mir_connection.cpp 2016-10-28 13:38:48 +0000
@@ -643,10 +643,15 @@
643void MirConnection::done_platform_operation(643void MirConnection::done_platform_operation(
644 mir_platform_operation_callback callback, void* context)644 mir_platform_operation_callback callback, void* context)
645{645{
646#pragma GCC diagnostic push
647#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
646 auto reply = mir_platform_message_create(platform_operation_reply->opcode());648 auto reply = mir_platform_message_create(platform_operation_reply->opcode());
649#pragma GCC diagnostic pop
647650
648 set_error_message(platform_operation_reply->error());651 set_error_message(platform_operation_reply->error());
649652
653#pragma GCC diagnostic push
654#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
650 mir_platform_message_set_data(655 mir_platform_message_set_data(
651 reply,656 reply,
652 platform_operation_reply->data().data(),657 platform_operation_reply->data().data(),
@@ -656,6 +661,7 @@
656 reply,661 reply,
657 platform_operation_reply->fd().data(),662 platform_operation_reply->fd().data(),
658 platform_operation_reply->fd().size());663 platform_operation_reply->fd().size());
664#pragma GCC diagnostic pop
659665
660 callback(this, reply, context);666 callback(this, reply, context);
661667
@@ -676,9 +682,12 @@
676682
677 mp::PlatformOperationMessage protobuf_request;683 mp::PlatformOperationMessage protobuf_request;
678684
685#pragma GCC diagnostic push
686#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
679 protobuf_request.set_opcode(mir_platform_message_get_opcode(request));687 protobuf_request.set_opcode(mir_platform_message_get_opcode(request));
680 auto const request_data = mir_platform_message_get_data(request);688 auto const request_data = mir_platform_message_get_data(request);
681 auto const request_fds = mir_platform_message_get_fds(request);689 auto const request_fds = mir_platform_message_get_fds(request);
690#pragma GCC diagnostic pop
682691
683 protobuf_request.set_data(request_data.data, request_data.size);692 protobuf_request.set_data(request_data.data, request_data.size);
684 for (size_t i = 0; i != request_fds.num_fds; ++i)693 for (size_t i = 0; i != request_fds.num_fds; ++i)
685694
=== modified file 'src/platforms/android/utils/test_android_hardware_sanity.cpp'
--- src/platforms/android/utils/test_android_hardware_sanity.cpp 2016-10-12 06:56:27 +0000
+++ src/platforms/android/utils/test_android_hardware_sanity.cpp 2016-10-28 13:38:48 +0000
@@ -117,15 +117,21 @@
117117
118 auto const spec = mir_connection_create_spec_for_normal_surface(118 auto const spec = mir_connection_create_spec_for_normal_surface(
119 connection, test_width, test_height, mir_pixel_format_abgr_8888);119 connection, test_width, test_height, mir_pixel_format_abgr_8888);
120#pragma GCC diagnostic push
121#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
120 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);122 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
123#pragma GCC diagnostic pop
121 auto const surface = mir_surface_create_sync(spec);124 auto const surface = mir_surface_create_sync(spec);
122 mir_surface_spec_release(spec);125 mir_surface_spec_release(spec);
123126
124 EXPECT_THAT(surface, IsValid());127 EXPECT_THAT(surface, IsValid());
125 MirGraphicsRegion graphics_region;128 MirGraphicsRegion graphics_region;
129#pragma GCC diagnostic push
130#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
126 mir_buffer_stream_get_graphics_region(mir_surface_get_buffer_stream(surface), &graphics_region);131 mir_buffer_stream_get_graphics_region(mir_surface_get_buffer_stream(surface), &graphics_region);
127 draw_pattern.draw(graphics_region);132 draw_pattern.draw(graphics_region);
128 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));133 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
134#pragma GCC diagnostic pop
129135
130 auto scene = runner->config.the_scene();136 auto scene = runner->config.the_scene();
131 auto seq = scene->scene_elements_for(this);137 auto seq = scene->scene_elements_for(this);
@@ -178,8 +184,11 @@
178184
179 EXPECT_THAT(mir_surface, IsValid());185 EXPECT_THAT(mir_surface, IsValid());
180186
187#pragma GCC diagnostic push
188#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
181 auto native_window = static_cast<EGLNativeWindowType>(189 auto native_window = static_cast<EGLNativeWindowType>(
182 mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(mir_surface)));190 mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(mir_surface)));
191#pragma GCC diagnostic pop
183192
184 egl_surface = eglCreateWindowSurface(egl_display, egl_config, native_window, NULL);193 egl_surface = eglCreateWindowSurface(egl_display, egl_config, native_window, NULL);
185 context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, context_attribs);194 context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, context_attribs);
186195
=== modified file 'src/platforms/mesa/client/client_platform.cpp'
--- src/platforms/mesa/client/client_platform.cpp 2016-10-12 06:03:15 +0000
+++ src/platforms/mesa/client/client_platform.cpp 2016-10-28 13:38:48 +0000
@@ -121,8 +121,11 @@
121MirPlatformMessage* mclm::ClientPlatform::platform_operation(121MirPlatformMessage* mclm::ClientPlatform::platform_operation(
122 MirPlatformMessage const* msg)122 MirPlatformMessage const* msg)
123{123{
124#pragma GCC diagnostic push
125#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
124 auto const op = mir_platform_message_get_opcode(msg);126 auto const op = mir_platform_message_get_opcode(msg);
125 auto const msg_data = mir_platform_message_get_data(msg);127 auto const msg_data = mir_platform_message_get_data(msg);
128#pragma GCC diagnostic pop
126129
127 if (op == MirMesaPlatformOperation::set_gbm_device &&130 if (op == MirMesaPlatformOperation::set_gbm_device &&
128 msg_data.size == sizeof(MirMesaSetGBMDeviceRequest))131 msg_data.size == sizeof(MirMesaSetGBMDeviceRequest))
@@ -134,8 +137,11 @@
134137
135 static int const success{0};138 static int const success{0};
136 MirMesaSetGBMDeviceResponse const response{success};139 MirMesaSetGBMDeviceResponse const response{success};
140#pragma GCC diagnostic push
141#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
137 auto const response_msg = mir_platform_message_create(op);142 auto const response_msg = mir_platform_message_create(op);
138 mir_platform_message_set_data(response_msg, &response, sizeof(response));143 mir_platform_message_set_data(response_msg, &response, sizeof(response));
144#pragma GCC diagnostic pop
139145
140 return response_msg;146 return response_msg;
141 }147 }
142148
=== modified file 'src/server/graphics/nested/mir_client_host_connection.cpp'
--- src/server/graphics/nested/mir_client_host_connection.cpp 2016-10-12 06:03:15 +0000
+++ src/server/graphics/nested/mir_client_host_connection.cpp 2016-10-28 13:38:48 +0000
@@ -128,13 +128,19 @@
128128
129 EGLNativeWindowType egl_native_window() override129 EGLNativeWindowType egl_native_window() override
130 {130 {
131#pragma GCC diagnostic push
132#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
131 return reinterpret_cast<EGLNativeWindowType>(133 return reinterpret_cast<EGLNativeWindowType>(
132 mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(mir_surface)));134 mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(mir_surface)));
135#pragma GCC diagnostic pop
133 }136 }
134137
135 void set_event_handler(mir_surface_event_callback cb, void* context) override138 void set_event_handler(mir_surface_event_callback cb, void* context) override
136 {139 {
140#pragma GCC diagnostic push
141#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
137 mir_surface_set_event_handler(mir_surface, cb, context);142 mir_surface_set_event_handler(mir_surface, cb, context);
143#pragma GCC diagnostic pop
138 }144 }
139145
140 void set_cursor_image(mg::CursorImage const& image)146 void set_cursor_image(mg::CursorImage const& image)
@@ -165,12 +171,15 @@
165171
166 if (new_cursor)172 if (new_cursor)
167 {173 {
174#pragma GCC diagnostic push
175#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
168 cursor = mir_connection_create_buffer_stream_sync(176 cursor = mir_connection_create_buffer_stream_sync(
169 mir_connection,177 mir_connection,
170 image_width,178 image_width,
171 image_height,179 image_height,
172 cursor_pixel_format,180 cursor_pixel_format,
173 mir_buffer_usage_software);181 mir_buffer_usage_software);
182#pragma GCC diagnostic pop
174183
175 mir_buffer_stream_get_graphics_region(cursor, &g);184 mir_buffer_stream_get_graphics_region(cursor, &g);
176 }185 }
@@ -186,7 +195,10 @@
186 auto conf = mir_cursor_configuration_from_buffer_stream(195 auto conf = mir_cursor_configuration_from_buffer_stream(
187 cursor, cursor_hotspot.dx.as_int(), cursor_hotspot.dy.as_int());196 cursor, cursor_hotspot.dx.as_int(), cursor_hotspot.dy.as_int());
188197
198#pragma GCC diagnostic push
199#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
189 mir_surface_configure_cursor(mir_surface, conf);200 mir_surface_configure_cursor(mir_surface, conf);
201#pragma GCC diagnostic pop
190 mir_cursor_configuration_destroy(conf);202 mir_cursor_configuration_destroy(conf);
191 }203 }
192 }204 }
@@ -196,7 +208,10 @@
196 if (cursor) { mir_buffer_stream_release_sync(cursor); cursor = nullptr; }208 if (cursor) { mir_buffer_stream_release_sync(cursor); cursor = nullptr; }
197209
198 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);210 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);
211#pragma GCC diagnostic push
212#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
199 mir_surface_configure_cursor(mir_surface, conf);213 mir_surface_configure_cursor(mir_surface, conf);
214#pragma GCC diagnostic pop
200 mir_cursor_configuration_destroy(conf);215 mir_cursor_configuration_destroy(conf);
201 }216 }
202217
@@ -210,6 +225,8 @@
210class MirClientHostStream : public mgn::HostStream225class MirClientHostStream : public mgn::HostStream
211{226{
212public:227public:
228#pragma GCC diagnostic push
229#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
213 MirClientHostStream(MirConnection* connection, mg::BufferProperties const& properties) :230 MirClientHostStream(MirConnection* connection, mg::BufferProperties const& properties) :
214 stream(mir_connection_create_buffer_stream_sync(connection,231 stream(mir_connection_create_buffer_stream_sync(connection,
215 properties.size.width.as_int(), properties.size.height.as_int(),232 properties.size.width.as_int(), properties.size.height.as_int(),
@@ -217,6 +234,7 @@
217 (properties.usage == mg::BufferUsage::hardware) ? mir_buffer_usage_hardware : mir_buffer_usage_software))234 (properties.usage == mg::BufferUsage::hardware) ? mir_buffer_usage_hardware : mir_buffer_usage_software))
218 {235 {
219 }236 }
237#pragma GCC diagnostic pop
220238
221 ~MirClientHostStream()239 ~MirClientHostStream()
222 {240 {
@@ -225,7 +243,10 @@
225243
226 EGLNativeWindowType egl_native_window() const override244 EGLNativeWindowType egl_native_window() const override
227 {245 {
246#pragma GCC diagnostic push
247#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
228 return reinterpret_cast<EGLNativeWindowType>(mir_buffer_stream_get_egl_native_window(stream));248 return reinterpret_cast<EGLNativeWindowType>(mir_buffer_stream_get_egl_native_window(stream));
249#pragma GCC diagnostic pop
229 }250 }
230251
231 MirBufferStream* handle() const override252 MirBufferStream* handle() const override
@@ -314,7 +335,10 @@
314std::vector<int> mgn::MirClientHostConnection::platform_fd_items()335std::vector<int> mgn::MirClientHostConnection::platform_fd_items()
315{336{
316 MirPlatformPackage pkg;337 MirPlatformPackage pkg;
338#pragma GCC diagnostic push
339#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
317 mir_connection_get_platform(mir_connection, &pkg);340 mir_connection_get_platform(mir_connection, &pkg);
341#pragma GCC diagnostic pop
318 return std::vector<int>(pkg.fd, pkg.fd + pkg.fd_items);342 return std::vector<int>(pkg.fd, pkg.fd + pkg.fd_items);
319}343}
320344
@@ -327,12 +351,15 @@
327auto mgn::MirClientHostConnection::create_display_config()351auto mgn::MirClientHostConnection::create_display_config()
328 -> std::shared_ptr<MirDisplayConfiguration>352 -> std::shared_ptr<MirDisplayConfiguration>
329{353{
354#pragma GCC diagnostic push
355#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
330 return std::shared_ptr<MirDisplayConfiguration>(356 return std::shared_ptr<MirDisplayConfiguration>(
331 mir_connection_create_display_config(mir_connection),357 mir_connection_create_display_config(mir_connection),
332 [] (MirDisplayConfiguration* c)358 [] (MirDisplayConfiguration* c)
333 {359 {
334 if (c) mir_display_config_destroy(c);360 if (c) mir_display_config_destroy(c);
335 });361 });
362#pragma GCC diagnostic pop
336}363}
337364
338void mgn::MirClientHostConnection::set_display_config_change_callback(365void mgn::MirClientHostConnection::set_display_config_change_callback(
@@ -347,7 +374,10 @@
347void mgn::MirClientHostConnection::apply_display_config(374void mgn::MirClientHostConnection::apply_display_config(
348 MirDisplayConfiguration& display_config)375 MirDisplayConfiguration& display_config)
349{376{
377#pragma GCC diagnostic push
378#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
350 mir_wait_for(mir_connection_apply_display_config(mir_connection, &display_config));379 mir_wait_for(mir_connection_apply_display_config(mir_connection, &display_config));
380#pragma GCC diagnostic pop
351}381}
352382
353std::shared_ptr<mgn::HostSurface> mgn::MirClientHostConnection::create_surface(383std::shared_ptr<mgn::HostSurface> mgn::MirClientHostConnection::create_surface(
@@ -369,10 +399,16 @@
369 mir_buffer_usage_hardware : mir_buffer_usage_software; 399 mir_buffer_usage_hardware : mir_buffer_usage_software;
370400
371 mir_surface_spec_set_name(spec.get(), name);401 mir_surface_spec_set_name(spec.get(), name);
402#pragma GCC diagnostic push
403#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
372 mir_surface_spec_set_buffer_usage(spec.get(), usage);404 mir_surface_spec_set_buffer_usage(spec.get(), usage);
405#pragma GCC diagnostic pop
373 mir_surface_spec_set_fullscreen_on_output(spec.get(), output_id);406 mir_surface_spec_set_fullscreen_on_output(spec.get(), output_id);
374 MirBufferStreamInfo info { stream->handle(), displacement.dx.as_int(), displacement.dy.as_int() };407 MirBufferStreamInfo info { stream->handle(), displacement.dx.as_int(), displacement.dy.as_int() };
408#pragma GCC diagnostic push
409#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
375 mir_surface_spec_set_streams(spec.get(), &info, 1);410 mir_surface_spec_set_streams(spec.get(), &info, 1);
411#pragma GCC diagnostic pop
376412
377 auto surf = std::shared_ptr<MirClientHostSurface>(413 auto surf = std::shared_ptr<MirClientHostSurface>(
378 new MirClientHostSurface(mir_connection, spec.get()),414 new MirClientHostSurface(mir_connection, spec.get()),
@@ -394,6 +430,8 @@
394mg::PlatformOperationMessage mgn::MirClientHostConnection::platform_operation(430mg::PlatformOperationMessage mgn::MirClientHostConnection::platform_operation(
395 unsigned int op, mg::PlatformOperationMessage const& request)431 unsigned int op, mg::PlatformOperationMessage const& request)
396{432{
433#pragma GCC diagnostic push
434#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
397 auto const msg = mir::raii::deleter_for(435 auto const msg = mir::raii::deleter_for(
398 mir_platform_message_create(op),436 mir_platform_message_create(op),
399 mir_platform_message_release);437 mir_platform_message_release);
@@ -413,6 +451,7 @@
413451
414 auto reply_data = mir_platform_message_get_data(reply.get());452 auto reply_data = mir_platform_message_get_data(reply.get());
415 auto reply_fds = mir_platform_message_get_fds(reply.get());453 auto reply_fds = mir_platform_message_get_fds(reply.get());
454#pragma GCC diagnostic pop
416455
417 return PlatformOperationMessage{456 return PlatformOperationMessage{
418 {static_cast<uint8_t const*>(reply_data.data),457 {static_cast<uint8_t const*>(reply_data.data),
@@ -445,7 +484,10 @@
445{484{
446 MirModuleProperties properties = { nullptr, 0, 0, 0, nullptr };485 MirModuleProperties properties = { nullptr, 0, 0, 0, nullptr };
447486
487#pragma GCC diagnostic push
488#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
448 mir_connection_get_graphics_module(mir_connection, &properties);489 mir_connection_get_graphics_module(mir_connection, &properties);
490#pragma GCC diagnostic pop
449491
450 if (properties.filename == nullptr)492 if (properties.filename == nullptr)
451 {493 {
452494
=== modified file 'src/utils/out.c'
--- src/utils/out.c 2016-10-12 06:03:15 +0000
+++ src/utils/out.c 2016-10-28 13:38:48 +0000
@@ -84,7 +84,11 @@
8484
85 printf("Connected to server: %s\n", server ? server : "<default>");85 printf("Connected to server: %s\n", server ? server : "<default>");
8686
87 // TODO Update to the new DisplayConfig API
88#pragma GCC diagnostic push
89#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
87 MirDisplayConfiguration *conf = mir_connection_create_display_config(conn);90 MirDisplayConfiguration *conf = mir_connection_create_display_config(conn);
91#pragma GCC diagnostic pop
88 if (conf == NULL)92 if (conf == NULL)
89 {93 {
90 fprintf(stderr, "Failed to get display configuration (!?)\n");94 fprintf(stderr, "Failed to get display configuration (!?)\n");
@@ -102,11 +106,14 @@
102 {106 {
103 const MirDisplayOutput *out = conf->outputs + i;107 const MirDisplayOutput *out = conf->outputs + i;
104108
109#pragma GCC diagnostic push
110#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
105 printf("Output %u: Card %u, %s, %s",111 printf("Output %u: Card %u, %s, %s",
106 out->output_id,112 out->output_id,
107 out->card_id,113 out->card_id,
108 mir_display_output_type_name(out->type),114 mir_display_output_type_name(out->type),
109 out->connected ? "connected" : "disconnected");115 out->connected ? "connected" : "disconnected");
116#pragma GCC diagnostic pop
110117
111 if (out->connected)118 if (out->connected)
112 {119 {
113120
=== modified file 'src/utils/ping.c'
--- src/utils/ping.c 2015-06-17 05:20:42 +0000
+++ src/utils/ping.c 2016-10-28 13:38:48 +0000
@@ -86,7 +86,10 @@
86 &valid_formats);86 &valid_formats);
8787
88 MirSurfaceSpec *spec = mir_connection_create_spec_for_normal_surface(conn, 1, 1, formats[0]);88 MirSurfaceSpec *spec = mir_connection_create_spec_for_normal_surface(conn, 1, 1, formats[0]);
89#pragma GCC diagnostic push
90#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
89 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);91 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
92#pragma GCC diagnostic pop
90 mir_surface_spec_set_name(spec, "ping");93 mir_surface_spec_set_name(spec, "ping");
9194
92 MirSurface *surf = mir_surface_create_sync(spec);95 MirSurface *surf = mir_surface_create_sync(spec);
@@ -116,7 +119,10 @@
116 long long start, duration;119 long long start, duration;
117120
118 start = now();121 start = now();
122#pragma GCC diagnostic push
123#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
119 mir_wait_for(mir_surface_set_preferred_orientation(surf, types[t]));124 mir_wait_for(mir_surface_set_preferred_orientation(surf, types[t]));
125#pragma GCC diagnostic pop
120 duration = now() - start;126 duration = now() - start;
121 t ^= 1;127 t ^= 1;
122128
123129
=== modified file 'src/utils/screencast.cpp'
--- src/utils/screencast.cpp 2015-07-16 07:03:19 +0000
+++ src/utils/screencast.cpp 2016-10-28 13:38:48 +0000
@@ -326,9 +326,12 @@
326 reinterpret_cast<EGLNativeDisplayType>(326 reinterpret_cast<EGLNativeDisplayType>(
327 mir_connection_get_egl_native_display(connection));327 mir_connection_get_egl_native_display(connection));
328328
329#pragma GCC diagnostic push
330#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
329 auto native_window =331 auto native_window =
330 reinterpret_cast<EGLNativeWindowType>(332 reinterpret_cast<EGLNativeWindowType>(
331 mir_buffer_stream_get_egl_native_window(buffer_stream));333 mir_buffer_stream_get_egl_native_window(buffer_stream));
334#pragma GCC diagnostic push
332335
333 egl_display = eglGetDisplay(native_display);336 egl_display = eglGetDisplay(native_display);
334337
@@ -515,9 +518,12 @@
515 throw std::runtime_error(std::string(msg));518 throw std::runtime_error(std::string(msg));
516 }519 }
517520
521#pragma GCC diagnostic push
522#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
518 auto const display_config = mir::raii::deleter_for(523 auto const display_config = mir::raii::deleter_for(
519 mir_connection_create_display_config(connection.get()),524 mir_connection_create_display_config(connection.get()),
520 &mir_display_config_destroy);525 &mir_display_config_destroy);
526#pragma GCC diagnostic push
521527
522 if (display_config == nullptr)528 if (display_config == nullptr)
523 throw std::runtime_error("Failed to get display configuration\n");529 throw std::runtime_error("Failed to get display configuration\n");
@@ -535,7 +541,10 @@
535 if (mir_screencast == nullptr)541 if (mir_screencast == nullptr)
536 throw std::runtime_error("Failed to create screencast");542 throw std::runtime_error("Failed to create screencast");
537543
544#pragma GCC diagnostic push
545#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
538 auto buffer_stream = mir_screencast_get_buffer_stream(mir_screencast.get());546 auto buffer_stream = mir_screencast_get_buffer_stream(mir_screencast.get());
547#pragma GCC diagnostic push
539 if (buffer_stream == nullptr)548 if (buffer_stream == nullptr)
540 throw std::runtime_error("Failed to obtain buffer stream from screencast");549 throw std::runtime_error("Failed to obtain buffer stream from screencast");
541550
542551
=== modified file 'src/utils/vanity.c'
--- src/utils/vanity.c 2016-10-21 07:53:23 +0000
+++ src/utils/vanity.c 2016-10-28 13:38:48 +0000
@@ -718,7 +718,10 @@
718 false718 false
719 };719 };
720 MirSurface* surface = mir_eglapp_native_surface();720 MirSurface* surface = mir_eglapp_native_surface();
721#pragma GCC diagnostic push
722#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
721 mir_surface_set_event_handler(surface, on_event, &state);723 mir_surface_set_event_handler(surface, on_event, &state);
724#pragma GCC diagnostic pop
722725
723 GLint tint = glGetUniformLocation(prog, "tint");726 GLint tint = glGetUniformLocation(prog, "tint");
724727
@@ -840,7 +843,10 @@
840 last_swap_time = swap_time;843 last_swap_time = swap_time;
841 }844 }
842845
846#pragma GCC diagnostic push
847#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
843 mir_surface_set_event_handler(surface, NULL, NULL);848 mir_surface_set_event_handler(surface, NULL, NULL);
849#pragma GCC diagnostic pop
844 mir_eglapp_cleanup();850 mir_eglapp_cleanup();
845851
846 pthread_join(capture_thread, NULL);852 pthread_join(capture_thread, NULL);
847853
=== modified file 'tests/acceptance-tests/test_buffer_stream_arrangement.cpp'
--- tests/acceptance-tests/test_buffer_stream_arrangement.cpp 2016-10-12 06:03:15 +0000
+++ tests/acceptance-tests/test_buffer_stream_arrangement.cpp 2016-10-28 13:38:48 +0000
@@ -66,6 +66,8 @@
6666
67struct Stream67struct Stream
68{68{
69#pragma GCC diagnostic push
70#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
69 Stream(MirConnection* connection, geom::Rectangle rect) :71 Stream(MirConnection* connection, geom::Rectangle rect) :
70 stream(mir_connection_create_buffer_stream_sync(72 stream(mir_connection_create_buffer_stream_sync(
71 connection,73 connection,
@@ -79,6 +81,7 @@
79 {81 {
80 mir_buffer_stream_swap_buffers_sync(stream);82 mir_buffer_stream_swap_buffers_sync(stream);
81 }83 }
84#pragma GCC diagnostic pop
8285
83 ~Stream()86 ~Stream()
84 {87 {
@@ -237,8 +240,11 @@
237 auto const spec = mir_connection_create_spec_for_normal_surface(240 auto const spec = mir_connection_create_spec_for_normal_surface(
238 connection, surface_size.width.as_int(), surface_size.height.as_int(), mir_pixel_format_abgr_8888);241 connection, surface_size.width.as_int(), surface_size.height.as_int(), mir_pixel_format_abgr_8888);
239 mir_surface_spec_set_name(spec, "BufferStreamArrangement.can_be_specified_when_creating_surface");242 mir_surface_spec_set_name(spec, "BufferStreamArrangement.can_be_specified_when_creating_surface");
243#pragma GCC diagnostic push
244#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
240 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);245 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
241 mir_surface_spec_set_streams(spec, infos.data(), infos.size());246 mir_surface_spec_set_streams(spec, infos.data(), infos.size());
247#pragma GCC diagnostic pop
242248
243 surface = mir_surface_create_sync(spec);249 surface = mir_surface_create_sync(spec);
244 mir_surface_spec_release(spec);250 mir_surface_spec_release(spec);
@@ -259,7 +265,10 @@
259 }265 }
260266
261 auto change_spec = mir_connection_create_spec_for_changes(connection);267 auto change_spec = mir_connection_create_spec_for_changes(connection);
268#pragma GCC diagnostic push
269#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
262 mir_surface_spec_set_streams(change_spec, infos.data(), infos.size());270 mir_surface_spec_set_streams(change_spec, infos.data(), infos.size());
271#pragma GCC diagnostic pop
263 mir_surface_apply_spec(surface, change_spec);272 mir_surface_apply_spec(surface, change_spec);
264 mir_surface_spec_release(change_spec);273 mir_surface_spec_release(change_spec);
265274
@@ -294,7 +303,10 @@
294303
295 auto spec = mir_connection_create_spec_for_normal_surface(304 auto spec = mir_connection_create_spec_for_normal_surface(
296 connection, 100, 100, mir_pixel_format_abgr_8888);305 connection, 100, 100, mir_pixel_format_abgr_8888);
306#pragma GCC diagnostic push
307#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
297 mir_surface_spec_set_streams(spec, infos.data(), infos.size());308 mir_surface_spec_set_streams(spec, infos.data(), infos.size());
309#pragma GCC diagnostic pop
298 auto surface = mir_surface_create_sync(spec);310 auto surface = mir_surface_create_sync(spec);
299 mir_surface_spec_release(spec);311 mir_surface_spec_release(spec);
300 EXPECT_TRUE(mir_surface_is_valid(surface));312 EXPECT_TRUE(mir_surface_is_valid(surface));
@@ -304,7 +316,10 @@
304TEST_F(BufferStreamArrangement, when_non_default_streams_are_set_surface_get_stream_gives_null)316TEST_F(BufferStreamArrangement, when_non_default_streams_are_set_surface_get_stream_gives_null)
305{317{
306 using namespace testing;318 using namespace testing;
319#pragma GCC diagnostic push
320#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
307 EXPECT_TRUE(mir_buffer_stream_is_valid(mir_surface_get_buffer_stream(surface)));321 EXPECT_TRUE(mir_buffer_stream_is_valid(mir_surface_get_buffer_stream(surface)));
322#pragma GCC diagnostic pop
308323
309 std::vector<MirBufferStreamInfo> infos(streams.size());324 std::vector<MirBufferStreamInfo> infos(streams.size());
310 auto i = 0u;325 auto i = 0u;
@@ -316,9 +331,12 @@
316 stream->position().y.as_int()};331 stream->position().y.as_int()};
317 }332 }
318 auto change_spec = mir_connection_create_spec_for_changes(connection);333 auto change_spec = mir_connection_create_spec_for_changes(connection);
334#pragma GCC diagnostic push
335#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
319 mir_surface_spec_set_streams(change_spec, infos.data(), infos.size());336 mir_surface_spec_set_streams(change_spec, infos.data(), infos.size());
320 mir_surface_apply_spec(surface, change_spec);337 mir_surface_apply_spec(surface, change_spec);
321 mir_surface_spec_release(change_spec);338 mir_surface_spec_release(change_spec);
322339
323 EXPECT_THAT(mir_surface_get_buffer_stream(surface), Eq(nullptr));340 EXPECT_THAT(mir_surface_get_buffer_stream(surface), Eq(nullptr));
341#pragma GCC diagnostic pop
324}342}
325343
=== modified file 'tests/acceptance-tests/test_client_cookie.cpp'
--- tests/acceptance-tests/test_client_cookie.cpp 2016-07-18 07:38:38 +0000
+++ tests/acceptance-tests/test_client_cookie.cpp 2016-10-28 13:38:48 +0000
@@ -65,7 +65,10 @@
65 surface = mir_surface_create_sync(spec);65 surface = mir_surface_create_sync(spec);
66 mir_surface_spec_release(spec);66 mir_surface_spec_release(spec);
6767
68#pragma GCC diagnostic push
69#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
68 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));70 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
71#pragma GCC diagnostic pop
6972
70 ready_to_accept_events.wait_for(max_wait);73 ready_to_accept_events.wait_for(max_wait);
71 if (!ready_to_accept_events.raised())74 if (!ready_to_accept_events.raised())
7275
=== modified file 'tests/acceptance-tests/test_client_focus_notification.cpp'
--- tests/acceptance-tests/test_client_focus_notification.cpp 2016-07-18 07:38:38 +0000
+++ tests/acceptance-tests/test_client_focus_notification.cpp 2016-10-28 13:38:48 +0000
@@ -46,7 +46,10 @@
46 surface = mir_surface_create_sync(spec);46 surface = mir_surface_create_sync(spec);
47 mir_surface_spec_release(spec);47 mir_surface_spec_release(spec);
4848
49#pragma GCC diagnostic push
50#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
49 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));51 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
52#pragma GCC diagnostic pop
50 }53 }
5154
52 ~FocusSurface()55 ~FocusSurface()
5356
=== modified file 'tests/acceptance-tests/test_client_input.cpp'
--- tests/acceptance-tests/test_client_input.cpp 2016-10-12 06:03:15 +0000
+++ tests/acceptance-tests/test_client_input.cpp 2016-10-28 13:38:48 +0000
@@ -97,10 +97,12 @@
97 if (!mir_surface_is_valid(surface))97 if (!mir_surface_is_valid(surface))
98 BOOST_THROW_EXCEPTION(std::runtime_error{std::string{"Failed creating a surface: "}+98 BOOST_THROW_EXCEPTION(std::runtime_error{std::string{"Failed creating a surface: "}+
99 mir_surface_get_error_message(surface)});99 mir_surface_get_error_message(surface)});
100100#pragma GCC diagnostic push
101#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
101 mir_surface_set_event_handler(surface, handle_event, this);102 mir_surface_set_event_handler(surface, handle_event, this);
102 mir_buffer_stream_swap_buffers_sync(103 mir_buffer_stream_swap_buffers_sync(
103 mir_surface_get_buffer_stream(surface));104 mir_surface_get_buffer_stream(surface));
105#pragma GCC diagnostic pop
104106
105 ready_to_accept_events.wait_for(4s);107 ready_to_accept_events.wait_for(4s);
106 if (!ready_to_accept_events.raised())108 if (!ready_to_accept_events.raised())
@@ -144,7 +146,10 @@
144 // Remove the event handler to avoid handling spurious events unrelated146 // Remove the event handler to avoid handling spurious events unrelated
145 // to the tests (e.g. pointer leave events when the surface is destroyed),147 // to the tests (e.g. pointer leave events when the surface is destroyed),
146 // which can cause test expectations to fail.148 // which can cause test expectations to fail.
149#pragma GCC diagnostic push
150#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
147 mir_surface_set_event_handler(surface, null_event_handler, nullptr);151 mir_surface_set_event_handler(surface, null_event_handler, nullptr);
152#pragma GCC diagnostic pop
148 mir_surface_release_sync(surface);153 mir_surface_release_sync(surface);
149 mir_connection_release(connection);154 mir_connection_release(connection);
150 }155 }
151156
=== modified file 'tests/acceptance-tests/test_client_library.cpp'
--- tests/acceptance-tests/test_client_library.cpp 2016-08-09 14:32:31 +0000
+++ tests/acceptance-tests/test_client_library.cpp 2016-10-28 13:38:48 +0000
@@ -113,6 +113,8 @@
113 {113 {
114 for (int i = 0; i < 10; i++)114 for (int i = 0; i < 10; i++)
115 {115 {
116#pragma GCC diagnostic push
117#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
116 mir_wait_for_one(mir_surface_set_state(surf,118 mir_wait_for_one(mir_surface_set_state(surf,
117 mir_surface_state_maximized));119 mir_surface_state_maximized));
118 mir_wait_for_one(mir_surface_set_state(surf,120 mir_wait_for_one(mir_surface_set_state(surf,
@@ -121,6 +123,7 @@
121 mir_surface_state_fullscreen));123 mir_surface_state_fullscreen));
122 mir_wait_for_one(mir_surface_set_state(surf,124 mir_wait_for_one(mir_surface_set_state(surf,
123 mir_surface_state_minimized));125 mir_surface_state_minimized));
126#pragma GCC diagnostic pop
124 }127 }
125 }128 }
126 129
@@ -227,7 +230,10 @@
227230
228 auto spec = mir_connection_create_spec_for_normal_surface(connection, request_width,231 auto spec = mir_connection_create_spec_for_normal_surface(connection, request_width,
229 request_height, request_format);232 request_height, request_format);
233#pragma GCC diagnostic push
234#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
230 mir_surface_spec_set_buffer_usage(spec, request_buffer_usage);235 mir_surface_spec_set_buffer_usage(spec, request_buffer_usage);
236#pragma GCC diagnostic pop
231 surface = mir_surface_create_sync(spec);237 surface = mir_surface_create_sync(spec);
232 mir_surface_spec_release(spec);238 mir_surface_spec_release(spec);
233239
@@ -236,7 +242,10 @@
236 EXPECT_THAT(mir_surface_get_error_message(surface), StrEq(""));242 EXPECT_THAT(mir_surface_get_error_message(surface), StrEq(""));
237243
238 MirSurfaceParameters response_params;244 MirSurfaceParameters response_params;
245#pragma GCC diagnostic push
246#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
239 mir_surface_get_parameters(surface, &response_params);247 mir_surface_get_parameters(surface, &response_params);
248#pragma GCC diagnostic pop
240 EXPECT_EQ(request_width, response_params.width);249 EXPECT_EQ(request_width, response_params.width);
241 EXPECT_EQ(request_height, response_params.height);250 EXPECT_EQ(request_height, response_params.height);
242 EXPECT_EQ(request_format, response_params.pixel_format);251 EXPECT_EQ(request_format, response_params.pixel_format);
@@ -257,6 +266,8 @@
257 mir_wait_for(mir_surface_create(spec, create_surface_callback, this));266 mir_wait_for(mir_surface_create(spec, create_surface_callback, this));
258 mir_surface_spec_release(spec);267 mir_surface_spec_release(spec);
259268
269#pragma GCC diagnostic push
270#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
260 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_restored));271 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_restored));
261272
262 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));273 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));
@@ -279,6 +290,7 @@
279 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));290 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));
280 ASSERT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_fullscreen));291 ASSERT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_fullscreen));
281 }292 }
293#pragma GCC diagnostic pop
282294
283 mir_surface_release_sync(surface);295 mir_surface_release_sync(surface);
284 mir_connection_release(connection);296 mir_connection_release(connection);
@@ -404,7 +416,10 @@
404 surface = mir_surface_create_sync(spec);416 surface = mir_surface_create_sync(spec);
405 mir_surface_spec_release(spec);417 mir_surface_spec_release(spec);
406418
419#pragma GCC diagnostic push
420#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
407 auto const buffer_stream = mir_surface_get_buffer_stream(surface);421 auto const buffer_stream = mir_surface_get_buffer_stream(surface);
422#pragma GCC diagnostic pop
408423
409 MirGraphicsRegion graphics_region;424 MirGraphicsRegion graphics_region;
410 mir_buffer_stream_get_graphics_region(buffer_stream, &graphics_region);425 mir_buffer_stream_get_graphics_region(buffer_stream, &graphics_region);
@@ -427,7 +442,10 @@
427 mir_surface_spec_release(spec);442 mir_surface_spec_release(spec);
428443
429 // Expect zero (not wired up to detect the physical display yet)444 // Expect zero (not wired up to detect the physical display yet)
445#pragma GCC diagnostic push
446#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
430 EXPECT_THAT(mir_surface_get_dpi(surface), Eq(0));447 EXPECT_THAT(mir_surface_get_dpi(surface), Eq(0));
448#pragma GCC diagnostic pop
431449
432 mir_surface_release_sync(surface);450 mir_surface_release_sync(surface);
433 mir_connection_release(connection);451 mir_connection_release(connection);
@@ -440,13 +458,19 @@
440 auto const spec =458 auto const spec =
441 mir_connection_create_spec_for_normal_surface(459 mir_connection_create_spec_for_normal_surface(
442 connection, 1280, 1024, mir_pixel_format_abgr_8888);460 connection, 1280, 1024, mir_pixel_format_abgr_8888);
461#pragma GCC diagnostic push
462#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
443 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);463 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
464#pragma GCC diagnostic pop
444465
445 surface = mir_surface_create_sync(spec);466 surface = mir_surface_create_sync(spec);
446467
447 MirNativeBuffer *native;468 MirNativeBuffer *native;
469#pragma GCC diagnostic push
470#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
448 auto bs = mir_surface_get_buffer_stream(surface);471 auto bs = mir_surface_get_buffer_stream(surface);
449 mir_buffer_stream_get_current_buffer(bs, &native);472 mir_buffer_stream_get_current_buffer(bs, &native);
473#pragma GCC diagnostic pop
450 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);474 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
451 mir_buffer_stream_swap_buffers_sync(bs);475 mir_buffer_stream_swap_buffers_sync(bs);
452 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);476 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
@@ -456,8 +480,11 @@
456 mir_surface_spec_set_height(spec, 100);480 mir_surface_spec_set_height(spec, 100);
457481
458 surface = mir_surface_create_sync(spec);482 surface = mir_surface_create_sync(spec);
483#pragma GCC diagnostic push
484#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
459 bs = mir_surface_get_buffer_stream(surface);485 bs = mir_surface_get_buffer_stream(surface);
460 mir_buffer_stream_get_current_buffer(bs, &native);486 mir_buffer_stream_get_current_buffer(bs, &native);
487#pragma GCC diagnostic pop
461 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);488 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
462 mir_buffer_stream_swap_buffers_sync(bs);489 mir_buffer_stream_swap_buffers_sync(bs);
463 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);490 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
@@ -466,21 +493,33 @@
466493
467 mir_surface_spec_set_width(spec, 800);494 mir_surface_spec_set_width(spec, 800);
468 mir_surface_spec_set_height(spec, 600);495 mir_surface_spec_set_height(spec, 600);
496#pragma GCC diagnostic push
497#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
469 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);498 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
499#pragma GCC diagnostic pop
470500
471 surface = mir_surface_create_sync(spec);501 surface = mir_surface_create_sync(spec);
502#pragma GCC diagnostic push
503#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
472 bs = mir_surface_get_buffer_stream(surface);504 bs = mir_surface_get_buffer_stream(surface);
473 mir_buffer_stream_get_current_buffer(bs, &native);505 mir_buffer_stream_get_current_buffer(bs, &native);
506#pragma GCC diagnostic pop
474 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);507 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
475 mir_buffer_stream_swap_buffers_sync(bs);508 mir_buffer_stream_swap_buffers_sync(bs);
476 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);509 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
477 mir_surface_release_sync(surface);510 mir_surface_release_sync(surface);
478511
512#pragma GCC diagnostic push
513#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
479 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);514 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
515#pragma GCC diagnostic pop
480516
481 surface = mir_surface_create_sync(spec);517 surface = mir_surface_create_sync(spec);
518#pragma GCC diagnostic push
519#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
482 bs = mir_surface_get_buffer_stream(surface);520 bs = mir_surface_get_buffer_stream(surface);
483 mir_buffer_stream_get_current_buffer(bs, &native);521 mir_buffer_stream_get_current_buffer(bs, &native);
522#pragma GCC diagnostic pop
484 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);523 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
485 mir_buffer_stream_swap_buffers_sync(bs);524 mir_buffer_stream_swap_buffers_sync(bs);
486 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);525 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
@@ -497,7 +536,10 @@
497 auto const spec =536 auto const spec =
498 mir_connection_create_spec_for_normal_surface(537 mir_connection_create_spec_for_normal_surface(
499 connection, 0, 0, mir_pixel_format_abgr_8888);538 connection, 0, 0, mir_pixel_format_abgr_8888);
539#pragma GCC diagnostic push
540#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
500 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);541 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
542#pragma GCC diagnostic pop
501543
502 struct {int width, height;} const sizes[] =544 struct {int width, height;} const sizes[] =
503 {545 {
@@ -512,6 +554,8 @@
512 mir_surface_spec_set_height(spec, size.height);554 mir_surface_spec_set_height(spec, size.height);
513555
514 surface = mir_surface_create_sync(spec);556 surface = mir_surface_create_sync(spec);
557#pragma GCC diagnostic push
558#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
515 auto bs = mir_surface_get_buffer_stream(surface);559 auto bs = mir_surface_get_buffer_stream(surface);
516560
517 MirNativeBuffer *native = NULL;561 MirNativeBuffer *native = NULL;
@@ -525,6 +569,7 @@
525 ASSERT_THAT(native, NotNull());569 ASSERT_THAT(native, NotNull());
526 EXPECT_THAT(native->width, Eq(size.width));570 EXPECT_THAT(native->width, Eq(size.width));
527 ASSERT_THAT(native->height, Eq(size.height));571 ASSERT_THAT(native->height, Eq(size.height));
572#pragma GCC diagnostic pop
528573
529 mir_surface_release_sync(surface);574 mir_surface_release_sync(surface);
530 }575 }
@@ -543,8 +588,10 @@
543 auto const spec =588 auto const spec =
544 mir_connection_create_spec_for_normal_surface(589 mir_connection_create_spec_for_normal_surface(
545 connection, 640, 480, mir_pixel_format_abgr_8888);590 connection, 640, 480, mir_pixel_format_abgr_8888);
546591#pragma GCC diagnostic push
592#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
547 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);593 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
594#pragma GCC diagnostic pop
548 for (int i = 0; i != n_surfaces; ++i)595 for (int i = 0; i != n_surfaces; ++i)
549 {596 {
550 old_surface_count = current_surface_count();597 old_surface_count = current_surface_count();
@@ -576,7 +623,10 @@
576 surface = mtf::make_any_surface(connection);623 surface = mtf::make_any_surface(connection);
577624
578 buffers = 0;625 buffers = 0;
626#pragma GCC diagnostic push
627#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
579 mir_wait_for(mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), next_buffer_callback, this));628 mir_wait_for(mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), next_buffer_callback, this));
629#pragma GCC diagnostic pop
580 EXPECT_THAT(buffers, Eq(1));630 EXPECT_THAT(buffers, Eq(1));
581631
582 mir_wait_for(mir_surface_release(surface, release_surface_callback, this));632 mir_wait_for(mir_surface_release(surface, release_surface_callback, this));
@@ -592,7 +642,10 @@
592642
593 surface = mtf::make_any_surface(connection);643 surface = mtf::make_any_surface(connection);
594644
645#pragma GCC diagnostic push
646#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
595 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));647 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
648#pragma GCC diagnostic pop
596 EXPECT_TRUE(mir_surface_is_valid(surface));649 EXPECT_TRUE(mir_surface_is_valid(surface));
597 EXPECT_STREQ(mir_surface_get_error_message(surface), "");650 EXPECT_STREQ(mir_surface_get_error_message(surface), "");
598651
@@ -617,7 +670,10 @@
617 b.join();670 b.join();
618 c.join();671 c.join();
619672
673#pragma GCC diagnostic push
674#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
620 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_minimized));675 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_minimized));
676#pragma GCC diagnostic pop
621677
622 mir_surface_release_sync(surface);678 mir_surface_release_sync(surface);
623679
@@ -634,7 +690,10 @@
634 MirPlatformPackage platform_package;690 MirPlatformPackage platform_package;
635 ::memset(&platform_package, -1, sizeof(platform_package));691 ::memset(&platform_package, -1, sizeof(platform_package));
636692
693#pragma GCC diagnostic push
694#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
637 mir_connection_get_platform(connection, &platform_package);695 mir_connection_get_platform(connection, &platform_package);
696#pragma GCC diagnostic pop
638 EXPECT_THAT(platform_package, mtf::IsStubPlatformPackage());697 EXPECT_THAT(platform_package, mtf::IsStubPlatformPackage());
639698
640 mir_connection_release(connection);699 mir_connection_release(connection);
@@ -644,7 +703,10 @@
644{703{
645 mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this));704 mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this));
646705
706#pragma GCC diagnostic push
707#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
647 auto configuration = mir_connection_create_display_config(connection);708 auto configuration = mir_connection_create_display_config(connection);
709#pragma GCC diagnostic pop
648 ASSERT_THAT(configuration, NotNull());710 ASSERT_THAT(configuration, NotNull());
649 ASSERT_GT(configuration->num_outputs, 0u);711 ASSERT_GT(configuration->num_outputs, 0u);
650 ASSERT_THAT(configuration->outputs, NotNull());712 ASSERT_THAT(configuration->outputs, NotNull());
@@ -674,10 +736,13 @@
674736
675 while (buffers < 1024)737 while (buffers < 1024)
676 {738 {
739#pragma GCC diagnostic push
740#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
677 mir_buffer_stream_swap_buffers_sync(741 mir_buffer_stream_swap_buffers_sync(
678 mir_surface_get_buffer_stream(surf_one));742 mir_surface_get_buffer_stream(surf_one));
679 mir_buffer_stream_swap_buffers_sync(743 mir_buffer_stream_swap_buffers_sync(
680 mir_surface_get_buffer_stream(surf_two));744 mir_surface_get_buffer_stream(surf_two));
745#pragma GCC diagnostic pop
681746
682 buffers++;747 buffers++;
683 }748 }
@@ -726,12 +791,15 @@
726 EXPECT_THAT(surface, IsValid());791 EXPECT_THAT(surface, IsValid());
727792
728 MirNativeBuffer* native_buffer;793 MirNativeBuffer* native_buffer;
794#pragma GCC diagnostic push
795#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
729 mir_buffer_stream_get_current_buffer(796 mir_buffer_stream_get_current_buffer(
730 mir_surface_get_buffer_stream(surface), &native_buffer);797 mir_surface_get_buffer_stream(surface), &native_buffer);
731798
732 EXPECT_THAT(native_buffer->width, Eq(width));799 EXPECT_THAT(native_buffer->width, Eq(width));
733 EXPECT_THAT(native_buffer->height, Eq(height));800 EXPECT_THAT(native_buffer->height, Eq(height));
734 EXPECT_THAT(mir_surface_get_type(surface), Eq(mir_surface_type_normal));801 EXPECT_THAT(mir_surface_get_type(surface), Eq(mir_surface_type_normal));
802#pragma GCC diagnostic pop
735803
736 mir_surface_release_sync(surface);804 mir_surface_release_sync(surface);
737 mir_connection_release(connection);805 mir_connection_release(connection);
@@ -753,12 +821,15 @@
753 EXPECT_THAT(surface, IsValid());821 EXPECT_THAT(surface, IsValid());
754822
755 MirNativeBuffer* native_buffer;823 MirNativeBuffer* native_buffer;
824#pragma GCC diagnostic push
825#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
756 mir_buffer_stream_get_current_buffer(826 mir_buffer_stream_get_current_buffer(
757 mir_surface_get_buffer_stream(surface), &native_buffer);827 mir_surface_get_buffer_stream(surface), &native_buffer);
758828
759 EXPECT_THAT(native_buffer->width, Eq(width));829 EXPECT_THAT(native_buffer->width, Eq(width));
760 EXPECT_THAT(native_buffer->height, Eq(height));830 EXPECT_THAT(native_buffer->height, Eq(height));
761 EXPECT_THAT(mir_surface_get_type(surface), Eq(mir_surface_type_normal));831 EXPECT_THAT(mir_surface_get_type(surface), Eq(mir_surface_type_normal));
832#pragma GCC diagnostic pop
762833
763 mir_surface_release_sync(surface);834 mir_surface_release_sync(surface);
764 mir_connection_release(connection);835 mir_connection_release(connection);
@@ -781,11 +852,14 @@
781 mir_surface_spec_set_width(surface_spec, width);852 mir_surface_spec_set_width(surface_spec, width);
782 mir_surface_spec_set_height(surface_spec, height);853 mir_surface_spec_set_height(surface_spec, height);
783854
855#pragma GCC diagnostic push
856#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
784 MirPixelFormat const pixel_format{mir_pixel_format_argb_8888};857 MirPixelFormat const pixel_format{mir_pixel_format_argb_8888};
785 mir_surface_spec_set_pixel_format(surface_spec, pixel_format);858 mir_surface_spec_set_pixel_format(surface_spec, pixel_format);
786859
787 MirBufferUsage const buffer_usage{mir_buffer_usage_hardware};860 MirBufferUsage const buffer_usage{mir_buffer_usage_hardware};
788 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);861 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);
862#pragma GCC diagnostic pop
789863
790 auto surface = mir_surface_create_sync(surface_spec);864 auto surface = mir_surface_create_sync(surface_spec);
791 mir_surface_spec_release(surface_spec);865 mir_surface_spec_release(surface_spec);
@@ -807,7 +881,10 @@
807 mir_pixel_format_xbgr_8888);881 mir_pixel_format_xbgr_8888);
808882
809 // We need to specify a valid output id, so we need to find which ones are valid...883 // We need to specify a valid output id, so we need to find which ones are valid...
884#pragma GCC diagnostic push
885#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
810 auto configuration = mir_connection_create_display_config(connection);886 auto configuration = mir_connection_create_display_config(connection);
887#pragma GCC diagnostic pop
811 ASSERT_THAT(configuration->num_outputs, Ge(1));888 ASSERT_THAT(configuration->num_outputs, Ge(1));
812889
813 auto const requested_output = configuration->outputs[0];890 auto const requested_output = configuration->outputs[0];
@@ -820,8 +897,11 @@
820 EXPECT_THAT(surface, IsValid());897 EXPECT_THAT(surface, IsValid());
821898
822 MirNativeBuffer* native_buffer;899 MirNativeBuffer* native_buffer;
900#pragma GCC diagnostic push
901#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
823 mir_buffer_stream_get_current_buffer(902 mir_buffer_stream_get_current_buffer(
824 mir_surface_get_buffer_stream(surface), &native_buffer);903 mir_surface_get_buffer_stream(surface), &native_buffer);
904#pragma GCC diagnostic pop
825905
826 EXPECT_THAT(native_buffer->width,906 EXPECT_THAT(native_buffer->width,
827 Eq(requested_output.modes[requested_output.current_mode].horizontal_resolution));907 Eq(requested_output.modes[requested_output.current_mode].horizontal_resolution));
@@ -854,7 +934,10 @@
854 mir_pixel_format_bgr_888);934 mir_pixel_format_bgr_888);
855935
856 MirBufferUsage const buffer_usage{mir_buffer_usage_hardware};936 MirBufferUsage const buffer_usage{mir_buffer_usage_hardware};
937#pragma GCC diagnostic push
938#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
857 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);939 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);
940#pragma GCC diagnostic pop
858941
859 auto surface = mir_surface_create_sync(surface_spec);942 auto surface = mir_surface_create_sync(surface_spec);
860 mir_surface_spec_release(surface_spec);943 mir_surface_spec_release(surface_spec);
@@ -864,8 +947,11 @@
864 MirNativeBuffer* native_buffer;947 MirNativeBuffer* native_buffer;
865 // We use the fact that our stub client platform returns NULL if asked for a native948 // We use the fact that our stub client platform returns NULL if asked for a native
866 // buffer on a surface with mir_buffer_usage_software set.949 // buffer on a surface with mir_buffer_usage_software set.
950#pragma GCC diagnostic push
951#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
867 mir_buffer_stream_get_current_buffer(952 mir_buffer_stream_get_current_buffer(
868 mir_surface_get_buffer_stream(surface), &native_buffer);953 mir_surface_get_buffer_stream(surface), &native_buffer);
954#pragma GCC diagnostic pop
869955
870 EXPECT_THAT(native_buffer, Not(Eq(nullptr)));956 EXPECT_THAT(native_buffer, Not(Eq(nullptr)));
871957
@@ -884,7 +970,10 @@
884 mir_pixel_format_bgr_888);970 mir_pixel_format_bgr_888);
885971
886 MirBufferUsage const buffer_usage{mir_buffer_usage_software};972 MirBufferUsage const buffer_usage{mir_buffer_usage_software};
973#pragma GCC diagnostic push
974#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
887 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);975 mir_surface_spec_set_buffer_usage(surface_spec, buffer_usage);
976#pragma GCC diagnostic pop
888977
889 auto surface = mir_surface_create_sync(surface_spec);978 auto surface = mir_surface_create_sync(surface_spec);
890 mir_surface_spec_release(surface_spec);979 mir_surface_spec_release(surface_spec);
@@ -894,8 +983,11 @@
894 MirGraphicsRegion graphics_region;983 MirGraphicsRegion graphics_region;
895 // We use the fact that our stub client platform returns a NULL vaddr if984 // We use the fact that our stub client platform returns a NULL vaddr if
896 // asked to map a hardware buffer.985 // asked to map a hardware buffer.
986#pragma GCC diagnostic push
987#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
897 mir_buffer_stream_get_graphics_region(988 mir_buffer_stream_get_graphics_region(
898 mir_surface_get_buffer_stream(surface), &graphics_region);989 mir_surface_get_buffer_stream(surface), &graphics_region);
990#pragma GCC diagnostic pop
899991
900 EXPECT_THAT(graphics_region.vaddr, Not(Eq(nullptr)));992 EXPECT_THAT(graphics_region.vaddr, Not(Eq(nullptr)));
901993
@@ -936,8 +1028,11 @@
936 *1028 *
937 * Without manual dispatch, it's racy to try and test that.1029 * Without manual dispatch, it's racy to try and test that.
938 */1030 */
1031#pragma GCC diagnostic push
1032#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
939 mir_surface_set_event_handler(surface, &dummy_event_handler_one, nullptr);1033 mir_surface_set_event_handler(surface, &dummy_event_handler_one, nullptr);
940 mir_surface_set_event_handler(surface, &dummy_event_handler_two, nullptr);1034 mir_surface_set_event_handler(surface, &dummy_event_handler_two, nullptr);
1035#pragma GCC diagnostic pop
9411036
942 mir_surface_release_sync(surface);1037 mir_surface_release_sync(surface);
943 mir_connection_release(connection);1038 mir_connection_release(connection);
@@ -1012,9 +1107,11 @@
1012{1107{
1013 connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);1108 connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
1014 ASSERT_TRUE(mir_connection_is_valid(connection));1109 ASSERT_TRUE(mir_connection_is_valid(connection));
10151110#pragma GCC diagnostic push
1111#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1016 auto stream = mir_connection_create_buffer_stream_sync(connection,1112 auto stream = mir_connection_create_buffer_stream_sync(connection,
1017 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);1113 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);
1114#pragma GCC diagnostic pop
10181115
1019 ASSERT_THAT(stream, NotNull());1116 ASSERT_THAT(stream, NotNull());
1020 EXPECT_TRUE(mir_buffer_stream_is_valid(stream));1117 EXPECT_TRUE(mir_buffer_stream_is_valid(stream));
10211118
=== modified file 'tests/acceptance-tests/test_client_library_callbacks.cpp'
--- tests/acceptance-tests/test_client_library_callbacks.cpp 2015-07-23 10:55:34 +0000
+++ tests/acceptance-tests/test_client_library_callbacks.cpp 2016-10-28 13:38:48 +0000
@@ -148,9 +148,11 @@
148{148{
149 connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);149 connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
150 surface = mtf::make_any_surface(connection);150 surface = mtf::make_any_surface(connection);
151151#pragma GCC diagnostic push
152#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
152 auto const wh = mir_buffer_stream_swap_buffers(153 auto const wh = mir_buffer_stream_swap_buffers(
153 mir_surface_get_buffer_stream(surface), next_buffer_callback, this);154 mir_surface_get_buffer_stream(surface), next_buffer_callback, this);
155#pragma GCC diagnostic pop
154 mir_wait_for(wh);156 mir_wait_for(wh);
155157
156 EXPECT_THAT(buffers, Eq(1));158 EXPECT_THAT(buffers, Eq(1));
157159
=== modified file 'tests/acceptance-tests/test_client_logging.cpp'
--- tests/acceptance-tests/test_client_logging.cpp 2016-07-18 07:38:38 +0000
+++ tests/acceptance-tests/test_client_logging.cpp 2016-10-28 13:38:48 +0000
@@ -61,7 +61,10 @@
61 connection, 123, 456, mir_pixel_format_abgr_8888);61 connection, 123, 456, mir_pixel_format_abgr_8888);
62 ASSERT_THAT(spec, NotNull());62 ASSERT_THAT(spec, NotNull());
63 mir_surface_spec_set_name(spec, "Rumpelstiltskin");63 mir_surface_spec_set_name(spec, "Rumpelstiltskin");
64#pragma GCC diagnostic push
65#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
64 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);66 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
67#pragma GCC diagnostic pop
65 auto surf = mir_surface_create_sync(spec);68 auto surf = mir_surface_create_sync(spec);
66 ASSERT_THAT(surf, NotNull());69 ASSERT_THAT(surf, NotNull());
67 mir_surface_spec_release(spec);70 mir_surface_spec_release(spec);
@@ -69,7 +72,10 @@
69 int const target_fps = 10;72 int const target_fps = 10;
70 int const nseconds = 3;73 int const nseconds = 3;
71 auto const target_render_time = std::chrono::milliseconds(3);74 auto const target_render_time = std::chrono::milliseconds(3);
75#pragma GCC diagnostic push
76#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
72 auto bs = mir_surface_get_buffer_stream(surf);77 auto bs = mir_surface_get_buffer_stream(surf);
78#pragma GCC diagnostic pop
73 for (int s = 0; s < nseconds; ++s)79 for (int s = 0; s < nseconds; ++s)
74 {80 {
75 for (int f = 0; f < target_fps; ++f)81 for (int f = 0; f < target_fps; ++f)
7682
=== modified file 'tests/acceptance-tests/test_client_platform_operation.cpp'
--- tests/acceptance-tests/test_client_platform_operation.cpp 2015-06-25 03:00:08 +0000
+++ tests/acceptance-tests/test_client_platform_operation.cpp 2016-10-28 13:38:48 +0000
@@ -34,15 +34,20 @@
3434
35 MirPlatformMessage* platform_operation_add(std::vector<int> const& nums)35 MirPlatformMessage* platform_operation_add(std::vector<int> const& nums)
36 {36 {
37#pragma GCC diagnostic push
38#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
37 auto const request = mir_platform_message_create(add_opcode);39 auto const request = mir_platform_message_create(add_opcode);
40#pragma GCC diagnostic push
38 mir_platform_message_set_data(request, nums.data(), sizeof(int) * nums.size());41 mir_platform_message_set_data(request, nums.data(), sizeof(int) * nums.size());
39 MirPlatformMessage* reply;42 MirPlatformMessage* reply;
4043
41 auto const platform_op_done = mir_connection_platform_operation(44 auto const platform_op_done = mir_connection_platform_operation(
42 connection, request, assign_reply, &reply);45 connection, request, assign_reply, &reply);
43 mir_wait_for(platform_op_done);46 mir_wait_for(platform_op_done);
4447#pragma GCC diagnostic push
48#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
45 mir_platform_message_release(request);49 mir_platform_message_release(request);
50#pragma GCC diagnostic pop
4651
47 return reply;52 return reply;
48 }53 }
@@ -52,7 +57,10 @@
52 unsigned int const echo_fd_opcode =57 unsigned int const echo_fd_opcode =
53 static_cast<unsigned int>(mtf::StubGraphicsPlatformOperation::echo_fd);58 static_cast<unsigned int>(mtf::StubGraphicsPlatformOperation::echo_fd);
5459
60#pragma GCC diagnostic push
61#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
55 auto const request = mir_platform_message_create(echo_fd_opcode);62 auto const request = mir_platform_message_create(echo_fd_opcode);
63#pragma GCC diagnostic pop
56 mir_platform_message_set_fds(request, &fd, 1);64 mir_platform_message_set_fds(request, &fd, 1);
57 MirPlatformMessage* reply;65 MirPlatformMessage* reply;
5866
@@ -60,7 +68,10 @@
60 connection, request, assign_reply, &reply);68 connection, request, assign_reply, &reply);
61 mir_wait_for(platform_op_done);69 mir_wait_for(platform_op_done);
6270
71#pragma GCC diagnostic push
72#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
63 mir_platform_message_release(request);73 mir_platform_message_release(request);
74#pragma GCC diagnostic pop
6475
65 return reply;76 return reply;
66 }77 }
@@ -72,7 +83,10 @@
72MATCHER_P(MessageDataAsIntsEq, v, "")83MATCHER_P(MessageDataAsIntsEq, v, "")
73{84{
74 using namespace testing;85 using namespace testing;
86#pragma GCC diagnostic push
87#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
75 auto msg_data = mir_platform_message_get_data(arg);88 auto msg_data = mir_platform_message_get_data(arg);
89#pragma GCC diagnostic pop
76 if (msg_data.size % sizeof(int) != 0)90 if (msg_data.size % sizeof(int) != 0)
77 throw std::runtime_error("Data is not an array of ints");91 throw std::runtime_error("Data is not an array of ints");
7892
@@ -84,19 +98,28 @@
8498
85MATCHER(MessageDataIsEmpty, "")99MATCHER(MessageDataIsEmpty, "")
86{100{
101#pragma GCC diagnostic push
102#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
87 auto const msg_data = mir_platform_message_get_data(arg);103 auto const msg_data = mir_platform_message_get_data(arg);
104#pragma GCC diagnostic pop
88 return msg_data.size == 0 && msg_data.data == nullptr;105 return msg_data.size == 0 && msg_data.data == nullptr;
89}106}
90107
91MATCHER_P(MessageOpcodeEq, opcode, "")108MATCHER_P(MessageOpcodeEq, opcode, "")
92{109{
110#pragma GCC diagnostic push
111#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
93 auto const msg_opcode = mir_platform_message_get_opcode(arg);112 auto const msg_opcode = mir_platform_message_get_opcode(arg);
113#pragma GCC diagnostic pop
94 return msg_opcode == opcode;114 return msg_opcode == opcode;
95}115}
96116
97MATCHER(MessageFdsIsEmpty, "")117MATCHER(MessageFdsIsEmpty, "")
98{118{
119#pragma GCC diagnostic push
120#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
99 auto const msg_fds = mir_platform_message_get_fds(arg);121 auto const msg_fds = mir_platform_message_get_fds(arg);
122#pragma GCC diagnostic pop
100 return msg_fds.num_fds == 0 && msg_fds.fds == nullptr;123 return msg_fds.num_fds == 0 && msg_fds.fds == nullptr;
101}124}
102125
@@ -113,7 +136,10 @@
113136
114 EXPECT_THAT(reply, MessageDataAsIntsEq(std::vector<int>{num1 + num2}));137 EXPECT_THAT(reply, MessageDataAsIntsEq(std::vector<int>{num1 + num2}));
115138
139#pragma GCC diagnostic push
140#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
116 mir_platform_message_release(reply);141 mir_platform_message_release(reply);
142#pragma GCC diagnostic pop
117}143}
118144
119TEST_F(ClientPlatformOperation, does_not_set_connection_error_message_on_success)145TEST_F(ClientPlatformOperation, does_not_set_connection_error_message_on_success)
@@ -124,7 +150,10 @@
124150
125 EXPECT_THAT(mir_connection_get_error_message(connection), StrEq(""));151 EXPECT_THAT(mir_connection_get_error_message(connection), StrEq(""));
126152
153#pragma GCC diagnostic push
154#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
127 mir_platform_message_release(reply);155 mir_platform_message_release(reply);
156#pragma GCC diagnostic pop
128}157}
129158
130TEST_F(ClientPlatformOperation, reply_has_opcode_of_request)159TEST_F(ClientPlatformOperation, reply_has_opcode_of_request)
@@ -135,7 +164,10 @@
135164
136 EXPECT_THAT(reply, MessageOpcodeEq(add_opcode));165 EXPECT_THAT(reply, MessageOpcodeEq(add_opcode));
137166
167#pragma GCC diagnostic push
168#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
138 mir_platform_message_release(reply);169 mir_platform_message_release(reply);
170#pragma GCC diagnostic pop
139}171}
140172
141TEST_F(ClientPlatformOperation, returns_empty_reply_on_error)173TEST_F(ClientPlatformOperation, returns_empty_reply_on_error)
@@ -147,7 +179,10 @@
147 EXPECT_THAT(reply, MessageDataIsEmpty());179 EXPECT_THAT(reply, MessageDataIsEmpty());
148 EXPECT_THAT(reply, MessageFdsIsEmpty());180 EXPECT_THAT(reply, MessageFdsIsEmpty());
149181
182#pragma GCC diagnostic push
183#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
150 mir_platform_message_release(reply);184 mir_platform_message_release(reply);
185#pragma GCC diagnostic pop
151}186}
152187
153TEST_F(ClientPlatformOperation, sets_connection_error_message_on_error)188TEST_F(ClientPlatformOperation, sets_connection_error_message_on_error)
@@ -158,7 +193,10 @@
158193
159 EXPECT_THAT(mir_connection_get_error_message(connection), StrNe(""));194 EXPECT_THAT(mir_connection_get_error_message(connection), StrNe(""));
160195
196#pragma GCC diagnostic push
197#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
161 mir_platform_message_release(reply);198 mir_platform_message_release(reply);
199#pragma GCC diagnostic pop
162}200}
163201
164TEST_F(ClientPlatformOperation, exchanges_fd_items_with_platform)202TEST_F(ClientPlatformOperation, exchanges_fd_items_with_platform)
@@ -173,7 +211,10 @@
173 auto const reply = platform_operation_echo_fd(pipe.read_fd());211 auto const reply = platform_operation_echo_fd(pipe.read_fd());
174 EXPECT_THAT(reply, MessageDataIsEmpty());212 EXPECT_THAT(reply, MessageDataIsEmpty());
175213
214#pragma GCC diagnostic push
215#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
176 auto const reply_fds = mir_platform_message_get_fds(reply);216 auto const reply_fds = mir_platform_message_get_fds(reply);
217#pragma GCC diagnostic pop
177 EXPECT_THAT(reply_fds.num_fds, Eq(1));218 EXPECT_THAT(reply_fds.num_fds, Eq(1));
178219
179 auto const reply_fd = reply_fds.fds[0];220 auto const reply_fd = reply_fds.fds[0];
@@ -184,5 +225,8 @@
184 EXPECT_THAT(reply_char, Eq(sent_char));225 EXPECT_THAT(reply_char, Eq(sent_char));
185226
186 close(reply_fd);227 close(reply_fd);
228#pragma GCC diagnostic push
229#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
187 mir_platform_message_release(reply);230 mir_platform_message_release(reply);
231#pragma GCC diagnostic pop
188}232}
189233
=== modified file 'tests/acceptance-tests/test_client_scaling.cpp'
--- tests/acceptance-tests/test_client_scaling.cpp 2016-07-18 07:38:38 +0000
+++ tests/acceptance-tests/test_client_scaling.cpp 2016-10-28 13:38:48 +0000
@@ -160,7 +160,10 @@
160{160{
161 using namespace std::literals::chrono_literals;161 using namespace std::literals::chrono_literals;
162 auto scale = 2.0f;162 auto scale = 2.0f;
163#pragma GCC diagnostic push
164#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
163 auto stream = mir_surface_get_buffer_stream(surface);165 auto stream = mir_surface_get_buffer_stream(surface);
166#pragma GCC diagnostic pop
164 mir_buffer_stream_set_scale(stream, scale);167 mir_buffer_stream_set_scale(stream, scale);
165168
166 mir_buffer_stream_swap_buffers_sync(stream);169 mir_buffer_stream_swap_buffers_sync(stream);
167170
=== modified file 'tests/acceptance-tests/test_client_screencast.cpp'
--- tests/acceptance-tests/test_client_screencast.cpp 2016-07-18 07:38:38 +0000
+++ tests/acceptance-tests/test_client_screencast.cpp 2016-10-28 13:38:48 +0000
@@ -70,6 +70,8 @@
7070
71 MirScreencastParameters params = default_screencast_params;71 MirScreencastParameters params = default_screencast_params;
72 params.width = params.height = 0;72 params.width = params.height = 0;
73#pragma GCC diagnostic push
74#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
73 auto screencast = mir_connection_create_screencast_sync(connection, &params);75 auto screencast = mir_connection_create_screencast_sync(connection, &params);
74 EXPECT_FALSE(mir_screencast_is_valid(screencast));76 EXPECT_FALSE(mir_screencast_is_valid(screencast));
7577
@@ -86,6 +88,7 @@
86 params.pixel_format = mir_pixel_format_invalid;88 params.pixel_format = mir_pixel_format_invalid;
8789
88 screencast = mir_connection_create_screencast_sync(connection, &params);90 screencast = mir_connection_create_screencast_sync(connection, &params);
91#pragma GCC diagnostic pop
89 EXPECT_FALSE(mir_screencast_is_valid(screencast));92 EXPECT_FALSE(mir_screencast_is_valid(screencast));
9093
91 mir_screencast_release_sync(screencast);94 mir_screencast_release_sync(screencast);
@@ -101,7 +104,10 @@
101104
102 auto const connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);105 auto const connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
103106
107#pragma GCC diagnostic push
108#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
104 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);109 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
110#pragma GCC diagnostic pop
105 EXPECT_FALSE(mir_screencast_is_valid(screencast));111 EXPECT_FALSE(mir_screencast_is_valid(screencast));
106112
107 mir_screencast_release_sync(screencast);113 mir_screencast_release_sync(screencast);
108114
=== modified file 'tests/acceptance-tests/test_client_surface_events.cpp'
--- tests/acceptance-tests/test_client_surface_events.cpp 2016-09-30 08:31:53 +0000
+++ tests/acceptance-tests/test_client_surface_events.cpp 2016-10-28 13:38:48 +0000
@@ -128,12 +128,15 @@
128128
129 mtf::ConnectedClientWithASurface::SetUp();129 mtf::ConnectedClientWithASurface::SetUp();
130130
131#pragma GCC diagnostic push
132#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
131 mir_surface_set_event_handler(surface, &event_callback, this);133 mir_surface_set_event_handler(surface, &event_callback, this);
132134
133 scene_surface = the_latest_surface();135 scene_surface = the_latest_surface();
134136
135 other_surface = mtf::make_any_surface(connection);137 other_surface = mtf::make_any_surface(connection);
136 mir_surface_set_event_handler(other_surface, nullptr, nullptr);138 mir_surface_set_event_handler(other_surface, nullptr, nullptr);
139#pragma GCC diagnostic pop
137140
138 reset_last_event();141 reset_last_event();
139 }142 }
@@ -153,8 +156,11 @@
153TEST_F(ClientSurfaceEvents, surface_receives_state_events)156TEST_F(ClientSurfaceEvents, surface_receives_state_events)
154{157{
155 {158 {
159#pragma GCC diagnostic push
160#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
156 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));161 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_fullscreen));
157 mir_wait_for(mir_surface_set_state(other_surface, mir_surface_state_vertmaximized));162 mir_wait_for(mir_surface_set_state(other_surface, mir_surface_state_vertmaximized));
163#pragma GCC diagnostic pop
158164
159 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};165 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};
160166
@@ -162,7 +168,10 @@
162 }168 }
163169
164 {170 {
171#pragma GCC diagnostic push
172#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
165 mir_wait_for(mir_surface_set_state(surface, static_cast<MirSurfaceState>(999)));173 mir_wait_for(mir_surface_set_state(surface, static_cast<MirSurfaceState>(999)));
174#pragma GCC diagnostic pop
166175
167 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};176 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};
168 EXPECT_THAT(last_event, mt::SurfaceEvent(mir_surface_attrib_state, mir_surface_state_fullscreen));177 EXPECT_THAT(last_event, mt::SurfaceEvent(mir_surface_attrib_state, mir_surface_state_fullscreen));
@@ -171,7 +180,10 @@
171 reset_last_event();180 reset_last_event();
172181
173 {182 {
183#pragma GCC diagnostic push
184#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
174 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_vertmaximized));185 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_vertmaximized));
186#pragma GCC diagnostic pop
175187
176 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};188 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};
177189
@@ -181,8 +193,11 @@
181 reset_last_event();193 reset_last_event();
182194
183 {195 {
196#pragma GCC diagnostic push
197#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
184 mir_wait_for(mir_surface_set_state(surface, static_cast<MirSurfaceState>(777)));198 mir_wait_for(mir_surface_set_state(surface, static_cast<MirSurfaceState>(777)));
185 mir_wait_for(mir_surface_set_state(other_surface, mir_surface_state_maximized));199 mir_wait_for(mir_surface_set_state(other_surface, mir_surface_state_maximized));
200#pragma GCC diagnostic pop
186201
187 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};202 std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex};
188203
@@ -225,8 +240,10 @@
225 scene_surface->set_orientation(direction);240 scene_surface->set_orientation(direction);
226241
227 EXPECT_TRUE(wait_for_event(std::chrono::seconds(1)));242 EXPECT_TRUE(wait_for_event(std::chrono::seconds(1)));
228243#pragma GCC diagnostic push
244#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
229 EXPECT_THAT(mir_surface_get_orientation(surface), Eq(direction));245 EXPECT_THAT(mir_surface_get_orientation(surface), Eq(direction));
246#pragma GCC diagnostic pop
230 }247 }
231}248}
232249
@@ -255,8 +272,11 @@
255 {272 {
256 reset_last_event();273 reset_last_event();
257274
275#pragma GCC diagnostic push
276#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
258 mir_wait_for(mir_surface_set_preferred_orientation(surface, mode));277 mir_wait_for(mir_surface_set_preferred_orientation(surface, mode));
259 EXPECT_THAT(mir_surface_get_preferred_orientation(surface), Eq(mode));278 EXPECT_THAT(mir_surface_get_preferred_orientation(surface), Eq(mode));
279#pragma GCC diagnostic pop
260 }280 }
261}281}
262282
@@ -306,7 +326,10 @@
306{326{
307 set_event_filter(mir_event_type_close_surface);327 set_event_filter(mir_event_type_close_surface);
308328
329#pragma GCC diagnostic push
330#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
309 mir_surface_set_event_handler(surface, nullptr, nullptr);331 mir_surface_set_event_handler(surface, nullptr, nullptr);
332#pragma GCC diagnostic pop
310 scene_surface->request_client_surface_close();333 scene_surface->request_client_surface_close();
311334
312 EXPECT_FALSE(wait_for_event(std::chrono::seconds(1)));335 EXPECT_FALSE(wait_for_event(std::chrono::seconds(1)));
@@ -348,6 +371,8 @@
348 auto surface = mtf::make_any_surface(connection);371 auto surface = mtf::make_any_surface(connection);
349372
350 mt::Signal focus_received;373 mt::Signal focus_received;
374#pragma GCC diagnostic push
375#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
351 mir_surface_set_event_handler(376 mir_surface_set_event_handler(
352 surface,377 surface,
353 [](MirSurface*, MirEvent const* event, void* ctx)378 [](MirSurface*, MirEvent const* event, void* ctx)
@@ -359,14 +384,20 @@
359 }384 }
360 },385 },
361 &focus_received);386 &focus_received);
387#pragma GCC diagnostic pop
362388
363 // Swap buffers to get the surface into the scene so it can be focused.389 // Swap buffers to get the surface into the scene so it can be focused.
390#pragma GCC diagnostic push
391#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
364 auto buffer_stream = mir_surface_get_buffer_stream(surface);392 auto buffer_stream = mir_surface_get_buffer_stream(surface);
393#pragma GCC diagnostic pop
365 mir_buffer_stream_swap_buffers_sync(buffer_stream);394 mir_buffer_stream_swap_buffers_sync(buffer_stream);
366395
367 ASSERT_TRUE(focus_received.wait_for(10s));396 ASSERT_TRUE(focus_received.wait_for(10s));
368397
369 mt::Signal unfocus_received;398 mt::Signal unfocus_received;
399#pragma GCC diagnostic push
400#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
370 mir_surface_set_event_handler(401 mir_surface_set_event_handler(
371 surface,402 surface,
372 [](MirSurface*, MirEvent const* event, void* ctx)403 [](MirSurface*, MirEvent const* event, void* ctx)
@@ -378,6 +409,7 @@
378 }409 }
379 },410 },
380 &unfocus_received);411 &unfocus_received);
412#pragma GCC diagnostic pop
381413
382 mir_surface_release_sync(surface);414 mir_surface_release_sync(surface);
383415
@@ -392,6 +424,8 @@
392 auto surface = mtf::make_any_surface(connection);424 auto surface = mtf::make_any_surface(connection);
393425
394 mt::Signal focus_received;426 mt::Signal focus_received;
427#pragma GCC diagnostic push
428#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
395 mir_surface_set_event_handler(429 mir_surface_set_event_handler(
396 surface,430 surface,
397 [](MirSurface*, MirEvent const* event, void* ctx)431 [](MirSurface*, MirEvent const* event, void* ctx)
@@ -403,14 +437,20 @@
403 }437 }
404 },438 },
405 &focus_received);439 &focus_received);
440#pragma GCC diagnostic pop
406441
407 // Swap buffers to get the surface into the scene so it can be focused.442 // Swap buffers to get the surface into the scene so it can be focused.
443#pragma GCC diagnostic push
444#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
408 auto buffer_stream = mir_surface_get_buffer_stream(surface);445 auto buffer_stream = mir_surface_get_buffer_stream(surface);
446#pragma GCC diagnostic pop
409 mir_buffer_stream_swap_buffers_sync(buffer_stream);447 mir_buffer_stream_swap_buffers_sync(buffer_stream);
410448
411 ASSERT_TRUE(focus_received.wait_for(10s));449 ASSERT_TRUE(focus_received.wait_for(10s));
412450
413 mt::Signal unfocus_received;451 mt::Signal unfocus_received;
452#pragma GCC diagnostic push
453#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
414 mir_surface_set_event_handler(454 mir_surface_set_event_handler(
415 surface,455 surface,
416 [](MirSurface*, MirEvent const* event, void* ctx)456 [](MirSurface*, MirEvent const* event, void* ctx)
@@ -422,10 +462,14 @@
422 }462 }
423 },463 },
424 &unfocus_received);464 &unfocus_received);
465#pragma GCC diagnostic pop
425466
426 // Add a new surface that will take focus.467 // Add a new surface that will take focus.
427 auto focus_grabbing_surface = mtf::make_any_surface(connection);468 auto focus_grabbing_surface = mtf::make_any_surface(connection);
469#pragma GCC diagnostic push
470#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
428 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(focus_grabbing_surface));471 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(focus_grabbing_surface));
472#pragma GCC diagnostic pop
429473
430 ASSERT_TRUE(unfocus_received.wait_for(10s));474 ASSERT_TRUE(unfocus_received.wait_for(10s));
431475
@@ -483,7 +527,10 @@
483 mt::Signal done;527 mt::Signal done;
484528
485 auto spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);529 auto spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);
530#pragma GCC diagnostic push
531#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
486 mir_surface_spec_set_event_handler(spec, &raise_signal_on_close_event, &done);532 mir_surface_spec_set_event_handler(spec, &raise_signal_on_close_event, &done);
533#pragma GCC diagnostic pop
487534
488 auto surface = mir_surface_create_sync(spec);535 auto surface = mir_surface_create_sync(spec);
489536
@@ -574,7 +621,10 @@
574 EventContext context;621 EventContext context;
575622
576 auto spec = mir_connection_create_spec_for_normal_surface(connection, 640, 480, mir_pixel_format_abgr_8888);623 auto spec = mir_connection_create_spec_for_normal_surface(connection, 640, 480, mir_pixel_format_abgr_8888);
624#pragma GCC diagnostic push
625#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
577 mir_surface_spec_set_event_handler(spec, &surface_output_capturing_callback, &context);626 mir_surface_spec_set_event_handler(spec, &surface_output_capturing_callback, &context);
627#pragma GCC diagnostic pop
578 auto surface = mir_surface_create_sync(spec);628 auto surface = mir_surface_create_sync(spec);
579 mir_surface_spec_release(spec);629 mir_surface_spec_release(spec);
580630
581631
=== modified file 'tests/acceptance-tests/test_client_surface_swap_buffers.cpp'
--- tests/acceptance-tests/test_client_surface_swap_buffers.cpp 2016-05-31 12:27:12 +0000
+++ tests/acceptance-tests/test_client_surface_swap_buffers.cpp 2016-10-28 13:38:48 +0000
@@ -63,7 +63,10 @@
63 {63 {
64 mt::Signal buffers_swapped;64 mt::Signal buffers_swapped;
6565
66#pragma GCC diagnostic push
67#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
66 mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), swap_buffers_callback, &buffers_swapped);68 mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), swap_buffers_callback, &buffers_swapped);
69#pragma GCC diagnostic pop
6770
68 /*71 /*
69 * ASSERT instead of EXPECT, since if we continue we will block in future72 * ASSERT instead of EXPECT, since if we continue we will block in future
@@ -136,6 +139,9 @@
136//LP: #1584784139//LP: #1584784
137TEST_F(SwapBuffersDoesntBlockOnSubmission, can_swap_nbuffers_times_without_blocking)140TEST_F(SwapBuffersDoesntBlockOnSubmission, can_swap_nbuffers_times_without_blocking)
138{141{
142#pragma GCC diagnostic push
143#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
139 for (auto i = 0u; i != nbuffers; ++i)144 for (auto i = 0u; i != nbuffers; ++i)
140 mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), nullptr, nullptr);145 mir_buffer_stream_swap_buffers(mir_surface_get_buffer_stream(surface), nullptr, nullptr);
146#pragma GCC diagnostic pop
141}147}
142148
=== modified file 'tests/acceptance-tests/test_client_surface_visibility.cpp'
--- tests/acceptance-tests/test_client_surface_visibility.cpp 2016-08-11 07:24:14 +0000
+++ tests/acceptance-tests/test_client_surface_visibility.cpp 2016-10-28 13:38:48 +0000
@@ -109,8 +109,11 @@
109 auto const spec = mir_connection_create_spec_for_normal_surface(109 auto const spec = mir_connection_create_spec_for_normal_surface(
110 connection, size.width.as_int(), size.height.as_int(), mir_pixel_format_bgr_888);110 connection, size.width.as_int(), size.height.as_int(), mir_pixel_format_bgr_888);
111 mir_surface_spec_set_name(spec, name);111 mir_surface_spec_set_name(spec, name);
112#pragma GCC diagnostic push
113#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
112 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);114 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
113 mir_surface_spec_set_event_handler(spec, &event_callback, &mock_callback);115 mir_surface_spec_set_event_handler(spec, &event_callback, &mock_callback);
116#pragma GCC diagnostic pop
114 auto surface = mir_surface_create_sync(spec);117 auto surface = mir_surface_create_sync(spec);
115 mir_surface_spec_release(spec);118 mir_surface_spec_release(spec);
116 return surface;119 return surface;
@@ -126,7 +129,10 @@
126129
127 ~Surface()130 ~Surface()
128 {131 {
132#pragma GCC diagnostic push
133#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
129 mir_surface_set_event_handler(surface, null_event_callback, nullptr);134 mir_surface_set_event_handler(surface, null_event_callback, nullptr);
135#pragma GCC diagnostic pop
130 mir_surface_release_sync(surface);136 mir_surface_release_sync(surface);
131 }137 }
132138
@@ -156,12 +162,15 @@
156private:162private:
157 void wait_for_visible_and_focused()163 void wait_for_visible_and_focused()
158 {164 {
165#pragma GCC diagnostic push
166#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
159 expect_surface_visibility_event_after(167 expect_surface_visibility_event_after(
160 mir_surface_visibility_exposed,168 mir_surface_visibility_exposed,
161 [this]169 [this]
162 {170 {
163 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));171 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
164 });172 });
173#pragma GCC diagnostic pop
165174
166 // GMock is behaving strangely, checking expectations after they175 // GMock is behaving strangely, checking expectations after they
167 // have been cleared, so we use spin_wait() instead.176 // have been cleared, so we use spin_wait() instead.
168177
=== modified file 'tests/acceptance-tests/test_client_surfaces.cpp'
--- tests/acceptance-tests/test_client_surfaces.cpp 2016-08-09 08:13:02 +0000
+++ tests/acceptance-tests/test_client_surfaces.cpp 2016-10-28 13:38:48 +0000
@@ -134,6 +134,8 @@
134 mir_surface_spec_release(spec);134 mir_surface_spec_release(spec);
135135
136 MirSurfaceParameters response_params;136 MirSurfaceParameters response_params;
137#pragma GCC diagnostic push
138#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
137 mir_surface_get_parameters(ssync->surface, &response_params);139 mir_surface_get_parameters(ssync->surface, &response_params);
138 EXPECT_EQ(640, response_params.width);140 EXPECT_EQ(640, response_params.width);
139 EXPECT_EQ(480, response_params.height);141 EXPECT_EQ(480, response_params.height);
@@ -141,6 +143,7 @@
141 EXPECT_EQ(mir_buffer_usage_hardware, response_params.buffer_usage);143 EXPECT_EQ(mir_buffer_usage_hardware, response_params.buffer_usage);
142144
143 mir_surface_get_parameters(ssync[1].surface, &response_params);145 mir_surface_get_parameters(ssync[1].surface, &response_params);
146#pragma GCC diagnostic pop
144 EXPECT_EQ(1600, response_params.width);147 EXPECT_EQ(1600, response_params.width);
145 EXPECT_EQ(1200, response_params.height);148 EXPECT_EQ(1200, response_params.height);
146 EXPECT_EQ(mir_pixel_format_abgr_8888, response_params.pixel_format);149 EXPECT_EQ(mir_pixel_format_abgr_8888, response_params.pixel_format);
@@ -207,6 +210,8 @@
207 ASSERT_THAT(spec, NotNull());210 ASSERT_THAT(spec, NotNull());
208211
209 MirOrientationMode mode{GetParam()};212 MirOrientationMode mode{GetParam()};
213#pragma GCC diagnostic push
214#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
210 mir_surface_spec_set_preferred_orientation(spec, mode);215 mir_surface_spec_set_preferred_orientation(spec, mode);
211216
212 auto surface = mir_surface_create_sync(spec);217 auto surface = mir_surface_create_sync(spec);
@@ -214,6 +219,7 @@
214219
215 ASSERT_THAT(surface, IsValid());220 ASSERT_THAT(surface, IsValid());
216 EXPECT_EQ(mir_surface_get_preferred_orientation(surface), mode);221 EXPECT_EQ(mir_surface_get_preferred_orientation(surface), mode);
222#pragma GCC diagnostic pop
217223
218 mir_surface_release_sync(surface);224 mir_surface_release_sync(surface);
219}225}
@@ -238,7 +244,10 @@
238 mir_surface_spec_release(spec);244 mir_surface_spec_release(spec);
239245
240 ASSERT_THAT(menu, IsValid());246 ASSERT_THAT(menu, IsValid());
247#pragma GCC diagnostic push
248#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
241 EXPECT_EQ(mir_surface_get_type(menu), mir_surface_type_menu);249 EXPECT_EQ(mir_surface_get_type(menu), mir_surface_type_menu);
250#pragma GCC diagnostic pop
242251
243 mir_surface_release_sync(parent);252 mir_surface_release_sync(parent);
244 mir_surface_release_sync(menu);253 mir_surface_release_sync(menu);
@@ -279,7 +288,10 @@
279 mir_surface_spec_release(spec);288 mir_surface_spec_release(spec);
280289
281 ASSERT_THAT(tooltip, IsValid());290 ASSERT_THAT(tooltip, IsValid());
291#pragma GCC diagnostic push
292#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
282 EXPECT_EQ(mir_surface_get_type(tooltip), mir_surface_type_tip);293 EXPECT_EQ(mir_surface_get_type(tooltip), mir_surface_type_tip);
294#pragma GCC diagnostic pop
283295
284 mir_surface_release_sync(parent);296 mir_surface_release_sync(parent);
285 mir_surface_release_sync(tooltip);297 mir_surface_release_sync(tooltip);
@@ -295,7 +307,10 @@
295 mir_surface_spec_release(spec);307 mir_surface_spec_release(spec);
296308
297 ASSERT_THAT(dialog, IsValid());309 ASSERT_THAT(dialog, IsValid());
310#pragma GCC diagnostic push
311#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
298 EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog);312 EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog);
313#pragma GCC diagnostic pop
299314
300 mir_surface_release_sync(dialog);315 mir_surface_release_sync(dialog);
301}316}
@@ -311,7 +326,10 @@
311 mir_surface_spec_release(spec);326 mir_surface_spec_release(spec);
312327
313 ASSERT_THAT(dialog, IsValid());328 ASSERT_THAT(dialog, IsValid());
329#pragma GCC diagnostic push
330#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
314 EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog);331 EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog);
332#pragma GCC diagnostic pop
315333
316 mir_surface_release_sync(parent);334 mir_surface_release_sync(parent);
317 mir_surface_release_sync(dialog);335 mir_surface_release_sync(dialog);
@@ -325,8 +343,10 @@
325343
326 auto im = mir_surface_create_sync(spec);344 auto im = mir_surface_create_sync(spec);
327 mir_surface_spec_release(spec);345 mir_surface_spec_release(spec);
328346#pragma GCC diagnostic push
347#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
329 EXPECT_EQ(mir_surface_get_type(im), mir_surface_type_inputmethod);348 EXPECT_EQ(mir_surface_get_type(im), mir_surface_type_inputmethod);
349#pragma GCC diagnostic pop
330350
331 mir_surface_release_sync(im);351 mir_surface_release_sync(im);
332}352}
333353
=== modified file 'tests/acceptance-tests/test_client_with_custom_display_config_deadlock.cpp'
--- tests/acceptance-tests/test_client_with_custom_display_config_deadlock.cpp 2015-02-22 07:46:25 +0000
+++ tests/acceptance-tests/test_client_with_custom_display_config_deadlock.cpp 2016-10-28 13:38:48 +0000
@@ -38,8 +38,11 @@
38 auto second_surface = mtf::make_any_surface(connection);38 auto second_surface = mtf::make_any_surface(connection);
39 ASSERT_TRUE(mir_surface_is_valid(second_surface));39 ASSERT_TRUE(mir_surface_is_valid(second_surface));
4040
41#pragma GCC diagnostic push
42#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
41 auto configuration = mir_connection_create_display_config(connection);43 auto configuration = mir_connection_create_display_config(connection);
42 mir_wait_for(mir_connection_apply_display_config(connection, configuration));44 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
45#pragma GCC diagnostic pop
43 EXPECT_STREQ("", mir_connection_get_error_message(connection));46 EXPECT_STREQ("", mir_connection_get_error_message(connection));
44 mir_display_config_destroy(configuration);47 mir_display_config_destroy(configuration);
4548
4649
=== modified file 'tests/acceptance-tests/test_confined_pointer.cpp'
--- tests/acceptance-tests/test_confined_pointer.cpp 2016-09-09 03:47:07 +0000
+++ tests/acceptance-tests/test_confined_pointer.cpp 2016-10-28 13:38:48 +0000
@@ -88,9 +88,12 @@
88 mir_surface_get_error_message(surface)});88 mir_surface_get_error_message(surface)});
89 }89 }
9090
91#pragma GCC diagnostic push
92#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
91 mir_surface_set_event_handler(surface, handle_event, this);93 mir_surface_set_event_handler(surface, handle_event, this);
92 mir_buffer_stream_swap_buffers_sync(94 mir_buffer_stream_swap_buffers_sync(
93 mir_surface_get_buffer_stream(surface));95 mir_surface_get_buffer_stream(surface));
96#pragma GCC diagnostic push
9497
95 ready_to_accept_events.wait_for(4s);98 ready_to_accept_events.wait_for(4s);
96 if (!ready_to_accept_events.raised())99 if (!ready_to_accept_events.raised())
@@ -147,7 +150,10 @@
147 // Remove the event handler to avoid handling spurious events unrelated150 // Remove the event handler to avoid handling spurious events unrelated
148 // to the tests (e.g. pointer leave events when the surface is destroyed),151 // to the tests (e.g. pointer leave events when the surface is destroyed),
149 // which can cause test expectations to fail.152 // which can cause test expectations to fail.
153#pragma GCC diagnostic push
154#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
150 mir_surface_set_event_handler(surface, null_event_handler, nullptr);155 mir_surface_set_event_handler(surface, null_event_handler, nullptr);
156#pragma GCC diagnostic pop
151 mir_surface_release_sync(surface);157 mir_surface_release_sync(surface);
152 mir_connection_release(connection);158 mir_connection_release(connection);
153 }159 }
154160
=== modified file 'tests/acceptance-tests/test_custom_window_management.cpp'
--- tests/acceptance-tests/test_custom_window_management.cpp 2016-09-20 04:32:25 +0000
+++ tests/acceptance-tests/test_custom_window_management.cpp 2016-10-28 13:38:48 +0000
@@ -281,8 +281,10 @@
281281
282 EXPECT_CALL(window_manager, set_surface_attribute(_, WeakPtrEq(server_surface[i]), mir_surface_attrib_state,_))282 EXPECT_CALL(window_manager, set_surface_attribute(_, WeakPtrEq(server_surface[i]), mir_surface_attrib_state,_))
283 .WillOnce(WithArg<3>(Invoke([&](int value) { received.raise(); return value; })));283 .WillOnce(WithArg<3>(Invoke([&](int value) { received.raise(); return value; })));
284284#pragma GCC diagnostic push
285#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
285 mir_surface_set_state(client_surface[i], mir_surface_state_maximized);286 mir_surface_set_state(client_surface[i], mir_surface_state_maximized);
287#pragma GCC diagnostic pop
286288
287 received.wait_for(400ms);289 received.wait_for(400ms);
288 }290 }
289291
=== modified file 'tests/acceptance-tests/test_debug_api.cpp'
--- tests/acceptance-tests/test_debug_api.cpp 2016-01-29 08:18:22 +0000
+++ tests/acceptance-tests/test_debug_api.cpp 2016-10-28 13:38:48 +0000
@@ -157,7 +157,10 @@
157 int screen_x, screen_y, x, y;157 int screen_x, screen_y, x, y;
158 x = 35, y = 21;158 x = 35, y = 21;
159159
160#pragma GCC diagnostic push
161#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
160 ASSERT_TRUE(mir_debug_surface_coords_to_screen(surf, x, y, &screen_x, &screen_y));162 ASSERT_TRUE(mir_debug_surface_coords_to_screen(surf, x, y, &screen_x, &screen_y));
163#pragma GCC diagnostic pop
161 EXPECT_EQ(x + surface_location.top_left.x.as_int(), screen_x);164 EXPECT_EQ(x + surface_location.top_left.x.as_int(), screen_x);
162 EXPECT_EQ(y + surface_location.top_left.y.as_int(), screen_y);165 EXPECT_EQ(y + surface_location.top_left.y.as_int(), screen_y);
163166
@@ -170,7 +173,10 @@
170 surf = mtf::make_any_surface(connection);173 surf = mtf::make_any_surface(connection);
171 ASSERT_TRUE(mir_surface_is_valid(surf));174 ASSERT_TRUE(mir_surface_is_valid(surf));
172175
176#pragma GCC diagnostic push
177#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
173 ASSERT_TRUE(mir_debug_surface_coords_to_screen(surf, x, y, &screen_x, &screen_y));178 ASSERT_TRUE(mir_debug_surface_coords_to_screen(surf, x, y, &screen_x, &screen_y));
179#pragma GCC diagnostic pop
174 EXPECT_EQ(x + surface_location.top_left.x.as_int(), screen_x);180 EXPECT_EQ(x + surface_location.top_left.x.as_int(), screen_x);
175 EXPECT_EQ(y + surface_location.top_left.y.as_int(), screen_y);181 EXPECT_EQ(y + surface_location.top_left.y.as_int(), screen_y);
176182
@@ -186,7 +192,10 @@
186192
187 int screen_x, screen_y;193 int screen_x, screen_y;
188194
195#pragma GCC diagnostic push
196#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
189 EXPECT_FALSE(mir_debug_surface_coords_to_screen(surf, 0, 0, &screen_x, &screen_y));197 EXPECT_FALSE(mir_debug_surface_coords_to_screen(surf, 0, 0, &screen_x, &screen_y));
198#pragma GCC diagnostic pop
190199
191 mir_surface_release_sync(surf);200 mir_surface_release_sync(surf);
192}201}
@@ -206,7 +215,10 @@
206215
207 int screen_x, screen_y;216 int screen_x, screen_y;
208217
218#pragma GCC diagnostic push
219#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
209 EXPECT_TRUE(mir_debug_surface_coords_to_screen(surf, 0, 0, &screen_x, &screen_y));220 EXPECT_TRUE(mir_debug_surface_coords_to_screen(surf, 0, 0, &screen_x, &screen_y));
221#pragma GCC diagnostic pop
210 EXPECT_EQ(testpoint.x.as_int(), screen_x);222 EXPECT_EQ(testpoint.x.as_int(), screen_x);
211 EXPECT_EQ(testpoint.y.as_int(), screen_y);223 EXPECT_EQ(testpoint.y.as_int(), screen_y);
212224
213225
=== modified file 'tests/acceptance-tests/test_display_configuration.cpp'
--- tests/acceptance-tests/test_display_configuration.cpp 2016-07-18 07:38:38 +0000
+++ tests/acceptance-tests/test_display_configuration.cpp 2016-10-28 13:38:48 +0000
@@ -118,7 +118,10 @@
118118
119TEST_F(LegacyDisplayConfigurationTest, display_configuration_reaches_client)119TEST_F(LegacyDisplayConfigurationTest, display_configuration_reaches_client)
120{120{
121#pragma GCC diagnostic push
122#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
121 auto configuration = mir_connection_create_display_config(connection);123 auto configuration = mir_connection_create_display_config(connection);
124#pragma GCC diagnostic pop
122125
123 EXPECT_THAT(*configuration,126 EXPECT_THAT(*configuration,
124 mt::DisplayConfigMatches(std::cref(stub_display_config)));127 mt::DisplayConfigMatches(std::cref(stub_display_config)));
@@ -130,7 +133,10 @@
130{133{
131void display_change_handler(MirConnection* connection, void* context)134void display_change_handler(MirConnection* connection, void* context)
132{135{
136#pragma GCC diagnostic push
137#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
133 auto configuration = mir_connection_create_display_config(connection);138 auto configuration = mir_connection_create_display_config(connection);
139#pragma GCC diagnostic pop
134140
135 EXPECT_THAT(*configuration,141 EXPECT_THAT(*configuration,
136 mt::DisplayConfigMatches(std::cref(changed_stub_display_config)));142 mt::DisplayConfigMatches(std::cref(changed_stub_display_config)));
@@ -159,6 +165,8 @@
159 // we're emulating a client that is passively subscribed, we will just wait for the display165 // we're emulating a client that is passively subscribed, we will just wait for the display
160 // configuration to change and then will check the new config.166 // configuration to change and then will check the new config.
161167
168#pragma GCC diagnostic push
169#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
162 auto configuration = mir_connection_create_display_config(unsubscribed_connection);170 auto configuration = mir_connection_create_display_config(unsubscribed_connection);
163 while(configuration->num_outputs != changed_stub_display_config.outputs.size())171 while(configuration->num_outputs != changed_stub_display_config.outputs.size())
164 {172 {
@@ -166,6 +174,7 @@
166 std::this_thread::sleep_for(std::chrono::microseconds(500));174 std::this_thread::sleep_for(std::chrono::microseconds(500));
167 configuration = mir_connection_create_display_config(unsubscribed_connection);175 configuration = mir_connection_create_display_config(unsubscribed_connection);
168 }176 }
177#pragma GCC diagnostic pop
169178
170 EXPECT_THAT(*configuration,179 EXPECT_THAT(*configuration,
171 mt::DisplayConfigMatches(std::cref(changed_stub_display_config)));180 mt::DisplayConfigMatches(std::cref(changed_stub_display_config)));
@@ -180,10 +189,12 @@
180 stub_authorizer.allow_configure_display = false;189 stub_authorizer.allow_configure_display = false;
181190
182 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);191 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
183192#pragma GCC diagnostic push
193#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
184 auto configuration = mir_connection_create_display_config(connection);194 auto configuration = mir_connection_create_display_config(connection);
185195
186 mir_wait_for(mir_connection_apply_display_config(connection, configuration));196 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
197#pragma GCC diagnostic pop
187 EXPECT_THAT(mir_connection_get_error_message(connection),198 EXPECT_THAT(mir_connection_get_error_message(connection),
188 testing::HasSubstr("not authorized to apply display configurations"));199 testing::HasSubstr("not authorized to apply display configurations"));
189200
@@ -205,7 +216,10 @@
205 auto const spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);216 auto const spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);
206 surface = mir_surface_create_sync(spec);217 surface = mir_surface_create_sync(spec);
207 mir_surface_spec_release(spec);218 mir_surface_spec_release(spec);
219#pragma GCC diagnostic push
220#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
208 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));221 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
222#pragma GCC diagnostic pop
209 }223 }
210224
211 void disconnect()225 void disconnect()
@@ -230,21 +244,30 @@
230244
231 void apply_config()245 void apply_config()
232 {246 {
247#pragma GCC diagnostic push
248#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
233 auto configuration = mir_connection_create_display_config(connection);249 auto configuration = mir_connection_create_display_config(connection);
234 mir_wait_for(mir_connection_apply_display_config(connection, configuration));250 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
251#pragma GCC diagnostic pop
235 EXPECT_STREQ("", mir_connection_get_error_message(connection));252 EXPECT_STREQ("", mir_connection_get_error_message(connection));
236 mir_display_config_destroy(configuration);253 mir_display_config_destroy(configuration);
237 }254 }
238255
239 std::unique_ptr<MirDisplayConfiguration,void(*)(MirDisplayConfiguration*)> get_base_config()256 std::unique_ptr<MirDisplayConfiguration,void(*)(MirDisplayConfiguration*)> get_base_config()
240 {257 {
258#pragma GCC diagnostic push
259#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
241 return {mir_connection_create_display_config(connection),260 return {mir_connection_create_display_config(connection),
242 mir_display_config_destroy};261 mir_display_config_destroy};
262#pragma GCC diagnostic pop
243 }263 }
244264
245 void set_base_config(MirDisplayConfiguration* configuration)265 void set_base_config(MirDisplayConfiguration* configuration)
246 {266 {
267#pragma GCC diagnostic push
268#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
247 mir_wait_for(mir_connection_set_base_display_config(connection, configuration));269 mir_wait_for(mir_connection_set_base_display_config(connection, configuration));
270#pragma GCC diagnostic pop
248 EXPECT_STREQ("", mir_connection_get_error_message(connection));271 EXPECT_STREQ("", mir_connection_get_error_message(connection));
249 }272 }
250};273};
@@ -281,8 +304,11 @@
281 simple_client.connect();304 simple_client.connect();
282305
283 /* Apply the display config while not focused */306 /* Apply the display config while not focused */
307#pragma GCC diagnostic push
308#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
284 auto const configuration = mir_connection_create_display_config(connection);309 auto const configuration = mir_connection_create_display_config(connection);
285 mir_wait_for(mir_connection_apply_display_config(connection, configuration));310 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
311#pragma GCC diagnostic pop
286 mir_display_config_destroy(configuration);312 mir_display_config_destroy(configuration);
287313
288 wait_for_server_actions_to_finish(*server.the_main_loop());314 wait_for_server_actions_to_finish(*server.the_main_loop());
@@ -366,7 +392,10 @@
366{392{
367 auto context = reinterpret_cast<DisplayConfigMatchingContext*>(ctx);393 auto context = reinterpret_cast<DisplayConfigMatchingContext*>(ctx);
368394
395#pragma GCC diagnostic push
396#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
369 auto config = mir_connection_create_display_config(connection);397 auto config = mir_connection_create_display_config(connection);
398#pragma GCC diagnostic pop
370 context->matcher(config);399 context->matcher(config);
371 mir_display_config_destroy(config);400 mir_display_config_destroy(config);
372 context->done.raise();401 context->done.raise();
@@ -499,8 +528,11 @@
499528
500 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);529 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
501530
531#pragma GCC diagnostic push
532#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
502 auto configuration = mir_connection_create_display_config(connection);533 auto configuration = mir_connection_create_display_config(connection);
503 mir_wait_for(mir_connection_set_base_display_config(connection, configuration));534 mir_wait_for(mir_connection_set_base_display_config(connection, configuration));
535#pragma GCC diagnostic pop
504 EXPECT_THAT(mir_connection_get_error_message(connection),536 EXPECT_THAT(mir_connection_get_error_message(connection),
505 testing::HasSubstr("not authorized to set base display configuration"));537 testing::HasSubstr("not authorized to set base display configuration"));
506538
507539
=== modified file 'tests/acceptance-tests/test_latency.cpp'
--- tests/acceptance-tests/test_latency.cpp 2016-10-19 17:21:54 +0000
+++ tests/acceptance-tests/test_latency.cpp 2016-10-28 13:38:48 +0000
@@ -286,9 +286,12 @@
286{286{
287 using namespace testing;287 using namespace testing;
288288
289#pragma GCC diagnostic push
290#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
289 auto stream = mir_surface_get_buffer_stream(surface);291 auto stream = mir_surface_get_buffer_stream(surface);
290 for(auto i = 0u; i < test_submissions; i++) {292 for(auto i = 0u; i < test_submissions; i++) {
291 auto submission_id = mir_debug_surface_current_buffer_id(surface);293 auto submission_id = mir_debug_surface_current_buffer_id(surface);
294#pragma GCC diagnostic pop
292 stats.record_submission(submission_id);295 stats.record_submission(submission_id);
293 mir_buffer_stream_swap_buffers_sync(stream);296 mir_buffer_stream_swap_buffers_sync(stream);
294 }297 }
@@ -308,9 +311,12 @@
308{311{
309 using namespace testing;312 using namespace testing;
310313
314#pragma GCC diagnostic push
315#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
311 auto stream = mir_surface_get_buffer_stream(surface);316 auto stream = mir_surface_get_buffer_stream(surface);
312 for(auto i = 0u; i < test_submissions; i++) {317 for(auto i = 0u; i < test_submissions; i++) {
313 auto submission_id = mir_debug_surface_current_buffer_id(surface);318 auto submission_id = mir_debug_surface_current_buffer_id(surface);
319#pragma GCC diagnostic pop
314 stats.record_submission(submission_id);320 stats.record_submission(submission_id);
315 mir_buffer_stream_swap_buffers_sync(stream);321 mir_buffer_stream_swap_buffers_sync(stream);
316 }322 }
@@ -326,13 +332,19 @@
326{332{
327 using namespace testing;333 using namespace testing;
328334
335#pragma GCC diagnostic push
336#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
329 auto stream = mir_surface_get_buffer_stream(surface);337 auto stream = mir_surface_get_buffer_stream(surface);
330 mir_buffer_stream_set_swapinterval(stream, 0);338 mir_buffer_stream_set_swapinterval(stream, 0);
339#pragma GCC diagnostic pop
331 stats.swap_interval = 0;340 stats.swap_interval = 0;
332341
333 do342 do
334 {343 {
344#pragma GCC diagnostic push
345#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
335 auto submission_id = mir_debug_surface_current_buffer_id(surface);346 auto submission_id = mir_debug_surface_current_buffer_id(surface);
347#pragma GCC diagnostic pop
336 stats.record_submission(submission_id);348 stats.record_submission(submission_id);
337 mir_buffer_stream_swap_buffers_sync(stream);349 mir_buffer_stream_swap_buffers_sync(stream);
338 } while (!stats.wait_for_posts(test_submissions, std::chrono::seconds(0)));350 } while (!stats.wait_for_posts(test_submissions, std::chrono::seconds(0)));
@@ -352,13 +364,15 @@
352 std::chrono::microseconds const input_interval(1000000/throttled_input_rate);364 std::chrono::microseconds const input_interval(1000000/throttled_input_rate);
353 auto next_input_event = std::chrono::high_resolution_clock::now();365 auto next_input_event = std::chrono::high_resolution_clock::now();
354366
367#pragma GCC diagnostic push
368#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
355 auto stream = mir_surface_get_buffer_stream(surface);369 auto stream = mir_surface_get_buffer_stream(surface);
356 for (auto i = 0u; i < test_submissions; i++)370 for (auto i = 0u; i < test_submissions; i++)
357 {371 {
358 std::this_thread::sleep_until(next_input_event);372 std::this_thread::sleep_until(next_input_event);
359 next_input_event += input_interval;373 next_input_event += input_interval;
360
361 auto submission_id = mir_debug_surface_current_buffer_id(surface);374 auto submission_id = mir_debug_surface_current_buffer_id(surface);
375#pragma GCC diagnostic pop
362 stats.record_submission(submission_id);376 stats.record_submission(submission_id);
363 mir_buffer_stream_swap_buffers_sync(stream);377 mir_buffer_stream_swap_buffers_sync(stream);
364 }378 }
365379
=== modified file 'tests/acceptance-tests/test_mirblob.cpp'
--- tests/acceptance-tests/test_mirblob.cpp 2015-09-03 11:54:34 +0000
+++ tests/acceptance-tests/test_mirblob.cpp 2016-10-28 13:38:48 +0000
@@ -34,7 +34,10 @@
34{34{
35 std::vector<uint8_t> buffer;35 std::vector<uint8_t> buffer;
3636
37#pragma GCC diagnostic push
38#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
37 auto const save_display_config = mir_connection_create_display_config(connection);39 auto const save_display_config = mir_connection_create_display_config(connection);
40#pragma GCC diagnostic pop
3841
39 {42 {
40 auto const save_blob = mir_blob_from_display_configuration(save_display_config);43 auto const save_blob = mir_blob_from_display_configuration(save_display_config);
@@ -55,4 +58,4 @@
5558
56 mir_display_config_destroy(restore_display_config);59 mir_display_config_destroy(restore_display_config);
57 mir_display_config_destroy(save_display_config);60 mir_display_config_destroy(save_display_config);
58}
59\ No newline at end of file61\ No newline at end of file
62}
6063
=== modified file 'tests/acceptance-tests/test_nested_input.cpp'
--- tests/acceptance-tests/test_nested_input.cpp 2016-10-12 06:03:15 +0000
+++ tests/acceptance-tests/test_nested_input.cpp 2016-10-28 13:38:48 +0000
@@ -126,8 +126,11 @@
126 // Ensure the nested server posts a frame126 // Ensure the nested server posts a frame
127 connection = mir_connect_sync(connect_string.c_str(), __PRETTY_FUNCTION__);127 connection = mir_connect_sync(connect_string.c_str(), __PRETTY_FUNCTION__);
128 surface = mtf::make_any_surface(connection);128 surface = mtf::make_any_surface(connection);
129#pragma GCC diagnostic push
130#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
129 mir_surface_set_event_handler(surface, handle_event, this);131 mir_surface_set_event_handler(surface, handle_event, this);
130 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));132 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
133#pragma GCC diagnostic pop
131 }134 }
132135
133 MOCK_METHOD1(handle_input, void(MirEvent const*));136 MOCK_METHOD1(handle_input, void(MirEvent const*));
@@ -166,7 +169,10 @@
166 static void null_event_handler(MirSurface*, MirEvent const*, void*) {};169 static void null_event_handler(MirSurface*, MirEvent const*, void*) {};
167 ~ExposedSurface()170 ~ExposedSurface()
168 {171 {
172#pragma GCC diagnostic push
173#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
169 mir_surface_set_event_handler(surface, null_event_handler, nullptr);174 mir_surface_set_event_handler(surface, null_event_handler, nullptr);
175#pragma GCC diagnostic pop
170 mir_surface_release_sync(surface);176 mir_surface_release_sync(surface);
171 mir_connection_release(connection);177 mir_connection_release(connection);
172 }178 }
173179
=== modified file 'tests/acceptance-tests/test_nested_mir.cpp'
--- tests/acceptance-tests/test_nested_mir.cpp 2016-10-13 14:30:55 +0000
+++ tests/acceptance-tests/test_nested_mir.cpp 2016-10-28 13:38:48 +0000
@@ -413,7 +413,10 @@
413413
414 void wait_until_surface_ready(MirSurface* surface)414 void wait_until_surface_ready(MirSurface* surface)
415 {415 {
416#pragma GCC diagnostic push
417#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
416 mir_surface_set_event_handler(surface, wait_for_key_a_event, this);418 mir_surface_set_event_handler(surface, wait_for_key_a_event, this);
419#pragma GCC diagnostic pop
417420
418 auto const dummy_events_received = mt::spin_wait_for_condition_or_timeout(421 auto const dummy_events_received = mt::spin_wait_for_condition_or_timeout(
419 [this]422 [this]
@@ -429,7 +432,10 @@
429432
430 EXPECT_TRUE(dummy_events_received);433 EXPECT_TRUE(dummy_events_received);
431434
435#pragma GCC diagnostic push
436#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
432 mir_surface_set_event_handler(surface, nullptr, nullptr);437 mir_surface_set_event_handler(surface, nullptr, nullptr);
438#pragma GCC diagnostic pop
433 }439 }
434440
435protected:441protected:
@@ -608,9 +614,12 @@
608614
609 void update_display_configuration(void (*changer)(MirDisplayConfiguration* config))615 void update_display_configuration(void (*changer)(MirDisplayConfiguration* config))
610 {616 {
617#pragma GCC diagnostic push
618#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
611 auto const configuration = mir_connection_create_display_config(connection);619 auto const configuration = mir_connection_create_display_config(connection);
612 changer(configuration);620 changer(configuration);
613 mir_wait_for(mir_connection_apply_display_config(connection, configuration));621 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
622#pragma GCC diagnostic pop
614 mir_display_config_destroy(configuration);623 mir_display_config_destroy(configuration);
615 }624 }
616625
@@ -618,7 +627,10 @@
618 {627 {
619 mt::Signal initial_condition;628 mt::Signal initial_condition;
620629
630#pragma GCC diagnostic push
631#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
621 auto const configuration = mir_connection_create_display_config(connection);632 auto const configuration = mir_connection_create_display_config(connection);
633#pragma GCC diagnostic pop
622634
623 changer(configuration);635 changer(configuration);
624636
@@ -626,8 +638,10 @@
626 .WillRepeatedly(InvokeWithoutArgs([] {}));638 .WillRepeatedly(InvokeWithoutArgs([] {}));
627 EXPECT_CALL(display, configure(mt::DisplayConfigMatches(configuration)))639 EXPECT_CALL(display, configure(mt::DisplayConfigMatches(configuration)))
628 .WillRepeatedly(InvokeWithoutArgs([&] { initial_condition.raise(); }));640 .WillRepeatedly(InvokeWithoutArgs([&] { initial_condition.raise(); }));
629641#pragma GCC diagnostic push
642#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
630 mir_wait_for(mir_connection_apply_display_config(connection, configuration));643 mir_wait_for(mir_connection_apply_display_config(connection, configuration));
644#pragma GCC diagnostic pop
631645
632 initial_condition.wait_for(timeout);646 initial_condition.wait_for(timeout);
633 mir_display_config_destroy(configuration);647 mir_display_config_destroy(configuration);
@@ -654,14 +668,20 @@
654 Client(nested_mir),668 Client(nested_mir),
655 surface(mtf::make_surface(connection, size, format))669 surface(mtf::make_surface(connection, size, format))
656 {670 {
671#pragma GCC diagnostic push
672#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
657 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));673 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
674#pragma GCC diagnostic pop
658 }675 }
659676
660 ClientWithAPaintedSurface(NestedMirRunner& nested_mir) :677 ClientWithAPaintedSurface(NestedMirRunner& nested_mir) :
661 Client(nested_mir),678 Client(nested_mir),
662 surface(mtf::make_any_surface(connection))679 surface(mtf::make_any_surface(connection))
663 {680 {
681#pragma GCC diagnostic push
682#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
664 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));683 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
684#pragma GCC diagnostic pop
665 }685 }
666686
667 ~ClientWithAPaintedSurface()687 ~ClientWithAPaintedSurface()
@@ -683,6 +703,8 @@
683703
684struct ClientWithAPaintedSurfaceAndABufferStream : virtual Client, ClientWithAPaintedSurface704struct ClientWithAPaintedSurfaceAndABufferStream : virtual Client, ClientWithAPaintedSurface
685{705{
706#pragma GCC diagnostic push
707#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
686 ClientWithAPaintedSurfaceAndABufferStream(NestedMirRunner& nested_mir) :708 ClientWithAPaintedSurfaceAndABufferStream(NestedMirRunner& nested_mir) :
687 Client(nested_mir),709 Client(nested_mir),
688 ClientWithAPaintedSurface(nested_mir),710 ClientWithAPaintedSurface(nested_mir),
@@ -694,6 +716,7 @@
694 {716 {
695 mir_buffer_stream_swap_buffers_sync(buffer_stream);717 mir_buffer_stream_swap_buffers_sync(buffer_stream);
696 }718 }
719#pragma GCC diagnostic pop
697720
698 ~ClientWithAPaintedSurfaceAndABufferStream()721 ~ClientWithAPaintedSurfaceAndABufferStream()
699 {722 {
@@ -774,6 +797,8 @@
774 mir_pixel_format_abgr_8888);797 mir_pixel_format_abgr_8888);
775798
776 mt::Signal surface_event_received;799 mt::Signal surface_event_received;
800#pragma GCC diagnostic push
801#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
777 mir_surface_spec_set_event_handler(spec, [](MirSurface*, MirEvent const* event, void* ctx)802 mir_surface_spec_set_event_handler(spec, [](MirSurface*, MirEvent const* event, void* ctx)
778 {803 {
779 if (mir_event_get_type(event) == mir_event_type_surface_output)804 if (mir_event_get_type(event) == mir_event_type_surface_output)
@@ -786,6 +811,7 @@
786 }811 }
787 },812 },
788 &surface_event_received);813 &surface_event_received);
814#pragma GCC diagnostic pop
789815
790 auto surface = mir_surface_create_sync(spec);816 auto surface = mir_surface_create_sync(spec);
791 mir_surface_spec_release(spec);817 mir_surface_spec_release(spec);
@@ -873,7 +899,10 @@
873 .WillOnce(InvokeWithoutArgs([]{}))899 .WillOnce(InvokeWithoutArgs([]{}))
874 .WillOnce(InvokeWithoutArgs([&] { wait.raise(); }));900 .WillOnce(InvokeWithoutArgs([&] { wait.raise(); }));
875901
902#pragma GCC diagnostic push
903#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
876 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));904 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
905#pragma GCC diagnostic pop
877906
878 wait.wait_for(timeout);907 wait.wait_for(timeout);
879 Mock::VerifyAndClearExpectations(mock_session_mediator_report.get());908 Mock::VerifyAndClearExpectations(mock_session_mediator_report.get());
@@ -926,7 +955,10 @@
926955
927 ClientWithAPaintedSurface client(nested_mir);956 ClientWithAPaintedSurface client(nested_mir);
928957
958#pragma GCC diagnostic push
959#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
929 auto const configuration = mir_connection_create_display_config(client.connection);960 auto const configuration = mir_connection_create_display_config(client.connection);
961#pragma GCC diagnostic pop
930962
931 for (auto new_orientation :963 for (auto new_orientation :
932 {mir_orientation_left, mir_orientation_right, mir_orientation_inverted, mir_orientation_normal,964 {mir_orientation_left, mir_orientation_right, mir_orientation_inverted, mir_orientation_normal,
@@ -942,8 +974,10 @@
942974
943 EXPECT_CALL(*the_mock_display_configuration_report(), new_configuration(mt::DisplayConfigMatches(configuration)))975 EXPECT_CALL(*the_mock_display_configuration_report(), new_configuration(mt::DisplayConfigMatches(configuration)))
944 .WillRepeatedly(InvokeWithoutArgs([&] { config_reported.raise(); }));976 .WillRepeatedly(InvokeWithoutArgs([&] { config_reported.raise(); }));
945977#pragma GCC diagnostic push
978#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
946 mir_wait_for(mir_connection_apply_display_config(client.connection, configuration));979 mir_wait_for(mir_connection_apply_display_config(client.connection, configuration));
980#pragma GCC diagnostic pop
947981
948 config_reported.wait_for(timeout);982 config_reported.wait_for(timeout);
949 Mock::VerifyAndClearExpectations(the_mock_display_configuration_report().get());983 Mock::VerifyAndClearExpectations(the_mock_display_configuration_report().get());
@@ -978,7 +1012,10 @@
978 }));1012 }));
9791013
980 auto conf = mir_cursor_configuration_from_buffer_stream(client.buffer_stream, 0, 0);1014 auto conf = mir_cursor_configuration_from_buffer_stream(client.buffer_stream, 0, 0);
1015#pragma GCC diagnostic push
1016#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
981 mir_wait_for(mir_surface_configure_cursor(client.surface, conf));1017 mir_wait_for(mir_surface_configure_cursor(client.surface, conf));
1018#pragma GCC diagnostic pop
982 mir_cursor_configuration_destroy(conf);1019 mir_cursor_configuration_destroy(conf);
9831020
984 EXPECT_TRUE(condition.wait_for(timeout));1021 EXPECT_TRUE(condition.wait_for(timeout));
@@ -1028,7 +1065,10 @@
1028 for (auto const name : cursor_names)1065 for (auto const name : cursor_names)
1029 {1066 {
1030 auto const cursor = mir_cursor_configuration_from_name(name);1067 auto const cursor = mir_cursor_configuration_from_name(name);
1068#pragma GCC diagnostic push
1069#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1031 mir_wait_for(mir_surface_configure_cursor(client.surface, cursor));1070 mir_wait_for(mir_surface_configure_cursor(client.surface, cursor));
1071#pragma GCC diagnostic pop
1032 mir_cursor_configuration_destroy(cursor);1072 mir_cursor_configuration_destroy(cursor);
10331073
1034 EXPECT_TRUE(condition.wait_for(long_timeout));1074 EXPECT_TRUE(condition.wait_for(long_timeout));
@@ -1059,7 +1099,10 @@
1059 .WillOnce(mt::WakeUp(&condition));1099 .WillOnce(mt::WakeUp(&condition));
10601100
1061 auto conf = mir_cursor_configuration_from_buffer_stream(client.buffer_stream, 0, 0);1101 auto conf = mir_cursor_configuration_from_buffer_stream(client.buffer_stream, 0, 0);
1102#pragma GCC diagnostic push
1103#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1062 mir_wait_for(mir_surface_configure_cursor(client.surface, conf));1104 mir_wait_for(mir_surface_configure_cursor(client.surface, conf));
1105#pragma GCC diagnostic pop
1063 mir_cursor_configuration_destroy(conf);1106 mir_cursor_configuration_destroy(conf);
10641107
1065 std::this_thread::sleep_for(500ms);1108 std::this_thread::sleep_for(500ms);
@@ -1258,7 +1301,10 @@
12581301
1259 ASSERT_TRUE(client_config_changed.raised());1302 ASSERT_TRUE(client_config_changed.raised());
12601303
1304#pragma GCC diagnostic push
1305#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1261 auto const configuration = mir_connection_create_display_config(client.connection);1306 auto const configuration = mir_connection_create_display_config(client.connection);
1307#pragma GCC diagnostic pop
12621308
1263 EXPECT_THAT(configuration, mt::DisplayConfigMatches(*new_config));1309 EXPECT_THAT(configuration, mt::DisplayConfigMatches(*new_config));
12641310
@@ -1359,7 +1405,10 @@
1359 expected_config.for_each_output([](mg::UserDisplayConfigurationOutput& output)1405 expected_config.for_each_output([](mg::UserDisplayConfigurationOutput& output)
1360 { output.top_left = {0, 0}; });1406 { output.top_left = {0, 0}; });
13611407
1408#pragma GCC diagnostic push
1409#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1362 auto const configuration = mir_connection_create_display_config(client.connection);1410 auto const configuration = mir_connection_create_display_config(client.connection);
1411#pragma GCC diagnostic pop
13631412
1364 EXPECT_THAT(configuration, mt::DisplayConfigMatches(expected_config));1413 EXPECT_THAT(configuration, mt::DisplayConfigMatches(expected_config));
13651414
@@ -1471,7 +1520,10 @@
14711520
1472 EXPECT_TRUE(condition.raised());1521 EXPECT_TRUE(condition.raised());
14731522
1523#pragma GCC diagnostic push
1524#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1474 auto const configuration = mir_connection_create_display_config(client.connection);1525 auto const configuration = mir_connection_create_display_config(client.connection);
1526#pragma GCC diagnostic pop
14751527
1476 EXPECT_THAT(configuration, mt::DisplayConfigMatches(*new_config));1528 EXPECT_THAT(configuration, mt::DisplayConfigMatches(*new_config));
14771529
14781530
=== modified file 'tests/acceptance-tests/test_new_display_configuration.cpp'
--- tests/acceptance-tests/test_new_display_configuration.cpp 2016-10-12 06:03:15 +0000
+++ tests/acceptance-tests/test_new_display_configuration.cpp 2016-10-28 13:38:48 +0000
@@ -200,7 +200,10 @@
200 auto const spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);200 auto const spec = mir_connection_create_spec_for_normal_surface(connection, 100, 100, mir_pixel_format_abgr_8888);
201 surface = mir_surface_create_sync(spec);201 surface = mir_surface_create_sync(spec);
202 mir_surface_spec_release(spec);202 mir_surface_spec_release(spec);
203#pragma GCC diagnostic push
204#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
203 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));205 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
206#pragma GCC diagnostic pop
204 }207 }
205208
206 void disconnect()209 void disconnect()
207210
=== modified file 'tests/acceptance-tests/test_render_override.cpp'
--- tests/acceptance-tests/test_render_override.cpp 2015-06-17 05:20:42 +0000
+++ tests/acceptance-tests/test_render_override.cpp 2016-10-28 13:38:48 +0000
@@ -126,7 +126,10 @@
126TEST_F(DisplayBufferCompositorOverride, composite_called_with_surface)126TEST_F(DisplayBufferCompositorOverride, composite_called_with_surface)
127{127{
128 MirSurfaceParameters surface_params;128 MirSurfaceParameters surface_params;
129#pragma GCC diagnostic push
130#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
129 mir_surface_get_parameters(surface, &surface_params);131 mir_surface_get_parameters(surface, &surface_params);
130 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));132 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
133#pragma GCC diagnostic pop
131 EXPECT_TRUE(tracker->wait_until_surface_is_rendered_with_size({surface_params.width, surface_params.height}));134 EXPECT_TRUE(tracker->wait_until_surface_is_rendered_with_size({surface_params.width, surface_params.height}));
132}135}
133136
=== modified file 'tests/acceptance-tests/test_server_disconnect.cpp'
--- tests/acceptance-tests/test_server_disconnect.cpp 2016-08-25 01:11:51 +0000
+++ tests/acceptance-tests/test_server_disconnect.cpp 2016-10-28 13:38:48 +0000
@@ -86,8 +86,11 @@
8686
87 while (!signalled.load() && clock::now() < time_limit)87 while (!signalled.load() && clock::now() < time_limit)
88 {88 {
89#pragma GCC diagnostic push
90#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
89 mir_buffer_stream_swap_buffers_sync(91 mir_buffer_stream_swap_buffers_sync(
90 mir_surface_get_buffer_stream(surface));92 mir_surface_get_buffer_stream(surface));
93#pragma GCC diagnostic pop
91 }94 }
9295
93 mir_surface_release_sync(surface);96 mir_surface_release_sync(surface);
@@ -130,8 +133,11 @@
130 });133 });
131134
132 configure_display.exec([&] {135 configure_display.exec([&] {
136#pragma GCC diagnostic push
137#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
133 auto config = mir_connection_create_display_config(connection);138 auto config = mir_connection_create_display_config(connection);
134 mir_wait_for(mir_connection_apply_display_config(connection, config));139 mir_wait_for(mir_connection_apply_display_config(connection, config));
140#pragma GCC diagnostic pop
135 mir_display_config_destroy(config);141 mir_display_config_destroy(config);
136 });142 });
137143
138144
=== modified file 'tests/acceptance-tests/test_session_mediator_report.cpp'
--- tests/acceptance-tests/test_session_mediator_report.cpp 2016-10-05 08:42:26 +0000
+++ tests/acceptance-tests/test_session_mediator_report.cpp 2016-10-28 13:38:48 +0000
@@ -136,7 +136,10 @@
136 connect_client();136 connect_client();
137137
138 auto const surface = mtf::make_any_surface(connection);138 auto const surface = mtf::make_any_surface(connection);
139#pragma GCC diagnostic push
140#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
139 auto const buffer_stream = mir_surface_get_buffer_stream(surface);141 auto const buffer_stream = mir_surface_get_buffer_stream(surface);
142#pragma GCC diagnostic pop
140 mir_buffer_stream_swap_buffers_sync(buffer_stream);143 mir_buffer_stream_swap_buffers_sync(buffer_stream);
141 mir_surface_release_sync(surface);144 mir_surface_release_sync(surface);
142}145}
@@ -160,8 +163,11 @@
160 connect_client();163 connect_client();
161164
162 EXPECT_CALL(report, session_create_buffer_stream_called(_));165 EXPECT_CALL(report, session_create_buffer_stream_called(_));
166#pragma GCC diagnostic push
167#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
163 auto const buffer_stream = mir_connection_create_buffer_stream_sync(connection,168 auto const buffer_stream = mir_connection_create_buffer_stream_sync(connection,
164 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);169 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);
170#pragma GCC diagnostic pop
165 testing::Mock::VerifyAndClearExpectations(&report);171 testing::Mock::VerifyAndClearExpectations(&report);
166172
167 EXPECT_CALL(report, session_release_buffer_stream_called(_));173 EXPECT_CALL(report, session_release_buffer_stream_called(_));
168174
=== modified file 'tests/acceptance-tests/test_surface_modifications.cpp'
--- tests/acceptance-tests/test_surface_modifications.cpp 2016-04-19 07:47:24 +0000
+++ tests/acceptance-tests/test_surface_modifications.cpp 2016-10-28 13:38:48 +0000
@@ -71,7 +71,10 @@
71 scene_surface->add_observer(mt::fake_shared(surface_observer));71 scene_surface->add_observer(mt::fake_shared(surface_observer));
7272
73 // Swap buffers to ensure surface is visible for event based tests73 // Swap buffers to ensure surface is visible for event based tests
74#pragma GCC diagnostic push
75#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
74 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));76 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
77#pragma GCC diagnostic pop
75 }78 }
7679
77 void generate_alt_click_at(Point const& click_position)80 void generate_alt_click_at(Point const& click_position)
@@ -527,7 +530,10 @@
527530
528 apply_changes([&](MirSurfaceSpec* spec)531 apply_changes([&](MirSurfaceSpec* spec)
529 {532 {
533#pragma GCC diagnostic push
534#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
530 mir_surface_spec_set_state(spec, new_state);535 mir_surface_spec_set_state(spec, new_state);
536#pragma GCC diagnostic pop
531 });537 });
532}538}
533539
@@ -541,12 +547,18 @@
541547
542 apply_changes([&](MirSurfaceSpec* spec)548 apply_changes([&](MirSurfaceSpec* spec)
543 {549 {
550#pragma GCC diagnostic push
551#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
544 mir_surface_spec_set_state(spec, initial_state);552 mir_surface_spec_set_state(spec, initial_state);
553#pragma GCC diagnostic pop
545 });554 });
546555
547 apply_changes([&](MirSurfaceSpec* spec)556 apply_changes([&](MirSurfaceSpec* spec)
548 {557 {
558#pragma GCC diagnostic push
559#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
549 mir_surface_spec_set_state(spec, new_state);560 mir_surface_spec_set_state(spec, new_state);
561#pragma GCC diagnostic pop
550 });562 });
551}563}
552564
@@ -572,8 +584,11 @@
572 EXPECT_CALL(surface_observer, hidden_set_to(is_visible(initial_state)));584 EXPECT_CALL(surface_observer, hidden_set_to(is_visible(initial_state)));
573 EXPECT_CALL(surface_observer, hidden_set_to(is_visible(new_state)));585 EXPECT_CALL(surface_observer, hidden_set_to(is_visible(new_state)));
574586
587#pragma GCC diagnostic push
588#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
575 mir_wait_for(mir_surface_set_state(surface, initial_state));589 mir_wait_for(mir_surface_set_state(surface, initial_state));
576 mir_wait_for(mir_surface_set_state(surface, new_state));590 mir_wait_for(mir_surface_set_state(surface, new_state));
591#pragma GCC diagnostic pop
577}592}
578593
579INSTANTIATE_TEST_CASE_P(SurfaceModifications, SurfaceStateCase,594INSTANTIATE_TEST_CASE_P(SurfaceModifications, SurfaceStateCase,
580595
=== modified file 'tests/acceptance-tests/test_surface_morphing.cpp'
--- tests/acceptance-tests/test_surface_morphing.cpp 2016-01-29 08:18:22 +0000
+++ tests/acceptance-tests/test_surface_morphing.cpp 2016-10-28 13:38:48 +0000
@@ -181,8 +181,11 @@
181 mir_surface_spec_set_type(spec, old_type);181 mir_surface_spec_set_type(spec, old_type);
182 mir_surface_spec_set_width(spec, width);182 mir_surface_spec_set_width(spec, width);
183 mir_surface_spec_set_height(spec, height);183 mir_surface_spec_set_height(spec, height);
184#pragma GCC diagnostic push
185#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
184 mir_surface_spec_set_pixel_format(spec, pixel_format);186 mir_surface_spec_set_pixel_format(spec, pixel_format);
185 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);187 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
188#pragma GCC diagnostic pop
186 });189 });
187190
188 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));191 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
@@ -206,8 +209,11 @@
206 mir_surface_spec_set_type(spec, mir_surface_type_normal);209 mir_surface_spec_set_type(spec, mir_surface_type_normal);
207 mir_surface_spec_set_width(spec, width);210 mir_surface_spec_set_width(spec, width);
208 mir_surface_spec_set_height(spec, height);211 mir_surface_spec_set_height(spec, height);
212#pragma GCC diagnostic push
213#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
209 mir_surface_spec_set_pixel_format(spec, pixel_format);214 mir_surface_spec_set_pixel_format(spec, pixel_format);
210 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);215 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
216#pragma GCC diagnostic pop
211 });217 });
212218
213 auto const surface = create_surface([&](MirSurfaceSpec* spec)219 auto const surface = create_surface([&](MirSurfaceSpec* spec)
@@ -215,8 +221,11 @@
215 mir_surface_spec_set_type(spec, old_type);221 mir_surface_spec_set_type(spec, old_type);
216 mir_surface_spec_set_width(spec, width);222 mir_surface_spec_set_width(spec, width);
217 mir_surface_spec_set_height(spec, height);223 mir_surface_spec_set_height(spec, height);
224#pragma GCC diagnostic push
225#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
218 mir_surface_spec_set_pixel_format(spec, pixel_format);226 mir_surface_spec_set_pixel_format(spec, pixel_format);
219 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);227 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
228#pragma GCC diagnostic pop
220 });229 });
221230
222 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));231 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
@@ -247,8 +256,11 @@
247 mir_surface_spec_set_type(spec, mir_surface_type_normal);256 mir_surface_spec_set_type(spec, mir_surface_type_normal);
248 mir_surface_spec_set_width(spec, width);257 mir_surface_spec_set_width(spec, width);
249 mir_surface_spec_set_height(spec, height);258 mir_surface_spec_set_height(spec, height);
259#pragma GCC diagnostic push
260#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
250 mir_surface_spec_set_pixel_format(spec, pixel_format);261 mir_surface_spec_set_pixel_format(spec, pixel_format);
251 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);262 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
263#pragma GCC diagnostic pop
252 });264 });
253265
254 auto const surface = create_surface([&](MirSurfaceSpec* spec)266 auto const surface = create_surface([&](MirSurfaceSpec* spec)
@@ -256,8 +268,11 @@
256 mir_surface_spec_set_type(spec, old_type);268 mir_surface_spec_set_type(spec, old_type);
257 mir_surface_spec_set_width(spec, width);269 mir_surface_spec_set_width(spec, width);
258 mir_surface_spec_set_height(spec, height);270 mir_surface_spec_set_height(spec, height);
271#pragma GCC diagnostic push
272#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
259 mir_surface_spec_set_pixel_format(spec, pixel_format);273 mir_surface_spec_set_pixel_format(spec, pixel_format);
260 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);274 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
275#pragma GCC diagnostic pop
261 });276 });
262277
263 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));278 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
@@ -282,8 +297,11 @@
282 mir_surface_spec_set_type(spec, old_type);297 mir_surface_spec_set_type(spec, old_type);
283 mir_surface_spec_set_width(spec, width);298 mir_surface_spec_set_width(spec, width);
284 mir_surface_spec_set_height(spec, height);299 mir_surface_spec_set_height(spec, height);
300#pragma GCC diagnostic push
301#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
285 mir_surface_spec_set_pixel_format(spec, pixel_format);302 mir_surface_spec_set_pixel_format(spec, pixel_format);
286 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);303 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
304#pragma GCC diagnostic pop
287 });305 });
288306
289 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));307 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
@@ -313,8 +331,11 @@
313 mir_surface_spec_set_type(spec, mir_surface_type_normal);331 mir_surface_spec_set_type(spec, mir_surface_type_normal);
314 mir_surface_spec_set_width(spec, width);332 mir_surface_spec_set_width(spec, width);
315 mir_surface_spec_set_height(spec, height);333 mir_surface_spec_set_height(spec, height);
334#pragma GCC diagnostic push
335#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
316 mir_surface_spec_set_pixel_format(spec, pixel_format);336 mir_surface_spec_set_pixel_format(spec, pixel_format);
317 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);337 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
338#pragma GCC diagnostic pop
318 });339 });
319340
320 auto const surface = create_surface([&](MirSurfaceSpec* spec)341 auto const surface = create_surface([&](MirSurfaceSpec* spec)
@@ -322,8 +343,11 @@
322 mir_surface_spec_set_type(spec, old_type);343 mir_surface_spec_set_type(spec, old_type);
323 mir_surface_spec_set_width(spec, width);344 mir_surface_spec_set_width(spec, width);
324 mir_surface_spec_set_height(spec, height);345 mir_surface_spec_set_height(spec, height);
346#pragma GCC diagnostic push
347#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
325 mir_surface_spec_set_pixel_format(spec, pixel_format);348 mir_surface_spec_set_pixel_format(spec, pixel_format);
326 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);349 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
350#pragma GCC diagnostic pop
327 });351 });
328352
329 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));353 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
@@ -348,8 +372,11 @@
348 mir_surface_spec_set_type(spec, mir_surface_type_normal);372 mir_surface_spec_set_type(spec, mir_surface_type_normal);
349 mir_surface_spec_set_width(spec, width);373 mir_surface_spec_set_width(spec, width);
350 mir_surface_spec_set_height(spec, height);374 mir_surface_spec_set_height(spec, height);
375#pragma GCC diagnostic push
376#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
351 mir_surface_spec_set_pixel_format(spec, pixel_format);377 mir_surface_spec_set_pixel_format(spec, pixel_format);
352 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);378 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
379#pragma GCC diagnostic pop
353 });380 });
354381
355 auto const surface = create_surface([&](MirSurfaceSpec* spec)382 auto const surface = create_surface([&](MirSurfaceSpec* spec)
@@ -357,8 +384,11 @@
357 mir_surface_spec_set_type(spec, old_type);384 mir_surface_spec_set_type(spec, old_type);
358 mir_surface_spec_set_width(spec, width);385 mir_surface_spec_set_width(spec, width);
359 mir_surface_spec_set_height(spec, height);386 mir_surface_spec_set_height(spec, height);
387#pragma GCC diagnostic push
388#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
360 mir_surface_spec_set_pixel_format(spec, pixel_format);389 mir_surface_spec_set_pixel_format(spec, pixel_format);
361 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);390 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
391#pragma GCC diagnostic pop
362 });392 });
363393
364 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));394 latest_shell_surface()->add_observer(mt::fake_shared(surface_observer));
365395
=== modified file 'tests/acceptance-tests/test_surface_placement.cpp'
--- tests/acceptance-tests/test_surface_placement.cpp 2016-06-20 17:10:33 +0000
+++ tests/acceptance-tests/test_surface_placement.cpp 2016-10-28 13:38:48 +0000
@@ -479,8 +479,11 @@
479 mir_surface_spec_set_type(spec, GetParam());479 mir_surface_spec_set_type(spec, GetParam());
480 mir_surface_spec_set_width(spec, width);480 mir_surface_spec_set_width(spec, width);
481 mir_surface_spec_set_height(spec, height);481 mir_surface_spec_set_height(spec, height);
482#pragma GCC diagnostic push
483#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
482 mir_surface_spec_set_pixel_format(spec, pixel_format);484 mir_surface_spec_set_pixel_format(spec, pixel_format);
483 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);485 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
486#pragma GCC diagnostic pop
484 });487 });
485488
486 auto const shell_surface = latest_shell_surface();489 auto const shell_surface = latest_shell_surface();
@@ -540,8 +543,11 @@
540 mir_surface_spec_set_type(spec, GetParam());543 mir_surface_spec_set_type(spec, GetParam());
541 mir_surface_spec_set_width(spec, width);544 mir_surface_spec_set_width(spec, width);
542 mir_surface_spec_set_height(spec, height);545 mir_surface_spec_set_height(spec, height);
546#pragma GCC diagnostic push
547#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
543 mir_surface_spec_set_pixel_format(spec, pixel_format);548 mir_surface_spec_set_pixel_format(spec, pixel_format);
544 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);549 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
550#pragma GCC diagnostic pop
545 mir_surface_spec_set_parent(spec, parent);551 mir_surface_spec_set_parent(spec, parent);
546 });552 });
547553
548554
=== modified file 'tests/acceptance-tests/test_surface_raise.cpp'
--- tests/acceptance-tests/test_surface_raise.cpp 2016-07-18 07:38:38 +0000
+++ tests/acceptance-tests/test_surface_raise.cpp 2016-10-28 13:38:48 +0000
@@ -53,6 +53,8 @@
53 ConnectedClientHeadlessServer::SetUp();53 ConnectedClientHeadlessServer::SetUp();
5454
55 surface1 = mtf::make_any_surface(connection);55 surface1 = mtf::make_any_surface(connection);
56#pragma GCC diagnostic push
57#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
56 mir_surface_set_event_handler(surface1, &cookie_capturing_callback, this);58 mir_surface_set_event_handler(surface1, &cookie_capturing_callback, this);
57 mir_buffer_stream_swap_buffers_sync(59 mir_buffer_stream_swap_buffers_sync(
58 mir_surface_get_buffer_stream(surface1));60 mir_surface_get_buffer_stream(surface1));
@@ -61,6 +63,7 @@
61 mir_surface_set_event_handler(surface2, &cookie_capturing_callback, this);63 mir_surface_set_event_handler(surface2, &cookie_capturing_callback, this);
62 mir_buffer_stream_swap_buffers_sync(64 mir_buffer_stream_swap_buffers_sync(
63 mir_surface_get_buffer_stream(surface2));65 mir_surface_get_buffer_stream(surface2));
66#pragma GCC diagnostic pop
6467
65 // Need fullscreen for the cursor events68 // Need fullscreen for the cursor events
66 auto const spec = mir_connection_create_spec_for_changes(connection);69 auto const spec = mir_connection_create_spec_for_changes(connection);
@@ -68,12 +71,15 @@
68 mir_surface_apply_spec(surface1, spec);71 mir_surface_apply_spec(surface1, spec);
69 mir_surface_apply_spec(surface2, spec);72 mir_surface_apply_spec(surface2, spec);
70 mir_surface_spec_release(spec);73 mir_surface_spec_release(spec);
71 74
72 bool surface_fullscreen = mt::spin_wait_for_condition_or_timeout(75 bool surface_fullscreen = mt::spin_wait_for_condition_or_timeout(
73 [this]76 [this]
74 {77 {
78#pragma GCC diagnostic push
79#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
75 return mir_surface_get_state(surface1) == mir_surface_state_fullscreen &&80 return mir_surface_get_state(surface1) == mir_surface_state_fullscreen &&
76 mir_surface_get_state(surface2) == mir_surface_state_fullscreen;81 mir_surface_get_state(surface2) == mir_surface_state_fullscreen;
82#pragma GCC diagnostic pop
77 },83 },
78 std::chrono::seconds{max_wait});84 std::chrono::seconds{max_wait});
7985
8086
=== modified file 'tests/acceptance-tests/test_surface_specification.cpp'
--- tests/acceptance-tests/test_surface_specification.cpp 2016-04-19 07:47:24 +0000
+++ tests/acceptance-tests/test_surface_specification.cpp 2016-10-28 13:38:48 +0000
@@ -213,8 +213,11 @@
213 mir_surface_spec_set_type(spec, mir_surface_type_normal);213 mir_surface_spec_set_type(spec, mir_surface_type_normal);
214 mir_surface_spec_set_width(spec, width);214 mir_surface_spec_set_width(spec, width);
215 mir_surface_spec_set_height(spec, height);215 mir_surface_spec_set_height(spec, height);
216#pragma GCC diagnostic push
217#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
216 mir_surface_spec_set_pixel_format(spec, pixel_format);218 mir_surface_spec_set_pixel_format(spec, pixel_format);
217 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);219 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
220#pragma GCC diagnostic pop
218 mir_surface_spec_set_min_width(spec, min_width);221 mir_surface_spec_set_min_width(spec, min_width);
219 });222 });
220223
@@ -238,8 +241,11 @@
238 mir_surface_spec_set_type(spec, mir_surface_type_normal);241 mir_surface_spec_set_type(spec, mir_surface_type_normal);
239 mir_surface_spec_set_width(spec, width);242 mir_surface_spec_set_width(spec, width);
240 mir_surface_spec_set_height(spec, height);243 mir_surface_spec_set_height(spec, height);
244#pragma GCC diagnostic push
245#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
241 mir_surface_spec_set_pixel_format(spec, pixel_format);246 mir_surface_spec_set_pixel_format(spec, pixel_format);
242 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);247 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
248#pragma GCC diagnostic pop
243 mir_surface_spec_set_min_height(spec, min_height);249 mir_surface_spec_set_min_height(spec, min_height);
244 });250 });
245251
@@ -263,8 +269,11 @@
263 mir_surface_spec_set_type(spec, mir_surface_type_normal);269 mir_surface_spec_set_type(spec, mir_surface_type_normal);
264 mir_surface_spec_set_width(spec, width);270 mir_surface_spec_set_width(spec, width);
265 mir_surface_spec_set_height(spec, height);271 mir_surface_spec_set_height(spec, height);
272#pragma GCC diagnostic push
273#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
266 mir_surface_spec_set_pixel_format(spec, pixel_format);274 mir_surface_spec_set_pixel_format(spec, pixel_format);
267 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);275 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
276#pragma GCC diagnostic pop
268 mir_surface_spec_set_max_width(spec, max_width);277 mir_surface_spec_set_max_width(spec, max_width);
269 });278 });
270279
@@ -288,8 +297,11 @@
288 mir_surface_spec_set_type(spec, mir_surface_type_normal);297 mir_surface_spec_set_type(spec, mir_surface_type_normal);
289 mir_surface_spec_set_width(spec, width);298 mir_surface_spec_set_width(spec, width);
290 mir_surface_spec_set_height(spec, height);299 mir_surface_spec_set_height(spec, height);
300#pragma GCC diagnostic push
301#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
291 mir_surface_spec_set_pixel_format(spec, pixel_format);302 mir_surface_spec_set_pixel_format(spec, pixel_format);
292 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);303 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
304#pragma GCC diagnostic pop
293 mir_surface_spec_set_max_height(spec, max_height);305 mir_surface_spec_set_max_height(spec, max_height);
294 });306 });
295307
@@ -313,8 +325,11 @@
313 mir_surface_spec_set_type(spec, mir_surface_type_normal);325 mir_surface_spec_set_type(spec, mir_surface_type_normal);
314 mir_surface_spec_set_width(spec, width);326 mir_surface_spec_set_width(spec, width);
315 mir_surface_spec_set_height(spec, height);327 mir_surface_spec_set_height(spec, height);
328#pragma GCC diagnostic push
329#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
316 mir_surface_spec_set_pixel_format(spec, pixel_format);330 mir_surface_spec_set_pixel_format(spec, pixel_format);
317 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);331 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
332#pragma GCC diagnostic pop
318 mir_surface_spec_set_width_increment(spec, width_inc);333 mir_surface_spec_set_width_increment(spec, width_inc);
319 });334 });
320335
@@ -342,8 +357,11 @@
342 mir_surface_spec_set_type(spec, mir_surface_type_normal);357 mir_surface_spec_set_type(spec, mir_surface_type_normal);
343 mir_surface_spec_set_width(spec, width);358 mir_surface_spec_set_width(spec, width);
344 mir_surface_spec_set_height(spec, height);359 mir_surface_spec_set_height(spec, height);
360#pragma GCC diagnostic push
361#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
345 mir_surface_spec_set_pixel_format(spec, pixel_format);362 mir_surface_spec_set_pixel_format(spec, pixel_format);
346 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);363 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
364#pragma GCC diagnostic pop
347 mir_surface_spec_set_width_increment(spec, width_inc);365 mir_surface_spec_set_width_increment(spec, width_inc);
348 mir_surface_spec_set_min_width(spec, min_width);366 mir_surface_spec_set_min_width(spec, min_width);
349 });367 });
@@ -371,8 +389,11 @@
371 mir_surface_spec_set_type(spec, mir_surface_type_normal);389 mir_surface_spec_set_type(spec, mir_surface_type_normal);
372 mir_surface_spec_set_width(spec, width);390 mir_surface_spec_set_width(spec, width);
373 mir_surface_spec_set_height(spec, height);391 mir_surface_spec_set_height(spec, height);
392#pragma GCC diagnostic push
393#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
374 mir_surface_spec_set_pixel_format(spec, pixel_format);394 mir_surface_spec_set_pixel_format(spec, pixel_format);
375 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);395 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
396#pragma GCC diagnostic pop
376 mir_surface_spec_set_height_increment(spec, height_inc);397 mir_surface_spec_set_height_increment(spec, height_inc);
377 });398 });
378399
@@ -400,8 +421,11 @@
400 mir_surface_spec_set_type(spec, mir_surface_type_normal);421 mir_surface_spec_set_type(spec, mir_surface_type_normal);
401 mir_surface_spec_set_width(spec, width);422 mir_surface_spec_set_width(spec, width);
402 mir_surface_spec_set_height(spec, height);423 mir_surface_spec_set_height(spec, height);
424#pragma GCC diagnostic push
425#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
403 mir_surface_spec_set_pixel_format(spec, pixel_format);426 mir_surface_spec_set_pixel_format(spec, pixel_format);
404 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);427 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
428#pragma GCC diagnostic pop
405 mir_surface_spec_set_height_increment(spec, height_inc);429 mir_surface_spec_set_height_increment(spec, height_inc);
406 mir_surface_spec_set_min_height(spec, min_height);430 mir_surface_spec_set_min_height(spec, min_height);
407 });431 });
@@ -430,8 +454,11 @@
430 mir_surface_spec_set_type(spec, mir_surface_type_normal);454 mir_surface_spec_set_type(spec, mir_surface_type_normal);
431 mir_surface_spec_set_width(spec, width);455 mir_surface_spec_set_width(spec, width);
432 mir_surface_spec_set_height(spec, height);456 mir_surface_spec_set_height(spec, height);
457#pragma GCC diagnostic push
458#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
433 mir_surface_spec_set_pixel_format(spec, pixel_format);459 mir_surface_spec_set_pixel_format(spec, pixel_format);
434 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);460 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
461#pragma GCC diagnostic pop
435 mir_surface_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height);462 mir_surface_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height);
436 });463 });
437464
@@ -460,8 +487,11 @@
460 mir_surface_spec_set_type(spec, mir_surface_type_normal);487 mir_surface_spec_set_type(spec, mir_surface_type_normal);
461 mir_surface_spec_set_width(spec, width);488 mir_surface_spec_set_width(spec, width);
462 mir_surface_spec_set_height(spec, height);489 mir_surface_spec_set_height(spec, height);
490#pragma GCC diagnostic push
491#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
463 mir_surface_spec_set_pixel_format(spec, pixel_format);492 mir_surface_spec_set_pixel_format(spec, pixel_format);
464 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);493 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
494#pragma GCC diagnostic pop
465 mir_surface_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height);495 mir_surface_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height);
466 });496 });
467497
@@ -497,8 +527,11 @@
497 mir_surface_spec_set_type(spec, mir_surface_type_normal);527 mir_surface_spec_set_type(spec, mir_surface_type_normal);
498 mir_surface_spec_set_width(spec, width);528 mir_surface_spec_set_width(spec, width);
499 mir_surface_spec_set_height(spec, height);529 mir_surface_spec_set_height(spec, height);
530#pragma GCC diagnostic push
531#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
500 mir_surface_spec_set_pixel_format(spec, pixel_format);532 mir_surface_spec_set_pixel_format(spec, pixel_format);
501 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);533 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
534#pragma GCC diagnostic pop
502535
503 mir_surface_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height);536 mir_surface_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height);
504 mir_surface_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height);537 mir_surface_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height);
@@ -551,8 +584,11 @@
551 mir_surface_spec_set_type(spec, type);584 mir_surface_spec_set_type(spec, type);
552 mir_surface_spec_set_width(spec, width);585 mir_surface_spec_set_width(spec, width);
553 mir_surface_spec_set_height(spec, height);586 mir_surface_spec_set_height(spec, height);
587#pragma GCC diagnostic push
588#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
554 mir_surface_spec_set_pixel_format(spec, pixel_format);589 mir_surface_spec_set_pixel_format(spec, pixel_format);
555 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);590 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
591#pragma GCC diagnostic pop
556 });592 });
557593
558 EXPECT_THAT(surface, IsValidSurface());594 EXPECT_THAT(surface, IsValidSurface());
@@ -567,8 +603,11 @@
567 mir_surface_spec_set_type(spec, mir_surface_type_normal);603 mir_surface_spec_set_type(spec, mir_surface_type_normal);
568 mir_surface_spec_set_width(spec, width);604 mir_surface_spec_set_width(spec, width);
569 mir_surface_spec_set_height(spec, height);605 mir_surface_spec_set_height(spec, height);
606#pragma GCC diagnostic push
607#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
570 mir_surface_spec_set_pixel_format(spec, pixel_format);608 mir_surface_spec_set_pixel_format(spec, pixel_format);
571 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);609 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
610#pragma GCC diagnostic pop
572 });611 });
573612
574 auto const surface = create_surface([&](MirSurfaceSpec* spec)613 auto const surface = create_surface([&](MirSurfaceSpec* spec)
@@ -576,8 +615,11 @@
576 mir_surface_spec_set_type(spec, type);615 mir_surface_spec_set_type(spec, type);
577 mir_surface_spec_set_width(spec, width);616 mir_surface_spec_set_width(spec, width);
578 mir_surface_spec_set_height(spec, height);617 mir_surface_spec_set_height(spec, height);
618#pragma GCC diagnostic push
619#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
579 mir_surface_spec_set_pixel_format(spec, pixel_format);620 mir_surface_spec_set_pixel_format(spec, pixel_format);
580 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);621 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
622#pragma GCC diagnostic pop
581 mir_surface_spec_set_parent(spec, parent);623 mir_surface_spec_set_parent(spec, parent);
582 });624 });
583625
@@ -593,8 +635,11 @@
593 mir_surface_spec_set_type(spec, mir_surface_type_normal);635 mir_surface_spec_set_type(spec, mir_surface_type_normal);
594 mir_surface_spec_set_width(spec, width);636 mir_surface_spec_set_width(spec, width);
595 mir_surface_spec_set_height(spec, height);637 mir_surface_spec_set_height(spec, height);
638#pragma GCC diagnostic push
639#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
596 mir_surface_spec_set_pixel_format(spec, pixel_format);640 mir_surface_spec_set_pixel_format(spec, pixel_format);
597 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);641 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
642#pragma GCC diagnostic pop
598 });643 });
599644
600 auto const surface = create_surface([&](MirSurfaceSpec* spec)645 auto const surface = create_surface([&](MirSurfaceSpec* spec)
@@ -602,8 +647,11 @@
602 mir_surface_spec_set_type(spec, type);647 mir_surface_spec_set_type(spec, type);
603 mir_surface_spec_set_width(spec, width);648 mir_surface_spec_set_width(spec, width);
604 mir_surface_spec_set_height(spec, height);649 mir_surface_spec_set_height(spec, height);
650#pragma GCC diagnostic push
651#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
605 mir_surface_spec_set_pixel_format(spec, pixel_format);652 mir_surface_spec_set_pixel_format(spec, pixel_format);
606 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);653 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
654#pragma GCC diagnostic pop
607 mir_surface_spec_set_parent(spec, parent);655 mir_surface_spec_set_parent(spec, parent);
608 });656 });
609657
@@ -619,8 +667,11 @@
619 mir_surface_spec_set_type(spec, type);667 mir_surface_spec_set_type(spec, type);
620 mir_surface_spec_set_width(spec, width);668 mir_surface_spec_set_width(spec, width);
621 mir_surface_spec_set_height(spec, height);669 mir_surface_spec_set_height(spec, height);
670#pragma GCC diagnostic push
671#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
622 mir_surface_spec_set_pixel_format(spec, pixel_format);672 mir_surface_spec_set_pixel_format(spec, pixel_format);
623 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);673 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
674#pragma GCC diagnostic pop
624 });675 });
625676
626 EXPECT_THAT(surface, Not(IsValidSurface()));677 EXPECT_THAT(surface, Not(IsValidSurface()));
@@ -635,8 +686,11 @@
635 mir_surface_spec_set_type(spec, mir_surface_type_normal);686 mir_surface_spec_set_type(spec, mir_surface_type_normal);
636 mir_surface_spec_set_width(spec, width);687 mir_surface_spec_set_width(spec, width);
637 mir_surface_spec_set_height(spec, height);688 mir_surface_spec_set_height(spec, height);
689#pragma GCC diagnostic push
690#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
638 mir_surface_spec_set_pixel_format(spec, pixel_format);691 mir_surface_spec_set_pixel_format(spec, pixel_format);
639 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);692 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
693#pragma GCC diagnostic pop
640 });694 });
641695
642 auto const surface = create_surface([&](MirSurfaceSpec* spec)696 auto const surface = create_surface([&](MirSurfaceSpec* spec)
@@ -644,8 +698,11 @@
644 mir_surface_spec_set_type(spec, type);698 mir_surface_spec_set_type(spec, type);
645 mir_surface_spec_set_width(spec, width);699 mir_surface_spec_set_width(spec, width);
646 mir_surface_spec_set_height(spec, height);700 mir_surface_spec_set_height(spec, height);
701#pragma GCC diagnostic push
702#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
647 mir_surface_spec_set_pixel_format(spec, pixel_format);703 mir_surface_spec_set_pixel_format(spec, pixel_format);
648 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);704 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
705#pragma GCC diagnostic pop
649 mir_surface_spec_set_parent(spec, parent);706 mir_surface_spec_set_parent(spec, parent);
650 });707 });
651708
@@ -661,8 +718,11 @@
661 mir_surface_spec_set_type(spec, type);718 mir_surface_spec_set_type(spec, type);
662 mir_surface_spec_set_width(spec, width);719 mir_surface_spec_set_width(spec, width);
663 mir_surface_spec_set_height(spec, height);720 mir_surface_spec_set_height(spec, height);
721#pragma GCC diagnostic push
722#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
664 mir_surface_spec_set_pixel_format(spec, pixel_format);723 mir_surface_spec_set_pixel_format(spec, pixel_format);
665 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);724 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
725#pragma GCC diagnostic pop
666 });726 });
667727
668 EXPECT_THAT(surface, IsValidSurface());728 EXPECT_THAT(surface, IsValidSurface());
669729
=== modified file 'tests/acceptance-tests/test_surfaces_with_output_id.cpp'
--- tests/acceptance-tests/test_surfaces_with_output_id.cpp 2016-01-29 08:18:22 +0000
+++ tests/acceptance-tests/test_surfaces_with_output_id.cpp 2016-10-28 13:38:48 +0000
@@ -110,8 +110,10 @@
110 initial_display_layout(display_rects);110 initial_display_layout(display_rects);
111 mtf::ConnectedClientHeadlessServer::SetUp();111 mtf::ConnectedClientHeadlessServer::SetUp();
112 ASSERT_THAT(tracking_shell, NotNull());112 ASSERT_THAT(tracking_shell, NotNull());
113113#pragma GCC diagnostic push
114#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
114 config = mir_connection_create_display_config(connection);115 config = mir_connection_create_display_config(connection);
116#pragma GCC diagnostic pop
115 ASSERT_TRUE(config != NULL);117 ASSERT_TRUE(config != NULL);
116 }118 }
117119
118120
=== modified file 'tests/acceptance-tests/test_system_compositor_window_manager.cpp'
--- tests/acceptance-tests/test_system_compositor_window_manager.cpp 2016-06-08 13:49:11 +0000
+++ tests/acceptance-tests/test_system_compositor_window_manager.cpp 2016-10-28 13:38:48 +0000
@@ -50,7 +50,10 @@
5050
51 void post_buffer()51 void post_buffer()
52 {52 {
53#pragma GCC diagnostic push
54#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
53 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));55 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
56#pragma GCC diagnostic pop
54 }57 }
5558
56 SurfaceHandle(SurfaceHandle const&& that) : surface{that.surface} { surface = nullptr; }59 SurfaceHandle(SurfaceHandle const&& that) : surface{that.surface} { surface = nullptr; }
@@ -81,7 +84,10 @@
81 auto const surface = mir_surface_create_sync(spec);84 auto const surface = mir_surface_create_sync(spec);
82 mir_surface_spec_release(spec);85 mir_surface_spec_release(spec);
8386
87#pragma GCC diagnostic push
88#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
84 mir_surface_set_event_handler(surface, on_surface_event, this);89 mir_surface_set_event_handler(surface, on_surface_event, this);
90#pragma GCC diagnostic pop
8591
86 return SurfaceHandle{surface};92 return SurfaceHandle{surface};
87 };93 };
8894
=== modified file 'tests/acceptance-tests/throwback/test_client_cursor_api.cpp'
--- tests/acceptance-tests/throwback/test_client_cursor_api.cpp 2016-07-18 07:38:38 +0000
+++ tests/acceptance-tests/throwback/test_client_cursor_api.cpp 2016-10-28 13:38:48 +0000
@@ -137,10 +137,11 @@
137 mir_surface_spec_set_name(spec, client_name.c_str());137 mir_surface_spec_set_name(spec, client_name.c_str());
138 auto const surface = mir_surface_create_sync(spec);138 auto const surface = mir_surface_create_sync(spec);
139 mir_surface_spec_release(spec);139 mir_surface_spec_release(spec);
140140#pragma GCC diagnostic push
141#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
141 mir_buffer_stream_swap_buffers_sync(142 mir_buffer_stream_swap_buffers_sync(
142 mir_surface_get_buffer_stream(surface));143 mir_surface_get_buffer_stream(surface));
143144#pragma GCC diagnostic pop
144 wait_for_surface_to_become_focused_and_exposed(surface);145 wait_for_surface_to_become_focused_and_exposed(surface);
145146
146 setup_cursor(surface);147 setup_cursor(surface);
@@ -189,7 +190,10 @@
189 void setup_cursor(MirSurface* surface) override190 void setup_cursor(MirSurface* surface) override
190 {191 {
191 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);192 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);
193#pragma GCC diagnostic push
194#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
192 mir_wait_for(mir_surface_configure_cursor(surface, conf));195 mir_wait_for(mir_surface_configure_cursor(surface, conf));
196#pragma GCC diagnostic pop
193 mir_cursor_configuration_destroy(conf);197 mir_cursor_configuration_destroy(conf);
194 }198 }
195};199};
@@ -208,7 +212,10 @@
208 void setup_cursor(MirSurface* surface) override212 void setup_cursor(MirSurface* surface) override
209 {213 {
210 auto conf = mir_cursor_configuration_from_name(cursor_name.c_str());214 auto conf = mir_cursor_configuration_from_name(cursor_name.c_str());
215#pragma GCC diagnostic push
216#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
211 mir_wait_for(mir_surface_configure_cursor(surface, conf));217 mir_wait_for(mir_surface_configure_cursor(surface, conf));
218#pragma GCC diagnostic pop
212 mir_cursor_configuration_destroy(conf);219 mir_cursor_configuration_destroy(conf);
213 }220 }
214221
@@ -377,10 +384,11 @@
377 {384 {
378 auto conf1 = mir_cursor_configuration_from_name(cursor_name.c_str());385 auto conf1 = mir_cursor_configuration_from_name(cursor_name.c_str());
379 auto conf2 = mir_cursor_configuration_from_name(mir_disabled_cursor_name);386 auto conf2 = mir_cursor_configuration_from_name(mir_disabled_cursor_name);
380387#pragma GCC diagnostic push
388#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
381 mir_wait_for(mir_surface_configure_cursor(surface, conf1));389 mir_wait_for(mir_surface_configure_cursor(surface, conf1));
382 mir_wait_for(mir_surface_configure_cursor(surface, conf2));390 mir_wait_for(mir_surface_configure_cursor(surface, conf2));
383391#pragma GCC diagnostic pop
384 mir_cursor_configuration_destroy(conf1);392 mir_cursor_configuration_destroy(conf1);
385 mir_cursor_configuration_destroy(conf2);393 mir_cursor_configuration_destroy(conf2);
386 }394 }
@@ -415,14 +423,20 @@
415423
416 void setup_cursor(MirSurface* surface) override424 void setup_cursor(MirSurface* surface) override
417 {425 {
426#pragma GCC diagnostic push
427#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
418 auto stream = mir_connection_create_buffer_stream_sync(428 auto stream = mir_connection_create_buffer_stream_sync(
419 connection, 24, 24, mir_pixel_format_argb_8888,429 connection, 24, 24, mir_pixel_format_argb_8888,
420 mir_buffer_usage_software);430 mir_buffer_usage_software);
431#pragma GCC diagnostic pop
421 auto conf = mir_cursor_configuration_from_buffer_stream(stream, hotspot_x, hotspot_y);432 auto conf = mir_cursor_configuration_from_buffer_stream(stream, hotspot_x, hotspot_y);
422433
423 mir_buffer_stream_swap_buffers_sync(stream);434 mir_buffer_stream_swap_buffers_sync(stream);
424435
436#pragma GCC diagnostic push
437#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
425 mir_wait_for(mir_surface_configure_cursor(surface, conf));438 mir_wait_for(mir_surface_configure_cursor(surface, conf));
439#pragma GCC diagnostic pop
426 440
427 mir_cursor_configuration_destroy(conf); 441 mir_cursor_configuration_destroy(conf);
428 442
@@ -468,9 +482,12 @@
468 // for the test logic. - alan_g482 // for the test logic. - alan_g
469 std::this_thread::sleep_for(std::chrono::milliseconds(20));483 std::this_thread::sleep_for(std::chrono::milliseconds(20));
470484
485#pragma GCC diagnostic push
486#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
471 mir_surface_set_state(surface, mir_surface_state_fullscreen);487 mir_surface_set_state(surface, mir_surface_state_fullscreen);
472 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);488 auto conf = mir_cursor_configuration_from_name(mir_disabled_cursor_name);
473 mir_surface_configure_cursor(surface, conf);489 mir_surface_configure_cursor(surface, conf);
490#pragma GCC diagnostic pop
474 mir_cursor_configuration_destroy(conf);491 mir_cursor_configuration_destroy(conf);
475 }492 }
476};493};
477494
=== modified file 'tests/acceptance-tests/throwback/test_client_library_errors.cpp'
--- tests/acceptance-tests/throwback/test_client_library_errors.cpp 2016-10-21 07:53:23 +0000
+++ tests/acceptance-tests/throwback/test_client_library_errors.cpp 2016-10-28 13:38:48 +0000
@@ -234,9 +234,11 @@
234 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);234 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
235235
236 ASSERT_THAT(connection, IsValid());236 ASSERT_THAT(connection, IsValid());
237237#pragma GCC diagnostic push
238#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
238 auto stream = mir_connection_create_buffer_stream_sync(connection,239 auto stream = mir_connection_create_buffer_stream_sync(connection,
239 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);240 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software);
241#pragma GCC diagnostic pop
240 ASSERT_NE(stream, nullptr);242 ASSERT_NE(stream, nullptr);
241 EXPECT_FALSE(mir_buffer_stream_is_valid(stream));243 EXPECT_FALSE(mir_buffer_stream_is_valid(stream));
242 EXPECT_THAT(mir_buffer_stream_get_error_message(stream), testing::HasSubstr(exception_text));244 EXPECT_THAT(mir_buffer_stream_get_error_message(stream), testing::HasSubstr(exception_text));
@@ -438,5 +440,8 @@
438TEST_F(ClientLibraryErrorsDeathTest, creating_screencast_with_invalid_connection)440TEST_F(ClientLibraryErrorsDeathTest, creating_screencast_with_invalid_connection)
439{441{
440 MirScreencastParameters params{{0, 0, 1, 1}, 1, 1, mir_pixel_format_abgr_8888};442 MirScreencastParameters params{{0, 0, 1, 1}, 1, 1, mir_pixel_format_abgr_8888};
443#pragma GCC diagnostic push
444#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
441 EXPECT_DEATH(mir_connection_create_screencast_sync(nullptr, &params), "");445 EXPECT_DEATH(mir_connection_create_screencast_sync(nullptr, &params), "");
446#pragma GCC diagnostic pop
442}447}
443448
=== modified file 'tests/acceptance-tests/throwback/test_presentation_chain.cpp'
--- tests/acceptance-tests/throwback/test_presentation_chain.cpp 2016-10-21 07:53:23 +0000
+++ tests/acceptance-tests/throwback/test_presentation_chain.cpp 2016-10-28 13:38:48 +0000
@@ -347,7 +347,10 @@
347TEST_F(PresentationChain, destroying_a_chain_will_return_buffers_associated_with_chain)347TEST_F(PresentationChain, destroying_a_chain_will_return_buffers_associated_with_chain)
348{348{
349 auto chain = mir_connection_create_presentation_chain_sync(connection);349 auto chain = mir_connection_create_presentation_chain_sync(connection);
350#pragma GCC diagnostic push
351#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
350 auto stream = mir_connection_create_buffer_stream_sync(connection, 25, 12, mir_pixel_format_abgr_8888, mir_buffer_usage_hardware);352 auto stream = mir_connection_create_buffer_stream_sync(connection, 25, 12, mir_pixel_format_abgr_8888, mir_buffer_usage_hardware);
353#pragma GCC diagnostic pop
351 ASSERT_TRUE(mir_presentation_chain_is_valid(chain));354 ASSERT_TRUE(mir_presentation_chain_is_valid(chain));
352355
353 auto spec = mir_connection_create_spec_for_normal_surface(356 auto spec = mir_connection_create_spec_for_normal_surface(
354357
=== modified file 'tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp'
--- tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp 2016-01-29 08:18:22 +0000
+++ tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp 2016-10-28 13:38:48 +0000
@@ -88,9 +88,11 @@
88 EXPECT_CALL(*mock_window_manager,88 EXPECT_CALL(*mock_window_manager,
89 set_surface_attribute(_, _, mir_surface_attrib_state, Eq(mir_surface_state_maximized)));89 set_surface_attribute(_, _, mir_surface_attrib_state, Eq(mir_surface_state_maximized)));
9090
91#pragma GCC diagnostic push
92#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
91 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_maximized));93 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_maximized));
92
93 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_maximized));94 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_maximized));
95#pragma GCC diagnostic pop
94}96}
9597
96TEST_F(ShellSurfaceConfiguration, the_window_manager_may_interfere_with_attribute_changes)98TEST_F(ShellSurfaceConfiguration, the_window_manager_may_interfere_with_attribute_changes)
@@ -109,7 +111,9 @@
109 set_surface_attribute(_, _, mir_surface_attrib_state, Eq(mir_surface_state_maximized)))111 set_surface_attribute(_, _, mir_surface_attrib_state, Eq(mir_surface_state_maximized)))
110 .WillOnce(Invoke(set_to_vertmax));112 .WillOnce(Invoke(set_to_vertmax));
111113
114#pragma GCC diagnostic push
115#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
112 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_maximized));116 mir_wait_for(mir_surface_set_state(surface, mir_surface_state_maximized));
113
114 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_vertmaximized));117 EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_vertmaximized));
118#pragma GCC diagnostic pop
115}119}
116120
=== modified file 'tests/integration-tests/test_client_screencast.cpp'
--- tests/integration-tests/test_client_screencast.cpp 2016-10-12 06:03:15 +0000
+++ tests/integration-tests/test_client_screencast.cpp 2016-10-28 13:38:48 +0000
@@ -121,7 +121,10 @@
121121
122 EXPECT_CALL(mock_screencast(), destroy_session(screencast_session_id));122 EXPECT_CALL(mock_screencast(), destroy_session(screencast_session_id));
123123
124#pragma GCC diagnostic push
125#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
124 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);126 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
127#pragma GCC diagnostic pop
125 ASSERT_NE(nullptr, screencast);128 ASSERT_NE(nullptr, screencast);
126 ASSERT_TRUE(mir_screencast_is_valid(screencast));129 ASSERT_TRUE(mir_screencast_is_valid(screencast));
127130
@@ -151,7 +154,10 @@
151154
152 EXPECT_CALL(mock_screencast(), destroy_session(_));155 EXPECT_CALL(mock_screencast(), destroy_session(_));
153156
157#pragma GCC diagnostic push
158#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
154 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);159 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
160#pragma GCC diagnostic pop
155 ASSERT_NE(nullptr, screencast);161 ASSERT_NE(nullptr, screencast);
156 ASSERT_TRUE(mir_screencast_is_valid(screencast));162 ASSERT_TRUE(mir_screencast_is_valid(screencast));
157163
@@ -171,12 +177,15 @@
171 .WillOnce(Return(stub_buffer));177 .WillOnce(Return(stub_buffer));
172 EXPECT_CALL(mock_screencast(), destroy_session(_));178 EXPECT_CALL(mock_screencast(), destroy_session(_));
173179
180#pragma GCC diagnostic push
181#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
174 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);182 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
175 ASSERT_NE(nullptr, screencast);183 ASSERT_NE(nullptr, screencast);
176 ASSERT_TRUE(mir_screencast_is_valid(screencast));184 ASSERT_TRUE(mir_screencast_is_valid(screencast));
177185
178 auto egl_native_window =186 auto egl_native_window =
179 mir_buffer_stream_get_egl_native_window(mir_screencast_get_buffer_stream(screencast));187 mir_buffer_stream_get_egl_native_window(mir_screencast_get_buffer_stream(screencast));
188#pragma GCC diagnostic pop
180 EXPECT_NE(MirEGLNativeWindowType(), egl_native_window);189 EXPECT_NE(MirEGLNativeWindowType(), egl_native_window);
181190
182 mir_screencast_release_sync(screencast);191 mir_screencast_release_sync(screencast);
@@ -189,7 +198,10 @@
189 EXPECT_CALL(mock_screencast(), create_session(_, _, _, _, _))198 EXPECT_CALL(mock_screencast(), create_session(_, _, _, _, _))
190 .WillOnce(Throw(std::runtime_error(an_error_message)));199 .WillOnce(Throw(std::runtime_error(an_error_message)));
191200
201#pragma GCC diagnostic push
202#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
192 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);203 auto screencast = mir_connection_create_screencast_sync(connection, &default_screencast_params);
204#pragma GCC diagnostic pop
193 ASSERT_NE(nullptr, screencast);205 ASSERT_NE(nullptr, screencast);
194 ASSERT_FALSE(mir_screencast_is_valid(screencast));206 ASSERT_FALSE(mir_screencast_is_valid(screencast));
195207
@@ -230,7 +242,10 @@
230 MirRectangle const capture_region = as_mir_rect(region);242 MirRectangle const capture_region = as_mir_rect(region);
231 mir_screencast_spec_set_capture_region(spec, &capture_region);243 mir_screencast_spec_set_capture_region(spec, &capture_region);
232244
245#pragma GCC diagnostic push
246#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
233 mir_screencast_spec_set_number_of_buffers(spec, num_buffers);247 mir_screencast_spec_set_number_of_buffers(spec, num_buffers);
248#pragma GCC diagnostic pop
234 mir_screencast_spec_set_mirror_mode(spec, mirror_mode);249 mir_screencast_spec_set_mirror_mode(spec, mirror_mode);
235250
236 auto screencast = mir_screencast_create_sync(spec);251 auto screencast = mir_screencast_create_sync(spec);
237252
=== modified file 'tests/integration-tests/test_focus_selection.cpp'
--- tests/integration-tests/test_focus_selection.cpp 2015-06-26 08:00:59 +0000
+++ tests/integration-tests/test_focus_selection.cpp 2016-10-28 13:38:48 +0000
@@ -133,7 +133,10 @@
133 ASSERT_TRUE(mir_connection_is_valid(connection));133 ASSERT_TRUE(mir_connection_is_valid(connection));
134134
135 auto const surface = mtf::make_any_surface(connection);135 auto const surface = mtf::make_any_surface(connection);
136#pragma GCC diagnostic push
137#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
136 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));138 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
139#pragma GCC diagnostic pop
137 mir_surface_release_sync(surface);140 mir_surface_release_sync(surface);
138141
139 mir_connection_release(connection);142 mir_connection_release(connection);
140143
=== modified file 'tests/integration-tests/test_server_shutdown.cpp'
--- tests/integration-tests/test_server_shutdown.cpp 2016-01-29 08:18:22 +0000
+++ tests/integration-tests/test_server_shutdown.cpp 2016-10-28 13:38:48 +0000
@@ -95,15 +95,21 @@
9595
96 void swap_sync()96 void swap_sync()
97 {97 {
98#pragma GCC diagnostic push
99#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
98 mir_buffer_stream_swap_buffers_sync(100 mir_buffer_stream_swap_buffers_sync(
99 mir_surface_get_buffer_stream(surface));101 mir_surface_get_buffer_stream(surface));
102#pragma GCC diagnostic pop
100 }103 }
101104
102 void swap_async()105 void swap_async()
103 {106 {
107#pragma GCC diagnostic push
108#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
104 mir_buffer_stream_swap_buffers(109 mir_buffer_stream_swap_buffers(
105 mir_surface_get_buffer_stream(surface),110 mir_surface_get_buffer_stream(surface),
106 null_buffer_stream_callback, nullptr);111 null_buffer_stream_callback, nullptr);
112#pragma GCC diagnostic pop
107 }113 }
108114
109 MirConnection* const connection;115 MirConnection* const connection;
110116
=== modified file 'tests/integration-tests/test_stale_frames.cpp'
--- tests/integration-tests/test_stale_frames.cpp 2016-08-01 14:43:19 +0000
+++ tests/integration-tests/test_stale_frames.cpp 2016-10-28 13:38:48 +0000
@@ -183,6 +183,8 @@
183183
184 std::set<mg::BufferID> stale_buffers;184 std::set<mg::BufferID> stale_buffers;
185185
186#pragma GCC diagnostic push
187#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
186 stale_buffers.emplace(mir_debug_surface_current_buffer_id(surface));188 stale_buffers.emplace(mir_debug_surface_current_buffer_id(surface));
187189
188 auto bs = mir_surface_get_buffer_stream(surface);190 auto bs = mir_surface_get_buffer_stream(surface);
@@ -194,6 +196,7 @@
194 EXPECT_THAT(stale_buffers.size(), Eq(2));196 EXPECT_THAT(stale_buffers.size(), Eq(2));
195197
196 auto const fresh_buffer = mg::BufferID{mir_debug_surface_current_buffer_id(surface)};198 auto const fresh_buffer = mg::BufferID{mir_debug_surface_current_buffer_id(surface)};
199#pragma GCC diagnostic pop
197 mir_buffer_stream_swap_buffers_sync(bs);200 mir_buffer_stream_swap_buffers_sync(bs);
198201
199 start_compositor();202 start_compositor();
@@ -212,11 +215,14 @@
212215
213 stop_compositor();216 stop_compositor();
214217
218#pragma GCC diagnostic push
219#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
215 auto bs = mir_surface_get_buffer_stream(surface);220 auto bs = mir_surface_get_buffer_stream(surface);
216 mir_buffer_stream_swap_buffers_sync(bs);221 mir_buffer_stream_swap_buffers_sync(bs);
217 mir_buffer_stream_swap_buffers_sync(bs);222 mir_buffer_stream_swap_buffers_sync(bs);
218223
219 auto const fresh_buffer = mg::BufferID{mir_debug_surface_current_buffer_id(surface)};224 auto const fresh_buffer = mg::BufferID{mir_debug_surface_current_buffer_id(surface)};
225#pragma GCC diagnostic pop
220 mir_buffer_stream_swap_buffers_sync(bs);226 mir_buffer_stream_swap_buffers_sync(bs);
221227
222 start_compositor();228 start_compositor();
223229
=== modified file 'tests/integration-tests/test_submit_buffer.cpp'
--- tests/integration-tests/test_submit_buffer.cpp 2016-10-20 14:17:36 +0000
+++ tests/integration-tests/test_submit_buffer.cpp 2016-10-28 13:38:48 +0000
@@ -314,8 +314,11 @@
314 while(Clock::now() < pt)314 while(Clock::now() < pt)
315 {315 {
316 //auto z = mir_debug_surface_current_buffer_id(surface);316 //auto z = mir_debug_surface_current_buffer_id(surface);
317#pragma GCC diagnostic push
318#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
317 if (mir_debug_surface_current_buffer_id(surface) == id.as_value())319 if (mir_debug_surface_current_buffer_id(surface) == id.as_value())
318 return true;320 return true;
321#pragma GCC diagnostic pop
319 std::this_thread::yield();322 std::this_thread::yield();
320 }323 }
321 return false;324 return false;
322325
=== modified file 'tests/integration-tests/test_surface_first_frame_sync.cpp'
--- tests/integration-tests/test_surface_first_frame_sync.cpp 2016-08-01 14:43:19 +0000
+++ tests/integration-tests/test_surface_first_frame_sync.cpp 2016-10-28 13:38:48 +0000
@@ -210,8 +210,11 @@
210 */210 */
211 EXPECT_EQ(0, number_of_executed_render_operations());211 EXPECT_EQ(0, number_of_executed_render_operations());
212212
213#pragma GCC diagnostic push
214#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
213 mir_buffer_stream_swap_buffers_sync(215 mir_buffer_stream_swap_buffers_sync(
214 mir_surface_get_buffer_stream(surface));216 mir_surface_get_buffer_stream(surface));
217#pragma GCC diagnostic pop
215218
216 /* After submitting the buffer we should get some render operations */219 /* After submitting the buffer we should get some render operations */
217 mir::test::spin_wait_for_condition_or_timeout(220 mir::test::spin_wait_for_condition_or_timeout(
218221
=== modified file 'tests/integration-tests/test_swapinterval.cpp'
--- tests/integration-tests/test_swapinterval.cpp 2016-10-26 05:15:38 +0000
+++ tests/integration-tests/test_swapinterval.cpp 2016-10-28 13:38:48 +0000
@@ -113,8 +113,11 @@
113 {113 {
114 mtf::BasicClientServerFixture<ServerConfig>::SetUp();114 mtf::BasicClientServerFixture<ServerConfig>::SetUp();
115 surface = mtf::make_any_surface(connection);115 surface = mtf::make_any_surface(connection);
116#pragma GCC diagnostic push
117#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
116 stream = mir_connection_create_buffer_stream_sync(118 stream = mir_connection_create_buffer_stream_sync(
117 connection, 10, 10, mir_pixel_format_abgr_8888, mir_buffer_usage_hardware);119 connection, 10, 10, mir_pixel_format_abgr_8888, mir_buffer_usage_hardware);
120#pragma GCC diagnostic pop
118 }121 }
119122
120 void TearDown()123 void TearDown()
@@ -135,6 +138,8 @@
135138
136}139}
137140
141#pragma GCC diagnostic push
142#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
138TEST_F(SwapInterval, defaults_to_one)143TEST_F(SwapInterval, defaults_to_one)
139{144{
140 EXPECT_EQ(1, mir_buffer_stream_get_swapinterval(stream));145 EXPECT_EQ(1, mir_buffer_stream_get_swapinterval(stream));
@@ -192,3 +197,4 @@
192 EXPECT_EQ(original_swapinterval, mir_surface_get_swapinterval(surface));197 EXPECT_EQ(original_swapinterval, mir_surface_get_swapinterval(surface));
193 EXPECT_EQ(original_framedropping, framedropping_enabled());198 EXPECT_EQ(original_framedropping, framedropping_enabled());
194}199}
200#pragma GCC diagnostic pop
195201
=== modified file 'tests/mir_test/display_config_matchers.cpp'
--- tests/mir_test/display_config_matchers.cpp 2016-10-20 15:05:56 +0000
+++ tests/mir_test/display_config_matchers.cpp 2016-10-28 13:38:48 +0000
@@ -190,11 +190,14 @@
190 TestDisplayConfiguration(MirDisplayConfig const* config)190 TestDisplayConfiguration(MirDisplayConfig const* config)
191 {191 {
192 /* Cards; fake it, 'cause we only ever support 1 card at the moment */192 /* Cards; fake it, 'cause we only ever support 1 card at the moment */
193#pragma GCC diagnostic push
194#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
193 cards.push_back(195 cards.push_back(
194 mg::DisplayConfigurationCard{196 mg::DisplayConfigurationCard{
195 mg::DisplayConfigurationCardId{1},197 mg::DisplayConfigurationCardId{1},
196 static_cast<size_t>(mir_display_config_get_max_simultaneous_outputs(config))198 static_cast<size_t>(mir_display_config_get_max_simultaneous_outputs(config))
197 });199 });
200#pragma GCC diagnostic pop
198201
199 /* Outputs */202 /* Outputs */
200 for (int i = 0; i < mir_display_config_get_num_outputs(config); i++)203 for (int i = 0; i < mir_display_config_get_num_outputs(config); i++)
201204
=== modified file 'tests/mir_test_framework/connected_client_with_a_surface.cpp'
--- tests/mir_test_framework/connected_client_with_a_surface.cpp 2016-01-29 08:18:22 +0000
+++ tests/mir_test_framework/connected_client_with_a_surface.cpp 2016-10-28 13:38:48 +0000
@@ -27,7 +27,11 @@
27 auto const spec = mir_connection_create_spec_for_normal_surface(27 auto const spec = mir_connection_create_spec_for_normal_surface(
28 connection, surface_size.width.as_int(), surface_size.height.as_int(), mir_pixel_format_abgr_8888);28 connection, surface_size.width.as_int(), surface_size.height.as_int(), mir_pixel_format_abgr_8888);
29 mir_surface_spec_set_name(spec, "ConnectedClientWithASurfaceFixtureSurface");29 mir_surface_spec_set_name(spec, "ConnectedClientWithASurfaceFixtureSurface");
30
31#pragma GCC diagnostic push
32#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
30 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);33 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
34#pragma GCC diagnostic pop
3135
32 surface = mir_surface_create_sync(spec);36 surface = mir_surface_create_sync(spec);
33 mir_surface_spec_release(spec);37 mir_surface_spec_release(spec);
3438
=== modified file 'tests/mir_test_framework/visible_surface.cpp'
--- tests/mir_test_framework/visible_surface.cpp 2016-01-08 12:40:51 +0000
+++ tests/mir_test_framework/visible_surface.cpp 2016-10-28 13:38:48 +0000
@@ -27,7 +27,10 @@
27 // Swap buffers to ensure surface is visible for event based tests27 // Swap buffers to ensure surface is visible for event based tests
28 if (mir_surface_is_valid(surface))28 if (mir_surface_is_valid(surface))
29 {29 {
30#pragma GCC diagnostic push
31#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
30 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));32 mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface));
33#pragma GCC diagnostic pop
3134
32 std::unique_lock<std::mutex> lk(mutex);35 std::unique_lock<std::mutex> lk(mutex);
33 if (!cv.wait_for(lk, std::chrono::seconds(5), [this] { return visible; }))36 if (!cv.wait_for(lk, std::chrono::seconds(5), [this] { return visible; }))
3437
=== modified file 'tests/performance-tests/test_client_startup.cpp'
--- tests/performance-tests/test_client_startup.cpp 2016-05-10 23:20:32 +0000
+++ tests/performance-tests/test_client_startup.cpp 2016-10-28 13:38:48 +0000
@@ -92,7 +92,10 @@
9292
93 auto conn = create_connection();93 auto conn = create_connection();
94 auto surf = make_surface(conn);94 auto surf = make_surface(conn);
95#pragma GCC diagnostic push
96#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
95 auto stream = mir_surface_get_buffer_stream(surf);97 auto stream = mir_surface_get_buffer_stream(surf);
98#pragma GCC diagnostic pop
96 if (!mir_buffer_stream_is_valid(stream))99 if (!mir_buffer_stream_is_valid(stream))
97 {100 {
98 std::string error_msg{"Could not get buffer stream from surface: "};101 std::string error_msg{"Could not get buffer stream from surface: "};
99102
=== modified file 'tests/privileged-tests/test_input_events.cpp'
--- tests/privileged-tests/test_input_events.cpp 2016-08-09 08:13:02 +0000
+++ tests/privileged-tests/test_input_events.cpp 2016-10-28 13:38:48 +0000
@@ -213,9 +213,12 @@
213 if (!mir_surface_is_valid(surface))213 if (!mir_surface_is_valid(surface))
214 throw std::runtime_error("Failed to create MirSurface");214 throw std::runtime_error("Failed to create MirSurface");
215215
216#pragma GCC diagnostic push
217#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
216 mir_surface_set_event_handler(surface, handle_input, handler);218 mir_surface_set_event_handler(surface, handle_input, handler);
217 mir_buffer_stream_swap_buffers_sync(219 mir_buffer_stream_swap_buffers_sync(
218 mir_surface_get_buffer_stream(surface));220 mir_surface_get_buffer_stream(surface));
221#pragma GCC diagnostic pop
219222
220 wait_for_surface_to_become_focused_and_exposed(surface);223 wait_for_surface_to_become_focused_and_exposed(surface);
221224
222225
=== modified file 'tests/test-clients/impolite-shutdown/scroll.cpp'
--- tests/test-clients/impolite-shutdown/scroll.cpp 2016-03-29 16:37:11 +0000
+++ tests/test-clients/impolite-shutdown/scroll.cpp 2016-10-28 13:38:48 +0000
@@ -64,9 +64,11 @@
64 rc = eglChooseConfig(disp, attribs, &egl_config, 1, &n);64 rc = eglChooseConfig(disp, attribs, &egl_config, 1, &n);
65 assert(rc == EGL_TRUE);65 assert(rc == EGL_TRUE);
66 assert(n == 1);66 assert(n == 1);
6767#pragma GCC diagnostic push
68#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
68 MirPixelFormat pixel_format =69 MirPixelFormat pixel_format =
69 mir_connection_get_egl_pixel_format(connection, disp, egl_config);70 mir_connection_get_egl_pixel_format(connection, disp, egl_config);
71#pragma GCC diagnostic pop
7072
71 printf("Mir chose pixel format %d\n", pixel_format);73 printf("Mir chose pixel format %d\n", pixel_format);
7274
@@ -80,7 +82,10 @@
80 assert(spec != nullptr);82 assert(spec != nullptr);
8183
82 mir_surface_spec_set_name(spec.get(), __PRETTY_FUNCTION__);84 mir_surface_spec_set_name(spec.get(), __PRETTY_FUNCTION__);
85#pragma GCC diagnostic push
86#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
83 mir_surface_spec_set_buffer_usage(spec.get(), mir_buffer_usage_hardware);87 mir_surface_spec_set_buffer_usage(spec.get(), mir_buffer_usage_hardware);
88#pragma GCC diagnostic pop
8489
85 MirSurface *surface = mir_surface_create_sync(spec.get());90 MirSurface *surface = mir_surface_create_sync(spec.get());
86 spec.reset();91 spec.reset();
@@ -90,9 +95,12 @@
90 assert(strcmp(mir_surface_get_error_message(surface), "") == 0);95 assert(strcmp(mir_surface_get_error_message(surface), "") == 0);
91 puts("Surface created");96 puts("Surface created");
9297
98#pragma GCC diagnostic push
99#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
93 EGLNativeWindowType native_window =100 EGLNativeWindowType native_window =
94 (EGLNativeWindowType)mir_buffer_stream_get_egl_native_window(101 (EGLNativeWindowType)mir_buffer_stream_get_egl_native_window(
95 mir_surface_get_buffer_stream(surface));102 mir_surface_get_buffer_stream(surface));
103#pragma GCC diagnostic pop
96 assert(native_window != (EGLNativeWindowType)NULL);104 assert(native_window != (EGLNativeWindowType)NULL);
97105
98 egl_surface = eglCreateWindowSurface(disp, egl_config, native_window, NULL);106 egl_surface = eglCreateWindowSurface(disp, egl_config, native_window, NULL);
@@ -171,7 +179,10 @@
171 assert(strcmp(mir_connection_get_error_message(connection), "") == 0);179 assert(strcmp(mir_connection_get_error_message(connection), "") == 0);
172 puts("Connected");180 puts("Connected");
173181
182#pragma GCC diagnostic push
183#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
174 EGLNativeDisplayType native_display = (EGLNativeDisplayType) mir_connection_get_egl_native_display(connection);184 EGLNativeDisplayType native_display = (EGLNativeDisplayType) mir_connection_get_egl_native_display(connection);
185#pragma GCC diagnostic pop
175 disp = eglGetDisplay(native_display);186 disp = eglGetDisplay(native_display);
176 assert(disp != EGL_NO_DISPLAY);187 assert(disp != EGL_NO_DISPLAY);
177188
178189
=== modified file 'tests/test-clients/mir-stress/src/client.cpp'
--- tests/test-clients/mir-stress/src/client.cpp 2015-06-17 05:20:42 +0000
+++ tests/test-clients/mir-stress/src/client.cpp 2016-10-28 13:38:48 +0000
@@ -60,7 +60,10 @@
6060
61bool UnacceleratedClient::create_surface()61bool UnacceleratedClient::create_surface()
62{62{
63#pragma GCC diagnostic push
64#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
63 auto display_configuration = mir_connection_create_display_config(connection_);65 auto display_configuration = mir_connection_create_display_config(connection_);
66#pragma GCC diagnostic pop
64 if (display_configuration->num_outputs < 1)67 if (display_configuration->num_outputs < 1)
65 return false;68 return false;
6669
@@ -75,7 +78,10 @@
75 auto const spec = mir_connection_create_spec_for_normal_surface(78 auto const spec = mir_connection_create_spec_for_normal_surface(
76 connection_, 640, 480, pixel_format);79 connection_, 640, 480, pixel_format);
77 mir_surface_spec_set_name(spec, __PRETTY_FUNCTION__);80 mir_surface_spec_set_name(spec, __PRETTY_FUNCTION__);
81#pragma GCC diagnostic push
82#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
78 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);83 mir_surface_spec_set_buffer_usage(spec, mir_buffer_usage_software);
84#pragma GCC diagnostic pop
7985
80 surface_ = mir_surface_create_sync(spec);86 surface_ = mir_surface_create_sync(spec);
81 mir_surface_spec_release(spec);87 mir_surface_spec_release(spec);
8288
=== modified file 'tests/unit-tests/client/test_mir_connection.cpp'
--- tests/unit-tests/client/test_mir_connection.cpp 2016-10-21 09:20:55 +0000
+++ tests/unit-tests/client/test_mir_connection.cpp 2016-10-28 13:38:48 +0000
@@ -615,12 +615,15 @@
615 using namespace testing;615 using namespace testing;
616616
617 unsigned int const opcode{42};617 unsigned int const opcode{42};
618#pragma GCC diagnostic push
619#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
618 auto const request = mir::raii::deleter_for(620 auto const request = mir::raii::deleter_for(
619 mir_platform_message_create(opcode),621 mir_platform_message_create(opcode),
620 &mir_platform_message_release);622 &mir_platform_message_release);
621 auto const response = mir::raii::deleter_for(623 auto const response = mir::raii::deleter_for(
622 mir_platform_message_create(opcode),624 mir_platform_message_create(opcode),
623 &mir_platform_message_release);625 &mir_platform_message_release);
626#pragma GCC diagnostic pop
624627
625 EXPECT_CALL(*mock_platform, platform_operation(request.get()))628 EXPECT_CALL(*mock_platform, platform_operation(request.get()))
626 .WillOnce(Return(response.get()));629 .WillOnce(Return(response.get()));
@@ -645,9 +648,12 @@
645 using namespace testing;648 using namespace testing;
646649
647 unsigned int const opcode{42};650 unsigned int const opcode{42};
651#pragma GCC diagnostic push
652#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
648 auto const request = mir::raii::deleter_for(653 auto const request = mir::raii::deleter_for(
649 mir_platform_message_create(opcode),654 mir_platform_message_create(opcode),
650 &mir_platform_message_release);655 &mir_platform_message_release);
656#pragma GCC diagnostic pop
651657
652 EXPECT_CALL(*mock_platform, platform_operation(_))658 EXPECT_CALL(*mock_platform, platform_operation(_))
653 .WillOnce(Return(nullptr));659 .WillOnce(Return(nullptr));
@@ -664,8 +670,11 @@
664 request.get(), assign_response, &returned_response);670 request.get(), assign_response, &returned_response);
665 mir_wait_for(op_wh);671 mir_wait_for(op_wh);
666672
673#pragma GCC diagnostic push
674#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
667 EXPECT_THAT(mir_platform_message_get_opcode(returned_response), Eq(opcode));675 EXPECT_THAT(mir_platform_message_get_opcode(returned_response), Eq(opcode));
668 mir_platform_message_release(returned_response);676 mir_platform_message_release(returned_response);
677#pragma GCC diagnostic pop
669}678}
670679
671TEST_F(MirConnectionTest, wait_handle_is_signalled_during_stream_creation_error)680TEST_F(MirConnectionTest, wait_handle_is_signalled_during_stream_creation_error)
672681
=== modified file 'tests/unit-tests/platforms/mesa/client/test_client_platform.cpp'
--- tests/unit-tests/platforms/mesa/client/test_client_platform.cpp 2016-09-01 23:08:33 +0000
+++ tests/unit-tests/platforms/mesa/client/test_client_platform.cpp 2016-10-28 13:38:48 +0000
@@ -58,11 +58,14 @@
58{58{
59 MirPlatformMessage* set_gbm_device(gbm_device* dev)59 MirPlatformMessage* set_gbm_device(gbm_device* dev)
60 {60 {
61#pragma GCC diagnostic push
62#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
61 auto request_msg = mir::raii::deleter_for(63 auto request_msg = mir::raii::deleter_for(
62 mir_platform_message_create(MirMesaPlatformOperation::set_gbm_device),64 mir_platform_message_create(MirMesaPlatformOperation::set_gbm_device),
63 &mir_platform_message_release);65 &mir_platform_message_release);
64 MirMesaSetGBMDeviceRequest const request{dev};66 MirMesaSetGBMDeviceRequest const request{dev};
65 mir_platform_message_set_data(request_msg.get(), &request, sizeof(request));67 mir_platform_message_set_data(request_msg.get(), &request, sizeof(request));
68#pragma GCC diagnostic pop
6669
67 return platform->platform_operation(request_msg.get());70 return platform->platform_operation(request_msg.get());
68 }71 }
@@ -97,12 +100,18 @@
97 int const success{0};100 int const success{0};
98 auto const gbm_dev_dummy = reinterpret_cast<gbm_device*>(this);101 auto const gbm_dev_dummy = reinterpret_cast<gbm_device*>(this);
99102
103#pragma GCC diagnostic push
104#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
100 auto response_msg = mir::raii::deleter_for(105 auto response_msg = mir::raii::deleter_for(
101 set_gbm_device(gbm_dev_dummy),106 set_gbm_device(gbm_dev_dummy),
102 &mir_platform_message_release);107 &mir_platform_message_release);
108#pragma GCC diagnostic pop
103109
104 ASSERT_THAT(response_msg, NotNull());110 ASSERT_THAT(response_msg, NotNull());
111#pragma GCC diagnostic push
112#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
105 auto const response_data = mir_platform_message_get_data(response_msg.get());113 auto const response_data = mir_platform_message_get_data(response_msg.get());
114#pragma GCC diagnostic pop
106 ASSERT_THAT(response_data.size, Eq(sizeof(MirMesaSetGBMDeviceResponse)));115 ASSERT_THAT(response_data.size, Eq(sizeof(MirMesaSetGBMDeviceResponse)));
107116
108 MirMesaSetGBMDeviceResponse response{-1};117 MirMesaSetGBMDeviceResponse response{-1};
@@ -119,9 +128,12 @@
119 int const previous_data_count{pkg.data_items};128 int const previous_data_count{pkg.data_items};
120 auto const gbm_dev_dummy = reinterpret_cast<gbm_device*>(this);129 auto const gbm_dev_dummy = reinterpret_cast<gbm_device*>(this);
121130
131#pragma GCC diagnostic push
132#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
122 auto response_msg = mir::raii::deleter_for(133 auto response_msg = mir::raii::deleter_for(
123 set_gbm_device(gbm_dev_dummy),134 set_gbm_device(gbm_dev_dummy),
124 &mir_platform_message_release);135 &mir_platform_message_release);
136#pragma GCC diagnostic pop
125137
126 platform->populate(pkg);138 platform->populate(pkg);
127 EXPECT_THAT(pkg.data_items, Eq(previous_data_count + (sizeof(gbm_dev_dummy) / sizeof(int))));139 EXPECT_THAT(pkg.data_items, Eq(previous_data_count + (sizeof(gbm_dev_dummy) / sizeof(int))));

Subscribers

People subscribed via source and target branches