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