Merge lp:~albaguirre/mir/deprecate-more-things into lp:mir
- deprecate-more-things
- Merge into development-branch
Proposed by
Alberto Aguirre
Status: | Merged |
---|---|
Approved by: | Alberto Aguirre |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4152 |
Proposed branch: | lp:~albaguirre/mir/deprecate-more-things |
Merge into: | lp:mir |
Diff against target: |
4494 lines (+1109/-486) 117 files modified
benchmarks/frame-uniformity/touch_measuring_client.cpp (+3/-0) examples/basic.c (+3/-0) examples/camera.c (+3/-0) examples/client_helpers.cpp (+3/-0) examples/client_helpers.h (+3/-1) examples/fingerpaint.c (+3/-0) examples/flicker.c (+3/-1) examples/multi_stream.cpp (+6/-1) examples/multiwin.c (+6/-1) examples/progressbar.c (+9/-1) examples/release_at_exit.c (+3/-1) examples/tooltip.c (+3/-0) include/client/mir_toolkit/client_types.h (+8/-3) include/client/mir_toolkit/mir_buffer.h (+0/-2) include/client/mir_toolkit/mir_buffer_stream.h (+32/-13) include/client/mir_toolkit/mir_connection.h (+6/-2) include/client/mir_toolkit/mir_window.h (+28/-13) include/platforms/mesa/mir_toolkit/mesa/native_display.h (+3/-0) playground/mir_egl_platform_shim.c (+3/-0) src/client/buffer.cpp (+6/-1) src/client/buffer.h (+9/-0) src/client/buffer_factory.cpp (+6/-0) src/client/buffer_factory.h (+3/-0) src/client/buffer_stream.cpp (+6/-2) src/client/buffer_stream.h (+3/-0) src/client/buffer_vault.cpp (+3/-0) src/client/error_buffer.cpp (+5/-0) src/client/error_buffer.h (+3/-0) src/client/error_render_surface.cpp (+3/-0) src/client/error_stream.cpp (+3/-0) src/client/error_stream.h (+3/-1) src/client/mir_buffer_stream_api.cpp (+9/-2) src/client/mir_surface_api.cpp (+6/-0) src/client/render_surface.cpp (+3/-0) src/client/screencast_stream.cpp (+3/-0) src/client/screencast_stream.h (+3/-1) src/include/client/mir/client_platform.h (+3/-0) src/include/client/mir/egl_native_surface.h (+3/-0) src/include/client/mir/mir_buffer.h (+3/-1) src/include/client/mir/mir_buffer_stream.h (+4/-0) src/include/client/mir/mir_render_surface.h (+3/-0) src/platforms/android/client/android_client_platform.cpp (+3/-0) src/platforms/android/client/android_client_platform.h (+3/-0) src/platforms/android/utils/test_android_hardware_sanity.cpp (+15/-3) src/platforms/eglstream-kms/client/client_platform.cpp (+3/-0) src/platforms/eglstream-kms/client/client_platform.h (+3/-0) src/platforms/mesa/client/client_platform.cpp (+4/-0) src/platforms/mesa/client/client_platform.h (+3/-0) src/platforms/mesa/client/native_surface.cpp (+6/-0) src/platforms/mesa/client/native_surface.h (+3/-0) src/server/graphics/nested/mir_client_host_connection.cpp (+6/-0) src/utils/screencast.cpp (+3/-2) tests/acceptance-tests/client_mediated_user_gestures.cpp (+4/-1) tests/acceptance-tests/drag_and_drop.cpp (+6/-2) tests/acceptance-tests/test_buffer_stream_arrangement.cpp (+3/-0) tests/acceptance-tests/test_client_cookie.cpp (+6/-2) tests/acceptance-tests/test_client_cursor_api.cpp (+9/-4) tests/acceptance-tests/test_client_focus_notification.cpp (+6/-1) tests/acceptance-tests/test_client_input.cpp (+6/-1) tests/acceptance-tests/test_client_library.cpp (+27/-38) tests/acceptance-tests/test_client_library_callbacks.cpp (+3/-3) tests/acceptance-tests/test_client_library_errors.cpp (+15/-0) tests/acceptance-tests/test_client_logging.cpp (+3/-1) tests/acceptance-tests/test_client_scaling.cpp (+3/-1) tests/acceptance-tests/test_client_surface_events.cpp (+18/-1) tests/acceptance-tests/test_client_surface_swap_buffers.cpp (+6/-2) tests/acceptance-tests/test_client_surface_visibility.cpp (+6/-0) tests/acceptance-tests/test_client_surfaces.cpp (+3/-3) tests/acceptance-tests/test_confined_pointer.cpp (+6/-1) tests/acceptance-tests/test_custom_window_management.cpp (+27/-2) tests/acceptance-tests/test_latency.cpp (+24/-1) tests/acceptance-tests/test_nested_input.cpp (+3/-0) tests/acceptance-tests/test_nested_mir.cpp (+14/-3) tests/acceptance-tests/test_new_display_configuration.cpp (+3/-1) tests/acceptance-tests/test_presentation_chain.cpp (+2/-2) 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 (+9/-1) tests/acceptance-tests/test_surface_modifications.cpp (+3/-0) tests/acceptance-tests/test_surface_morphing.cpp (+34/-4) tests/acceptance-tests/test_surface_placement.cpp (+9/-0) tests/acceptance-tests/test_surface_raise.cpp (+3/-2) tests/acceptance-tests/test_surface_specification.cpp (+393/-332) tests/acceptance-tests/test_surfaces_with_output_id.cpp (+6/-0) tests/acceptance-tests/test_system_compositor_window_manager.cpp (+6/-1) tests/include/mir/test/doubles/mock_client_platform.h (+3/-1) tests/include/mir/test/doubles/mock_egl_native_surface.h (+3/-0) tests/include/mir/test/doubles/mock_mir_buffer.h (+3/-1) tests/include/mir/test/doubles/mock_mir_buffer_stream.h (+3/-1) tests/include/mir/test/doubles/stub_buffer_allocator.h (+4/-1) tests/include/mir_test_framework/stub_client_platform_factory.h (+3/-0) tests/integration-tests/client/test_mirsurface.cpp (+15/-2) tests/integration-tests/test_client_screencast.cpp (+4/-0) tests/integration-tests/test_error_reporting.cpp (+3/-1) 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/-2) tests/integration-tests/test_surface_first_frame_sync.cpp (+3/-2) tests/integration-tests/test_surfaceloop.cpp (+3/-0) tests/integration-tests/test_swapinterval.cpp (+6/-0) tests/mir_test_framework/any_surface.cpp (+6/-0) tests/mir_test_framework/connected_client_with_a_window.cpp (+3/-0) tests/mir_test_framework/stub_client_platform_factory.cpp (+3/-0) tests/mir_test_framework/visible_surface.cpp (+3/-0) tests/performance-tests/test_client_startup.cpp (+6/-0) tests/privileged-tests/test_input_events.cpp (+3/-2) tests/test-clients/impolite-shutdown/scroll.cpp (+3/-2) tests/test-clients/mir-stress/src/client.cpp (+3/-0) tests/unit-tests/client/test_client_buffer_stream.cpp (+9/-2) tests/unit-tests/client/test_mir_buffer.cpp (+3/-0) tests/unit-tests/client/test_mir_connection.cpp (+6/-0) tests/unit-tests/client/test_presentation_chain.cpp (+3/-0) tests/unit-tests/client/test_protobuf_rpc_channel.cpp (+12/-0) tests/unit-tests/client/test_screencast_stream.cpp (+6/-2) tests/unit-tests/platforms/android/client/test_egl_native_surface_interpreter.cpp (+6/-1) tests/unit-tests/platforms/mesa/client/test_native_surface.cpp (+15/-4) tests/unit-tests/platforms/nested/test_host_buffer.cpp (+3/-0) |
To merge this branch: | bzr merge lp:~albaguirre/mir/deprecate-more-things |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brandon Schaefer (community) | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Review via email: mp+322388@code.launchpad.net |
Commit message
Deprecate more apis related to functionality replaced by the introduction of MirRenderSurface
Description of the change
To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote : | # |
review:
Approve
(continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote : | # |
lgtm just a lot of push/pop. This approve is with the understanding that theres a branch soon to replace all the src/* push/pop with replacements :)
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'benchmarks/frame-uniformity/touch_measuring_client.cpp' |
2 | --- benchmarks/frame-uniformity/touch_measuring_client.cpp 2017-01-18 02:29:37 +0000 |
3 | +++ benchmarks/frame-uniformity/touch_measuring_client.cpp 2017-04-11 18:27:10 +0000 |
4 | @@ -29,6 +29,8 @@ |
5 | namespace |
6 | { |
7 | |
8 | +#pragma GCC diagnostic push |
9 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
10 | MirWindow *create_window(MirConnection *connection) |
11 | { |
12 | MirPixelFormat pixel_format; |
13 | @@ -73,6 +75,7 @@ |
14 | results->record_frame_time(std::chrono::high_resolution_clock::now()); |
15 | } |
16 | } |
17 | +#pragma GCC diagnostic pop |
18 | |
19 | } |
20 | |
21 | |
22 | === modified file 'examples/basic.c' |
23 | --- examples/basic.c 2017-01-24 19:53:45 +0000 |
24 | +++ examples/basic.c 2017-04-11 18:27:10 +0000 |
25 | @@ -61,6 +61,8 @@ |
26 | } MirDemoState; |
27 | ///\internal [MirDemoState_tag] |
28 | |
29 | +#pragma GCC diagnostic push |
30 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
31 | int demo_client(const char* server, int buffer_swap_count) |
32 | { |
33 | MirDemoState mcd; |
34 | @@ -142,6 +144,7 @@ |
35 | ///\internal [get_current_buffer_tag] |
36 | MirNativeBuffer* buffer_package = NULL; |
37 | mir_buffer_stream_get_current_buffer(bs, &buffer_package); |
38 | +#pragma GCC diagnostic pop |
39 | assert(buffer_package != NULL); |
40 | MirGraphicsRegion graphics_region; |
41 | mir_buffer_stream_get_graphics_region(bs, &graphics_region); |
42 | |
43 | === modified file 'examples/camera.c' |
44 | --- examples/camera.c 2017-01-18 02:29:37 +0000 |
45 | +++ examples/camera.c 2017-04-11 18:27:10 +0000 |
46 | @@ -387,7 +387,10 @@ |
47 | if (ultrafast) |
48 | { |
49 | pref = camera_pref_speed; |
50 | +#pragma GCC diagnostic push |
51 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
52 | MirBufferStream* bs = mir_window_get_buffer_stream(mir_eglapp_native_window()); |
53 | +#pragma GCC diagnostic pop |
54 | mir_buffer_stream_set_swapinterval(bs, 0); |
55 | } |
56 | Camera *cam = open_camera(dev_video, pref, 1); |
57 | |
58 | === modified file 'examples/client_helpers.cpp' |
59 | --- examples/client_helpers.cpp 2017-01-18 02:29:37 +0000 |
60 | +++ examples/client_helpers.cpp 2017-04-11 18:27:10 +0000 |
61 | @@ -51,6 +51,8 @@ |
62 | return connection; |
63 | } |
64 | |
65 | +#pragma GCC diagnostic push |
66 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
67 | me::BufferStream::BufferStream( |
68 | Connection& connection, |
69 | unsigned int width, |
70 | @@ -172,6 +174,7 @@ |
71 | make_current(); |
72 | eglSwapInterval(display.disp, swap_interval); |
73 | } |
74 | +#pragma GCC diagnostic pop |
75 | |
76 | void me::Context::make_current() |
77 | { |
78 | |
79 | === modified file 'examples/client_helpers.h' |
80 | --- examples/client_helpers.h 2017-01-18 02:29:37 +0000 |
81 | +++ examples/client_helpers.h 2017-04-11 18:27:10 +0000 |
82 | @@ -60,8 +60,10 @@ |
83 | bool prefer_alpha, |
84 | bool hardware); |
85 | |
86 | +#pragma GCC diagnostic push |
87 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
88 | std::unique_ptr<MirBufferStream, decltype(&mir_buffer_stream_release_sync)> const stream; |
89 | - |
90 | +#pragma GCC diagnostic pop |
91 | BufferStream(BufferStream const&) = delete; |
92 | BufferStream& operator=(BufferStream const&) = delete; |
93 | }; |
94 | |
95 | === modified file 'examples/fingerpaint.c' |
96 | --- examples/fingerpaint.c 2017-01-18 13:59:18 +0000 |
97 | +++ examples/fingerpaint.c 2017-04-11 18:27:10 +0000 |
98 | @@ -340,6 +340,8 @@ |
99 | return NULL; |
100 | } |
101 | |
102 | +#pragma GCC diagnostic push |
103 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
104 | int main(int argc, char *argv[]) |
105 | { |
106 | static const Color background = {180, 180, 150, 255}; |
107 | @@ -514,3 +516,4 @@ |
108 | |
109 | return 0; |
110 | } |
111 | +#pragma GCC diagnostic pop |
112 | |
113 | === modified file 'examples/flicker.c' |
114 | --- examples/flicker.c 2017-01-18 02:29:37 +0000 |
115 | +++ examples/flicker.c 2017-04-11 18:27:10 +0000 |
116 | @@ -101,7 +101,8 @@ |
117 | } |
118 | } |
119 | |
120 | - |
121 | +#pragma GCC diagnostic push |
122 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
123 | int main(int argc, char* argv[]) |
124 | { |
125 | MirConnection *connection = 0; |
126 | @@ -196,3 +197,4 @@ |
127 | |
128 | return 0; |
129 | } |
130 | +#pragma GCC diagnostic pop |
131 | |
132 | === modified file 'examples/multi_stream.cpp' |
133 | --- examples/multi_stream.cpp 2017-01-18 02:29:37 +0000 |
134 | +++ examples/multi_stream.cpp 2017-04-11 18:27:10 +0000 |
135 | @@ -206,7 +206,10 @@ |
136 | me::Connection connection{socket, "Multiple MirBufferStream example"}; |
137 | |
138 | me::NormalWindow window{connection, 200, 200, true, false}; |
139 | +#pragma GCC diagnostic push |
140 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
141 | MirBufferStream* surface_stream = mir_window_get_buffer_stream(window); |
142 | +#pragma GCC diagnostic pop |
143 | int topSize = 100, dTopSize = 2; |
144 | auto top = std::make_unique<me::BufferStream>(connection, topSize, topSize, true, false); |
145 | me::BufferStream bottom(connection, 50, 50, true, false); |
146 | @@ -275,8 +278,10 @@ |
147 | fill_stream_with(surface_stream, baseColour, 0, 0, 128); |
148 | fill_stream_with(bottom, 0, 0, bottomColour, 128); |
149 | fill_stream_with(*top, 0, topColour, 0, 128); |
150 | - |
151 | +#pragma GCC diagnostic push |
152 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
153 | mir_window_spec_set_streams(spec, arrangement.data(), arrangement.size()); |
154 | +#pragma GCC diagnostic pop |
155 | mir_buffer_stream_swap_buffers_sync(surface_stream); |
156 | mir_buffer_stream_swap_buffers_sync(bottom); |
157 | mir_buffer_stream_swap_buffers_sync(*top); |
158 | |
159 | === modified file 'examples/multiwin.c' |
160 | --- examples/multiwin.c 2017-01-18 02:29:37 +0000 |
161 | +++ examples/multiwin.c 2017-04-11 18:27:10 +0000 |
162 | @@ -164,8 +164,10 @@ |
163 | static void draw_window(Window *win) |
164 | { |
165 | MirGraphicsRegion region; |
166 | +#pragma GCC diagnostic push |
167 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
168 | MirBufferStream *bs = mir_window_get_buffer_stream(win->window); |
169 | - |
170 | +#pragma GCC diagnostic pop |
171 | mir_buffer_stream_get_graphics_region(bs, ®ion); |
172 | clear_region(®ion, &win->fill); |
173 | mir_buffer_stream_swap_buffers_sync(bs); |
174 | @@ -251,8 +253,11 @@ |
175 | return 1; |
176 | } |
177 | |
178 | +#pragma GCC diagnostic push |
179 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
180 | mir_window_spec_set_pixel_format(spec, pixel_format); |
181 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software); |
182 | +#pragma GCC diagnostic pop |
183 | mir_window_spec_set_name(spec, "red"); |
184 | |
185 | win[0].window = mir_create_window_sync(spec); |
186 | |
187 | === modified file 'examples/progressbar.c' |
188 | --- examples/progressbar.c 2017-01-18 02:29:37 +0000 |
189 | +++ examples/progressbar.c 2017-04-11 18:27:10 +0000 |
190 | @@ -184,7 +184,10 @@ |
191 | static void redraw(MirWindow *window, const MirGraphicsRegion *canvas) |
192 | { |
193 | MirGraphicsRegion backbuffer; |
194 | +#pragma GCC diagnostic push |
195 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
196 | MirBufferStream *bs = mir_window_get_buffer_stream(window); |
197 | +#pragma GCC diagnostic pop |
198 | |
199 | mir_buffer_stream_get_graphics_region(bs, &backbuffer); |
200 | clear_region(&backbuffer, background); |
201 | @@ -257,7 +260,10 @@ |
202 | mir_connection_release(conn); |
203 | return 1; |
204 | } |
205 | +#pragma GCC diagnostic push |
206 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
207 | mir_window_spec_set_pixel_format(spec, pixel_format); |
208 | +#pragma GCC diagnostic pop |
209 | { |
210 | char name[128]; |
211 | snprintf(name, sizeof(name)-1, "Progress Bars (%dHz)", hz); |
212 | @@ -265,8 +271,10 @@ |
213 | mir_window_spec_set_name(spec, name); |
214 | } |
215 | |
216 | +#pragma GCC diagnostic push |
217 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
218 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software); |
219 | - |
220 | +#pragma GCC diagnostic pop |
221 | window = mir_create_window_sync(spec); |
222 | mir_window_spec_release(spec); |
223 | |
224 | |
225 | === modified file 'examples/release_at_exit.c' |
226 | --- examples/release_at_exit.c 2017-01-18 16:58:17 +0000 |
227 | +++ examples/release_at_exit.c 2017-04-11 18:27:10 +0000 |
228 | @@ -47,8 +47,10 @@ |
229 | unsigned int valid_formats; |
230 | mir_connection_get_available_surface_formats(connection, &pixel_format, 1, &valid_formats); |
231 | MirWindowSpec *spec = mir_create_normal_window_spec(connection, 640, 480); |
232 | +#pragma GCC diagnostic push |
233 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
234 | mir_window_spec_set_pixel_format(spec, pixel_format); |
235 | - |
236 | +#pragma GCC diagnostic pop |
237 | window = mir_create_window_sync(spec); |
238 | mir_window_spec_release(spec); |
239 | |
240 | |
241 | === modified file 'examples/tooltip.c' |
242 | --- examples/tooltip.c 2017-01-18 02:29:37 +0000 |
243 | +++ examples/tooltip.c 2017-04-11 18:27:10 +0000 |
244 | @@ -97,6 +97,8 @@ |
245 | return pixel_format; |
246 | } |
247 | |
248 | +#pragma GCC diagnostic push |
249 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
250 | static MirWindow* create_tooltip(MirConnection* const connection, MirWindow* const parent, const MirPixelFormat format) |
251 | { |
252 | MirRectangle zone = { 0, 0, 10, 10 }; |
253 | @@ -156,3 +158,4 @@ |
254 | |
255 | return tooltip; |
256 | } |
257 | +#pragma GCC diagnostic pop |
258 | |
259 | === modified file 'include/client/mir_toolkit/client_types.h' |
260 | --- include/client/mir_toolkit/client_types.h 2017-04-11 03:54:16 +0000 |
261 | +++ include/client/mir_toolkit/client_types.h 2017-04-11 18:27:10 +0000 |
262 | @@ -186,7 +186,7 @@ |
263 | { |
264 | mir_buffer_usage_hardware = 1, |
265 | mir_buffer_usage_software |
266 | -} MirBufferUsage; |
267 | +} MirBufferUsage __attribute__((deprecated("No longer applicable when using MirRenderSurface"))); |
268 | |
269 | /** |
270 | * MirWindowParameters is the structure of minimum required information that |
271 | @@ -198,7 +198,11 @@ |
272 | int width; |
273 | int height; |
274 | MirPixelFormat pixel_format; |
275 | +#pragma GCC diagnostic push |
276 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
277 | MirBufferUsage buffer_usage; |
278 | +#pragma GCC diagnostic pop |
279 | + |
280 | /** |
281 | * The id of the output to place the surface in. |
282 | * |
283 | @@ -208,7 +212,7 @@ |
284 | * use the value mir_display_output_id_invalid. |
285 | */ |
286 | uint32_t output_id; |
287 | -} MirSurfaceParameters __attribute__((deprecated("Use MirWindowParameters instead"))); |
288 | +} MirSurfaceParameters __attribute__((deprecated("Use mir_window_get apis or listen for attribute events instead"))); |
289 | |
290 | enum { mir_platform_package_max = 32 }; |
291 | |
292 | @@ -577,7 +581,8 @@ |
293 | typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context) |
294 | __attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition"))); |
295 | |
296 | -typedef MirSurfaceParameters MirWindowParameters; |
297 | +typedef MirSurfaceParameters MirWindowParameters |
298 | +__attribute__((deprecated("Use mir_window_get_xxx apis or listen for attribute events instead"))); |
299 | |
300 | #pragma GCC diagnostic pop |
301 | |
302 | |
303 | === modified file 'include/client/mir_toolkit/mir_buffer.h' |
304 | --- include/client/mir_toolkit/mir_buffer.h 2017-03-16 03:23:51 +0000 |
305 | +++ include/client/mir_toolkit/mir_buffer.h 2017-04-11 18:27:10 +0000 |
306 | @@ -40,7 +40,6 @@ |
307 | * \param [in] connection The connection |
308 | * \param [in] width Requested buffer width |
309 | * \param [in] height Requested buffer height |
310 | - * \param [in] buffer_usage Requested buffer usage |
311 | * \param [in] available_callback The callback called when the buffer |
312 | * is available |
313 | * \param [in] available_context The context for the available_callback |
314 | @@ -56,7 +55,6 @@ |
315 | * \param [in] connection The connection |
316 | * \param [in] width Requested buffer width |
317 | * \param [in] height Requested buffer height |
318 | - * \param [in] buffer_usage Requested buffer usage |
319 | * \return The buffer |
320 | **/ |
321 | MirBuffer* mir_connection_allocate_buffer_sync( |
322 | |
323 | === modified file 'include/client/mir_toolkit/mir_buffer_stream.h' |
324 | --- include/client/mir_toolkit/mir_buffer_stream.h 2017-01-24 07:49:13 +0000 |
325 | +++ include/client/mir_toolkit/mir_buffer_stream.h 2017-04-11 18:27:10 +0000 |
326 | @@ -56,6 +56,7 @@ |
327 | * with mir_cursor_configuration_from_buffer_stream, |
328 | * in order to post images to the system cursor. |
329 | * |
330 | + * \deprecated Use mir_render_surface_get_buffer_stream instead |
331 | * \param [in] connection A valid connection |
332 | * \param [in] width Requested buffer width |
333 | * \param [in] height Requested buffer height |
334 | @@ -70,12 +71,16 @@ |
335 | * |
336 | * \return A handle that can be supplied to mir_wait_for |
337 | */ |
338 | +#pragma GCC diagnostic push |
339 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
340 | MirWaitHandle* mir_connection_create_buffer_stream(MirConnection *connection, |
341 | int width, int height, |
342 | MirPixelFormat format, |
343 | MirBufferUsage buffer_usage, |
344 | MirBufferStreamCallback callback, |
345 | - void* context); |
346 | + void* context) |
347 | +__attribute__ ((deprecated("Use mir_render_surface_get_buffer_stream instead"))); |
348 | +#pragma GCC diagnostic pop |
349 | |
350 | /** |
351 | * Create a new buffer stream unattached to a surface and wait for the result. |
352 | @@ -83,6 +88,7 @@ |
353 | * mir_cursor_configuration_from_buffer_stream in order to post images |
354 | * to the system cursor. |
355 | * |
356 | + * \deprecated Use mir_render_surface_get_buffer_stream instead |
357 | * \param [in] connection A valid connection |
358 | * \param [in] width Requested buffer width |
359 | * \param [in] height Requested buffer height |
360 | @@ -93,14 +99,19 @@ |
361 | * \return The new buffer stream. This is guaranteed non-null, |
362 | * but may be invalid in the case of error. |
363 | */ |
364 | +#pragma GCC diagnostic push |
365 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
366 | MirBufferStream* mir_connection_create_buffer_stream_sync(MirConnection *connection, |
367 | int width, int height, |
368 | MirPixelFormat format, |
369 | - MirBufferUsage buffer_usage); |
370 | - |
371 | + MirBufferUsage buffer_usage) |
372 | +__attribute__ ((deprecated("Use mir_render_surface_get_buffer_stream instead"))); |
373 | +#pragma GCC diagnostic pop |
374 | /** |
375 | * Release the supplied stream and any associated buffer. The returned wait |
376 | * handle remains valid until the connection to the server is released. |
377 | + * |
378 | + * \deprecated A stream obtained through mir_render_surface_get_buffer_stream does not need to be released. |
379 | * \warning callback could be called from another thread. You must do any |
380 | * locking appropriate to protect your data accessed in the |
381 | * callback. |
382 | @@ -113,14 +124,17 @@ |
383 | MirWaitHandle *mir_buffer_stream_release( |
384 | MirBufferStream * buffer_stream, |
385 | MirBufferStreamCallback callback, |
386 | - void *context); |
387 | + void *context) |
388 | +__attribute__ ((deprecated)); |
389 | |
390 | /** |
391 | * Release the specified buffer stream like in mir,_buffer_stream_release(), |
392 | * but also wait for the operation to complete. |
393 | + * \deprecated A stream obtained through mir_render_surface_get_buffer_stream does not need to be released. |
394 | * \param [in] buffer_stream The buffer stream to be released |
395 | */ |
396 | -void mir_buffer_stream_release_sync(MirBufferStream *buffer_stream); |
397 | +void mir_buffer_stream_release_sync(MirBufferStream *buffer_stream) |
398 | +__attribute__ ((deprecated)); |
399 | |
400 | /** |
401 | * Get the underlying platform type so the buffer obtained in "raw" |
402 | @@ -140,19 +154,19 @@ |
403 | * \return One of mir_platform_type_android or |
404 | * mir_platform_type_gbm |
405 | */ |
406 | -/// @cond |
407 | -__attribute__ ((deprecated)) |
408 | -/// @endcond |
409 | -MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream); |
410 | +MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream) |
411 | + __attribute__ ((deprecated)); |
412 | |
413 | /** |
414 | * Retrieve the current buffer in "raw" representation. |
415 | + * \deprecated Use platform specific platform extensions instead |
416 | * \pre The buffer stream is valid |
417 | * \param [in] buffer_stream The buffer stream |
418 | * \param [out] buffer_package Structure to be populated |
419 | */ |
420 | void mir_buffer_stream_get_current_buffer(MirBufferStream *buffer_stream, |
421 | - MirNativeBuffer **buffer_package); |
422 | + MirNativeBuffer **buffer_package) |
423 | +__attribute__ ((deprecated("Use platform specific buffer extensions instead"))); |
424 | |
425 | /** |
426 | * Advance a buffer stream's buffer. The returned handle remains valid until the |
427 | @@ -195,18 +209,22 @@ |
428 | |
429 | /** |
430 | * Retrieve a window type which may be used by EGL. |
431 | + * \deprecated Use MirRenderSurface *as the window type |
432 | * \param [in] buffer_stream The buffer stream |
433 | * \return An EGLNativeWindowType that the client can use |
434 | */ |
435 | -MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream *buffer_stream); |
436 | +MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream *buffer_stream) |
437 | +__attribute__ ((deprecated("Use MirRenderSurface *as the window type"))); |
438 | |
439 | /** |
440 | * Set the scale associated with all buffers in the stream |
441 | + * \deprecated |
442 | * \param [in] buffer_stream The buffer stream |
443 | * \param [in] scale The scale |
444 | * \return A handle that can be passed to mir_wait_for |
445 | */ |
446 | -MirWaitHandle *mir_buffer_stream_set_scale(MirBufferStream* buffer_stream, float scale); |
447 | +MirWaitHandle *mir_buffer_stream_set_scale(MirBufferStream* buffer_stream, float scale) |
448 | +__attribute__ ((deprecated)); |
449 | |
450 | /** |
451 | * Set the scale as in mir_buffer_stream_set_scale(), but also wait for the |
452 | @@ -214,7 +232,8 @@ |
453 | * \param [in] buffer_stream The buffer stream |
454 | * \param [in] scale The scale |
455 | */ |
456 | -void mir_buffer_stream_set_scale_sync(MirBufferStream* buffer_stream, float scale); |
457 | +void mir_buffer_stream_set_scale_sync(MirBufferStream* buffer_stream, float scale) |
458 | +__attribute__ ((deprecated)); |
459 | |
460 | /** |
461 | * Set the swapinterval for the stream. |
462 | |
463 | === modified file 'include/client/mir_toolkit/mir_connection.h' |
464 | --- include/client/mir_toolkit/mir_connection.h 2017-03-13 08:12:52 +0000 |
465 | +++ include/client/mir_toolkit/mir_connection.h 2017-04-11 18:27:10 +0000 |
466 | @@ -328,21 +328,25 @@ |
467 | |
468 | /** |
469 | * Get a display type that can be used with EGL. |
470 | + * \deprecated Use MirConnection * as the native display instead |
471 | * \param [in] connection The connection |
472 | * \return An EGLNativeDisplayType that the client can use |
473 | */ |
474 | -MirEGLNativeDisplayType mir_connection_get_egl_native_display(MirConnection *connection); |
475 | +MirEGLNativeDisplayType mir_connection_get_egl_native_display(MirConnection *connection) |
476 | +__attribute__((deprecated("Use MirConnection * as the native display instead"))); |
477 | |
478 | /** |
479 | * Get the exact MirPixelFormat to use in creating a surface for a chosen |
480 | * EGLConfig. |
481 | + * \deprecated Use EGL directly, the EGL implementation will now set correct pixel format" |
482 | * \param [in] connection The connection |
483 | * \param [in] egldisplay The EGLDisplay for the given config |
484 | * \param [in] eglconfig The EGLConfig you have chosen to use |
485 | * \return The MirPixelFormat to use in surface creation |
486 | */ |
487 | MirPixelFormat mir_connection_get_egl_pixel_format( |
488 | - MirConnection *connection, void *egldisplay, void *eglconfig); |
489 | + MirConnection *connection, void *egldisplay, void *eglconfig) |
490 | +__attribute__((deprecated("Use EGL directly, the EGL implementation will now set correct pixel format"))); |
491 | |
492 | /** |
493 | * Get the list of possible formats that a surface can be created with. |
494 | |
495 | === modified file 'include/client/mir_toolkit/mir_window.h' |
496 | --- include/client/mir_toolkit/mir_window.h 2017-04-11 03:54:16 +0000 |
497 | +++ include/client/mir_toolkit/mir_window.h 2017-04-11 18:27:10 +0000 |
498 | @@ -529,9 +529,12 @@ |
499 | void mir_window_spec_set_cursor_name(MirWindowSpec* spec, char const* name); |
500 | |
501 | /** |
502 | - * \note To be deprecated soon. Only for enabling other deprecations. |
503 | * |
504 | * Set the requested pixel format. |
505 | + * \deprecated There will be no default stream associated with a window anymore. Instead create a |
506 | + * MirRenderSurface and either set the pixel format through EGL (for EGL based rendering) or |
507 | + * by allocating a cpu accessible buffer through mir_connection_allocate_buffer or |
508 | + * mir_render_surface_get_buffer_stream |
509 | * \param [in] spec Specification to mutate |
510 | * \param [in] format Requested pixel format |
511 | * |
512 | @@ -539,12 +542,14 @@ |
513 | * If the server is unable to create a window with this pixel format at |
514 | * the point mir_create_window() is called it will instead return an invalid window. |
515 | */ |
516 | -void mir_window_spec_set_pixel_format(MirWindowSpec* spec, MirPixelFormat format); |
517 | +void mir_window_spec_set_pixel_format(MirWindowSpec* spec, MirPixelFormat format) |
518 | + __attribute__((deprecated("Use mir_connection_allocate_buffer/mir_render_surface_get_buffer_stream instead"))); |
519 | |
520 | /** |
521 | * \note To be deprecated soon. Only for enabling other deprecations. |
522 | * |
523 | * Set the requested buffer usage. |
524 | + * \deprecated There will be no default stream associated with a window anymore. MirBufferUsage is no longer applicable. |
525 | * \param [in] spec Specification to mutate |
526 | * \param [in] usage Requested buffer usage |
527 | * |
528 | @@ -552,10 +557,12 @@ |
529 | * If the server is unable to create a window with this buffer usage at |
530 | * the point mir_create_window() is called it will instead return an invalid window. |
531 | */ |
532 | -void mir_window_spec_set_buffer_usage(MirWindowSpec* spec, MirBufferUsage usage); |
533 | - |
534 | +#pragma GCC diagnostic push |
535 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
536 | +void mir_window_spec_set_buffer_usage(MirWindowSpec* spec, MirBufferUsage usage) |
537 | + __attribute__((deprecated("No longer applicable, use mir_render_surface apis"))); |
538 | +#pragma GCC diagnostic pop |
539 | /** |
540 | - * \note To be deprecated soon. Waiting for mir_window_spec_set_render_surfaces() to land. |
541 | * |
542 | * Set the streams associated with the spec. |
543 | * streams[0] is the bottom-most stream, and streams[size-1] is the topmost. |
544 | @@ -565,6 +572,7 @@ |
545 | * but is in the list will be associated with the window. |
546 | * Streams set a displacement from the top-left corner of the window. |
547 | * |
548 | + * \deprecated Use mir_window_spec_add_render_surface |
549 | * \warning disassociating streams from the window will not release() them. |
550 | * \warning It is wiser to arrange the streams within the bounds of the |
551 | * window the spec is applied to. Shells can define their own |
552 | @@ -576,7 +584,8 @@ |
553 | */ |
554 | void mir_window_spec_set_streams(MirWindowSpec* spec, |
555 | MirBufferStreamInfo* streams, |
556 | - unsigned int num_streams); |
557 | + unsigned int num_streams) |
558 | + __attribute__((deprecated("Use mir_window_spec_add_render_surface instead"))); |
559 | |
560 | /** |
561 | * Set the MirWindowSpec to display content contained in a render surface |
562 | @@ -691,7 +700,7 @@ |
563 | * Retrieve the primary MirBufferStream associated with a window (to advance buffers, |
564 | * obtain EGLNativeWindow, etc...) |
565 | * |
566 | - * \deprecated Users should use mir_window_spec_set_streams() to arrange |
567 | + * \deprecated Users should use mir_window_spec_add_render_surface() to arrange |
568 | * the content of a window, instead of relying on a stream |
569 | * being created by default. |
570 | * \warning If the window was created with, or modified to have a |
571 | @@ -700,8 +709,8 @@ |
572 | * be removed, and this function will return NULL. |
573 | * \param[in] window The window |
574 | */ |
575 | -MirBufferStream* mir_window_get_buffer_stream(MirWindow* window); |
576 | - |
577 | +MirBufferStream* mir_window_get_buffer_stream(MirWindow* window) |
578 | + __attribute__((deprecated("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead"))); |
579 | /** |
580 | * Retrieve a text description of the error. The returned string is owned by |
581 | * the library and remains valid until the window or the associated |
582 | @@ -715,11 +724,17 @@ |
583 | |
584 | /** |
585 | * Get a window's parameters. |
586 | - * \pre The window is valid |
587 | - * \param [in] window The window |
588 | - * \param [out] parameters Structure to be populated |
589 | + * \deprecated Use mir_window getters or listen for state change events instead |
590 | + * \pre The window is valid |
591 | + * \param [in] window The window |
592 | + * \param [out] parameters Structure to be populated |
593 | */ |
594 | -void mir_window_get_parameters(MirWindow* window, MirWindowParameters* parameters); |
595 | +#pragma GCC diagnostic push |
596 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
597 | +void mir_window_get_parameters(MirWindow* window, MirWindowParameters* parameters) |
598 | + __attribute__((deprecated("Use mir_window_get_xxx apis or listen to state/attribute change events instead"))); |
599 | +#pragma GCC diagnostic pop |
600 | + |
601 | |
602 | /** |
603 | * Get the orientation of a window. |
604 | |
605 | === modified file 'include/platforms/mesa/mir_toolkit/mesa/native_display.h' |
606 | --- include/platforms/mesa/mir_toolkit/mesa/native_display.h 2017-01-18 02:29:37 +0000 |
607 | +++ include/platforms/mesa/mir_toolkit/mesa/native_display.h 2017-04-11 18:27:10 +0000 |
608 | @@ -48,8 +48,11 @@ |
609 | int (*surface_set_swapinterval)(MirMesaEGLNativeSurface* surface, int interval); |
610 | int (*surface_advance_buffer)(MirMesaEGLNativeSurface* surface, |
611 | MirBufferPackage* buffer_package); |
612 | +#pragma GCC diagnostic push |
613 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
614 | int (*surface_get_parameters)(MirMesaEGLNativeSurface* surface, |
615 | MirWindowParameters* surface_parameters); |
616 | +#pragma GCC diagnostic pop |
617 | }; |
618 | |
619 | #ifdef __cplusplus |
620 | |
621 | === modified file 'playground/mir_egl_platform_shim.c' |
622 | --- playground/mir_egl_platform_shim.c 2017-03-10 19:47:57 +0000 |
623 | +++ playground/mir_egl_platform_shim.c 2017-04-11 18:27:10 +0000 |
624 | @@ -114,7 +114,10 @@ |
625 | info->eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC) eglGetProcAddress("eglDestroyImageKHR"); |
626 | info->glEGLImageTargetTexture2DOES = |
627 | (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) eglGetProcAddress("glEGLImageTargetTexture2DOES"); |
628 | +#pragma GCC diagnostic push |
629 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
630 | return eglGetDisplay(mir_connection_get_egl_native_display(connection)); |
631 | +#pragma GCC diagnostic pop |
632 | } |
633 | |
634 | EGLBoolean future_driver_eglTerminate(EGLDisplay display) |
635 | |
636 | === modified file 'src/client/buffer.cpp' |
637 | --- src/client/buffer.cpp 2017-03-14 02:26:28 +0000 |
638 | +++ src/client/buffer.cpp 2017-04-11 18:27:10 +0000 |
639 | @@ -21,7 +21,8 @@ |
640 | #include <boost/throw_exception.hpp> |
641 | |
642 | namespace mcl = mir::client; |
643 | - |
644 | +#pragma GCC diagnostic push |
645 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
646 | mcl::Buffer::Buffer( |
647 | MirBufferCallback cb, void* context, |
648 | int buffer_id, |
649 | @@ -36,6 +37,7 @@ |
650 | usage(usage) |
651 | { |
652 | } |
653 | +#pragma GCC diagnostic pop |
654 | |
655 | int mcl::Buffer::rpc_id() const |
656 | { |
657 | @@ -101,8 +103,11 @@ |
658 | return connection; |
659 | } |
660 | |
661 | +#pragma GCC diagnostic push |
662 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
663 | MirBufferUsage mcl::Buffer::buffer_usage() const |
664 | { |
665 | +#pragma GCC diagnostic pop |
666 | return usage; |
667 | } |
668 | |
669 | |
670 | === modified file 'src/client/buffer.h' |
671 | --- src/client/buffer.h 2017-01-24 07:37:03 +0000 |
672 | +++ src/client/buffer.h 2017-04-11 18:27:10 +0000 |
673 | @@ -37,12 +37,15 @@ |
674 | class Buffer : public MirBuffer |
675 | { |
676 | public: |
677 | +#pragma GCC diagnostic push |
678 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
679 | Buffer( |
680 | MirBufferCallback cb, void* context, |
681 | int buffer_id, |
682 | std::shared_ptr<ClientBuffer> const& buffer, |
683 | MirConnection* connection, |
684 | MirBufferUsage usage); |
685 | +#pragma GCC diagnostic pop |
686 | |
687 | int rpc_id() const override; |
688 | |
689 | @@ -54,7 +57,10 @@ |
690 | MirGraphicsRegion map_region() override; |
691 | void unmap_region() override; |
692 | |
693 | +#pragma GCC diagnostic push |
694 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
695 | MirBufferUsage buffer_usage() const override; |
696 | +#pragma GCC diagnostic pop |
697 | MirPixelFormat pixel_format() const override; |
698 | geometry::Size size() const override; |
699 | |
700 | @@ -74,7 +80,10 @@ |
701 | bool owned; |
702 | std::shared_ptr<MemoryRegion> mapped_region; |
703 | MirConnection* const connection; |
704 | +#pragma GCC diagnostic push |
705 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
706 | MirBufferUsage const usage; |
707 | +#pragma GCC diagnostic pop |
708 | }; |
709 | } |
710 | } |
711 | |
712 | === modified file 'src/client/buffer_factory.cpp' |
713 | --- src/client/buffer_factory.cpp 2017-03-10 19:47:57 +0000 |
714 | +++ src/client/buffer_factory.cpp 2017-04-11 18:27:10 +0000 |
715 | @@ -26,6 +26,8 @@ |
716 | namespace mcl = mir::client; |
717 | namespace geom = mir::geometry; |
718 | |
719 | +#pragma GCC diagnostic push |
720 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
721 | mcl::BufferFactory::AllocationRequest::AllocationRequest( |
722 | std::shared_ptr<mcl::ClientBufferFactory> const& native_buffer_factory, |
723 | MirConnection* connection, |
724 | @@ -67,6 +69,7 @@ |
725 | allocation_requests.emplace_back( |
726 | std::make_unique<AllocationRequest>(factory, connection, size, format, usage, cb, cb_context)); |
727 | } |
728 | +#pragma GCC diagnostic pop |
729 | |
730 | void mcl::BufferFactory::expect_buffer( |
731 | std::shared_ptr<mcl::ClientBufferFactory> const& factory, |
732 | @@ -105,7 +108,10 @@ |
733 | { |
734 | auto factory = (*request_it)->native_buffer_factory; |
735 | std::shared_ptr<mcl::ClientBuffer> client_buffer; |
736 | +#pragma GCC diagnostic push |
737 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
738 | auto usage = mir_buffer_usage_hardware; |
739 | +#pragma GCC diagnostic pop |
740 | if ((*request_it)->native_request.is_set()) |
741 | { |
742 | auto& req = (*request_it)->native_request.value(); |
743 | |
744 | === modified file 'src/client/buffer_factory.h' |
745 | --- src/client/buffer_factory.h 2017-03-10 19:47:57 +0000 |
746 | +++ src/client/buffer_factory.h 2017-04-11 18:27:10 +0000 |
747 | @@ -30,6 +30,8 @@ |
748 | { |
749 | namespace client |
750 | { |
751 | +#pragma GCC diagnostic push |
752 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
753 | class ClientBufferFactory; |
754 | class AsyncBufferFactory |
755 | { |
756 | @@ -128,6 +130,7 @@ |
757 | }; |
758 | std::vector<std::unique_ptr<AllocationRequest>> allocation_requests; |
759 | }; |
760 | +#pragma GCC diagnostic pop |
761 | } |
762 | } |
763 | #endif /* MIR_CLIENT_MIR_BUFFER_FACTORY_H_ */ |
764 | |
765 | === modified file 'src/client/buffer_stream.cpp' |
766 | --- src/client/buffer_stream.cpp 2017-03-20 11:24:19 +0000 |
767 | +++ src/client/buffer_stream.cpp 2017-04-11 18:27:10 +0000 |
768 | @@ -65,7 +65,8 @@ |
769 | platform(platform) |
770 | { |
771 | } |
772 | - |
773 | +#pragma GCC diagnostic push |
774 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
775 | void allocate_buffer(geom::Size size, MirPixelFormat format, int usage) override |
776 | { |
777 | mp::BufferAllocation request; |
778 | @@ -88,7 +89,7 @@ |
779 | server.allocate_buffers(&request, protobuf_void.get(), |
780 | google::protobuf::NewCallback(Requests::ignore_response, protobuf_void)); |
781 | } |
782 | - |
783 | +#pragma GCC diagnostic pop |
784 | void free_buffer(int buffer_id) override |
785 | { |
786 | mp::BufferRelease request; |
787 | @@ -418,6 +419,8 @@ |
788 | return secured_region; |
789 | } |
790 | |
791 | +#pragma GCC diagnostic push |
792 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
793 | /* mcl::EGLNativeSurface interface for EGLNativeWindow integration */ |
794 | MirWindowParameters mcl::BufferStream::get_parameters() const |
795 | { |
796 | @@ -431,6 +434,7 @@ |
797 | static_cast<MirBufferUsage>(protobuf_bs->buffer_usage()), |
798 | mir_display_output_id_invalid}; |
799 | } |
800 | +#pragma GCC diagnostic pop |
801 | |
802 | void mcl::BufferStream::wait_for_vsync() |
803 | { |
804 | |
805 | === modified file 'src/client/buffer_stream.h' |
806 | --- src/client/buffer_stream.h 2017-03-20 11:24:19 +0000 |
807 | +++ src/client/buffer_stream.h 2017-04-11 18:27:10 +0000 |
808 | @@ -110,7 +110,10 @@ |
809 | std::shared_ptr<MemoryRegion> secure_for_cpu_write() override; |
810 | |
811 | // mcl::EGLNativeSurface interface |
812 | +#pragma GCC diagnostic push |
813 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
814 | MirWindowParameters get_parameters() const override; |
815 | +#pragma GCC diagnostic pop |
816 | void swap_buffers_sync() override; |
817 | |
818 | void request_and_wait_for_configure(MirWindowAttrib attrib, int) override; |
819 | |
820 | === modified file 'src/client/buffer_vault.cpp' |
821 | --- src/client/buffer_vault.cpp 2017-04-04 07:04:57 +0000 |
822 | +++ src/client/buffer_vault.cpp 2017-04-11 18:27:10 +0000 |
823 | @@ -99,8 +99,11 @@ |
824 | |
825 | void mcl::BufferVault::alloc_buffer(geom::Size size, MirPixelFormat format, int usage) |
826 | { |
827 | +#pragma GCC diagnostic push |
828 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
829 | buffer_factory->expect_buffer(platform_factory, nullptr, size, format, static_cast<MirBufferUsage>(usage), |
830 | incoming_buffer, this); |
831 | +#pragma GCC diagnostic pop |
832 | server_requests->allocate_buffer(size, format, usage); |
833 | } |
834 | |
835 | |
836 | === modified file 'src/client/error_buffer.cpp' |
837 | --- src/client/error_buffer.cpp 2017-01-24 07:37:03 +0000 |
838 | +++ src/client/error_buffer.cpp 2017-04-11 18:27:10 +0000 |
839 | @@ -68,7 +68,12 @@ |
840 | std::shared_ptr<mcl::ClientBuffer> mcl::ErrorBuffer::client_buffer() const THROW_EXCEPTION |
841 | MirGraphicsRegion mcl::ErrorBuffer::map_region() THROW_EXCEPTION |
842 | void mcl::ErrorBuffer::unmap_region() THROW_EXCEPTION |
843 | + |
844 | +#pragma GCC diagnostic push |
845 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
846 | MirBufferUsage mcl::ErrorBuffer::buffer_usage() const THROW_EXCEPTION |
847 | +#pragma GCC diagnostic pop |
848 | + |
849 | MirPixelFormat mcl::ErrorBuffer::pixel_format() const THROW_EXCEPTION |
850 | geom::Size mcl::ErrorBuffer::size() const THROW_EXCEPTION |
851 | void mcl::ErrorBuffer::increment_age() THROW_EXCEPTION |
852 | |
853 | === modified file 'src/client/error_buffer.h' |
854 | --- src/client/error_buffer.h 2017-01-24 07:37:03 +0000 |
855 | +++ src/client/error_buffer.h 2017-04-11 18:27:10 +0000 |
856 | @@ -39,7 +39,10 @@ |
857 | std::shared_ptr<ClientBuffer> client_buffer() const override; |
858 | MirGraphicsRegion map_region() override; |
859 | void unmap_region() override; |
860 | +#pragma GCC diagnostic push |
861 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
862 | MirBufferUsage buffer_usage() const override; |
863 | +#pragma GCC diagnostic pop |
864 | MirPixelFormat pixel_format() const override; |
865 | geometry::Size size() const override; |
866 | MirConnection* allocating_connection() const override; |
867 | |
868 | === modified file 'src/client/error_render_surface.cpp' |
869 | --- src/client/error_render_surface.cpp 2017-01-18 02:29:37 +0000 |
870 | +++ src/client/error_render_surface.cpp 2017-04-11 18:27:10 +0000 |
871 | @@ -54,11 +54,14 @@ |
872 | return false; |
873 | } |
874 | |
875 | +#pragma GCC diagnostic push |
876 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
877 | MirBufferStream* mcl::ErrorRenderSurface::get_buffer_stream( |
878 | int /*width*/, int /*height*/, |
879 | MirPixelFormat /*format*/, |
880 | MirBufferUsage /*buffer_usage*/) |
881 | { |
882 | +#pragma GCC diagnostic pop |
883 | BOOST_THROW_EXCEPTION(std::runtime_error(error)); |
884 | } |
885 | |
886 | |
887 | === modified file 'src/client/error_stream.cpp' |
888 | --- src/client/error_stream.cpp 2017-03-10 19:47:57 +0000 |
889 | +++ src/client/error_stream.cpp 2017-04-11 18:27:10 +0000 |
890 | @@ -60,8 +60,11 @@ |
891 | return id; |
892 | } |
893 | |
894 | +#pragma GCC diagnostic push |
895 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
896 | MirWindowParameters mcl::ErrorStream::get_parameters() const |
897 | { |
898 | +#pragma GCC diagnostic pop |
899 | BOOST_THROW_EXCEPTION(std::runtime_error(error)); |
900 | } |
901 | std::shared_ptr<mcl::ClientBuffer> mcl::ErrorStream::get_current_buffer() |
902 | |
903 | === modified file 'src/client/error_stream.h' |
904 | --- src/client/error_stream.h 2017-03-10 19:47:57 +0000 |
905 | +++ src/client/error_stream.h 2017-04-11 18:27:10 +0000 |
906 | @@ -31,8 +31,10 @@ |
907 | ErrorStream( |
908 | std::string const& error_msg, MirConnection* conn, |
909 | frontend::BufferStreamId id, std::shared_ptr<MirWaitHandle> const& wh); |
910 | - |
911 | +#pragma GCC diagnostic push |
912 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
913 | MirWindowParameters get_parameters() const override; |
914 | +#pragma GCC diagnostic pop |
915 | std::shared_ptr<ClientBuffer> get_current_buffer() override; |
916 | uint32_t get_current_buffer_id() override; |
917 | EGLNativeWindowType egl_native_window() override; |
918 | |
919 | === modified file 'src/client/mir_buffer_stream_api.cpp' |
920 | --- src/client/mir_buffer_stream_api.cpp 2017-01-24 07:37:03 +0000 |
921 | +++ src/client/mir_buffer_stream_api.cpp 2017-04-11 18:27:10 +0000 |
922 | @@ -47,8 +47,8 @@ |
923 | |
924 | } |
925 | |
926 | - |
927 | - |
928 | +#pragma GCC diagnostic push |
929 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
930 | MirWaitHandle* mir_connection_create_buffer_stream(MirConnection *connection, |
931 | int width, int height, |
932 | MirPixelFormat format, |
933 | @@ -82,6 +82,7 @@ |
934 | MIR_LOG_UNCAUGHT_EXCEPTION(ex); |
935 | return nullptr; |
936 | } |
937 | +#pragma GCC diagnostic pop |
938 | |
939 | MirWaitHandle* mir_buffer_stream_release( |
940 | MirBufferStream* buffer_stream, |
941 | @@ -94,7 +95,10 @@ |
942 | |
943 | void mir_buffer_stream_release_sync(MirBufferStream *buffer_stream) |
944 | { |
945 | +#pragma GCC diagnostic push |
946 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
947 | mir_buffer_stream_release(buffer_stream, nullptr, nullptr)->wait_for_all(); |
948 | +#pragma GCC diagnostic pop |
949 | } |
950 | |
951 | void mir_buffer_stream_get_current_buffer(MirBufferStream* buffer_stream, MirNativeBuffer** buffer_package_out) |
952 | @@ -203,7 +207,10 @@ |
953 | |
954 | void mir_buffer_stream_set_scale_sync(MirBufferStream* opaque_stream, float scale) |
955 | { |
956 | +#pragma GCC diagnostic push |
957 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
958 | auto wh = mir_buffer_stream_set_scale(opaque_stream, scale); |
959 | +#pragma GCC diagnostic pop |
960 | if (wh) |
961 | wh->wait_for_all(); |
962 | } |
963 | |
964 | === modified file 'src/client/mir_surface_api.cpp' |
965 | --- src/client/mir_surface_api.cpp 2017-04-11 03:54:16 +0000 |
966 | +++ src/client/mir_surface_api.cpp 2017-04-11 18:27:10 +0000 |
967 | @@ -478,6 +478,8 @@ |
968 | MIR_LOG_UNCAUGHT_EXCEPTION(ex); |
969 | } |
970 | |
971 | +#pragma GCC diagnostic push |
972 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
973 | void mir_window_spec_set_buffer_usage(MirWindowSpec* spec, MirBufferUsage usage) |
974 | try |
975 | { |
976 | @@ -488,6 +490,7 @@ |
977 | { |
978 | MIR_LOG_UNCAUGHT_EXCEPTION(ex); |
979 | } |
980 | +#pragma GCC diagnostic pop |
981 | |
982 | void mir_window_spec_set_streams(MirWindowSpec* spec, MirBufferStreamInfo* streams, unsigned int size) |
983 | try |
984 | @@ -674,10 +677,13 @@ |
985 | return window->get_error_message(); |
986 | } |
987 | |
988 | +#pragma GCC diagnostic push |
989 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
990 | void mir_window_get_parameters(MirWindow* window, MirWindowParameters* parameters) |
991 | { |
992 | *parameters = window->get_parameters(); |
993 | } |
994 | +#pragma GCC diagnostic pop |
995 | |
996 | MirOrientation mir_window_get_orientation(MirWindow* window) |
997 | { |
998 | |
999 | === modified file 'src/client/render_surface.cpp' |
1000 | --- src/client/render_surface.cpp 2017-03-14 02:26:28 +0000 |
1001 | +++ src/client/render_surface.cpp 2017-04-11 18:27:10 +0000 |
1002 | @@ -55,6 +55,8 @@ |
1003 | return mf::BufferStreamId(protobuf_bs->id().value()); |
1004 | } |
1005 | |
1006 | +#pragma GCC diagnostic push |
1007 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1008 | MirBufferStream* mcl::RenderSurface::get_buffer_stream( |
1009 | int width, int height, |
1010 | MirPixelFormat format, |
1011 | @@ -71,6 +73,7 @@ |
1012 | *protobuf_bs); |
1013 | if (buffer_usage == mir_buffer_usage_hardware) |
1014 | { |
1015 | +#pragma GCC diagnostic pop |
1016 | platform->use_egl_native_window( |
1017 | wrapped_native_window, dynamic_cast<EGLNativeSurface*>(stream_from_id.get())); |
1018 | } |
1019 | |
1020 | === modified file 'src/client/screencast_stream.cpp' |
1021 | --- src/client/screencast_stream.cpp 2017-03-10 19:47:57 +0000 |
1022 | +++ src/client/screencast_stream.cpp 2017-04-11 18:27:10 +0000 |
1023 | @@ -169,6 +169,8 @@ |
1024 | screencast_wait_handle.result_received(); |
1025 | } |
1026 | |
1027 | +#pragma GCC diagnostic push |
1028 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1029 | MirWindowParameters mcl::ScreencastStream::get_parameters() const |
1030 | { |
1031 | std::lock_guard<decltype(mutex)> lock(mutex); |
1032 | @@ -180,6 +182,7 @@ |
1033 | static_cast<MirBufferUsage>(protobuf_bs->buffer_usage()), |
1034 | mir_display_output_id_invalid}; |
1035 | } |
1036 | +#pragma GCC diagnostic pop |
1037 | |
1038 | void mcl::ScreencastStream::swap_buffers_sync() |
1039 | { |
1040 | |
1041 | === modified file 'src/client/screencast_stream.h' |
1042 | --- src/client/screencast_stream.h 2017-03-10 19:47:57 +0000 |
1043 | +++ src/client/screencast_stream.h 2017-04-11 18:27:10 +0000 |
1044 | @@ -71,8 +71,10 @@ |
1045 | mir::client::rpc::DisplayServer& server, |
1046 | std::shared_ptr<ClientPlatform> const& native_window_factory, |
1047 | mir::protobuf::BufferStream const& protobuf_bs); |
1048 | - |
1049 | +#pragma GCC diagnostic push |
1050 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1051 | MirWindowParameters get_parameters() const override; |
1052 | +#pragma GCC diagnostic pop |
1053 | MirWaitHandle* swap_buffers(std::function<void()> const& done) override; |
1054 | std::shared_ptr<mir::client::ClientBuffer> get_current_buffer() override; |
1055 | uint32_t get_current_buffer_id() override; |
1056 | |
1057 | === modified file 'src/include/client/mir/client_platform.h' |
1058 | --- src/include/client/mir/client_platform.h 2017-01-30 08:13:20 +0000 |
1059 | +++ src/include/client/mir/client_platform.h 2017-04-11 18:27:10 +0000 |
1060 | @@ -74,7 +74,10 @@ |
1061 | virtual MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const = 0; |
1062 | virtual MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const = 0; |
1063 | virtual uint32_t native_format_for(MirPixelFormat) const = 0; |
1064 | +#pragma GCC diagnostic push |
1065 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1066 | virtual uint32_t native_flags_for(MirBufferUsage, mir::geometry::Size) const = 0; |
1067 | +#pragma GCC diagnostic pop |
1068 | }; |
1069 | |
1070 | } |
1071 | |
1072 | === modified file 'src/include/client/mir/egl_native_surface.h' |
1073 | --- src/include/client/mir/egl_native_surface.h 2017-01-18 02:29:37 +0000 |
1074 | +++ src/include/client/mir/egl_native_surface.h 2017-04-11 18:27:10 +0000 |
1075 | @@ -31,7 +31,10 @@ |
1076 | class EGLNativeSurface |
1077 | { |
1078 | public: |
1079 | +#pragma GCC diagnostic push |
1080 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1081 | virtual MirWindowParameters get_parameters() const = 0; |
1082 | +#pragma GCC diagnostic pop |
1083 | virtual std::shared_ptr<ClientBuffer> get_current_buffer() = 0; |
1084 | virtual void swap_buffers_sync() = 0; |
1085 | virtual void request_and_wait_for_configure(MirWindowAttrib a, int value) = 0; |
1086 | |
1087 | === modified file 'src/include/client/mir/mir_buffer.h' |
1088 | --- src/include/client/mir/mir_buffer.h 2017-01-24 07:53:36 +0000 |
1089 | +++ src/include/client/mir/mir_buffer.h 2017-04-11 18:27:10 +0000 |
1090 | @@ -44,8 +44,10 @@ |
1091 | virtual std::shared_ptr<ClientBuffer> client_buffer() const = 0; |
1092 | virtual MirGraphicsRegion map_region() = 0; |
1093 | virtual void unmap_region() = 0; |
1094 | - |
1095 | +#pragma GCC diagnostic push |
1096 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1097 | virtual MirBufferUsage buffer_usage() const = 0; |
1098 | +#pragma GCC diagnostic pop |
1099 | virtual MirPixelFormat pixel_format() const = 0; |
1100 | virtual geometry::Size size() const = 0; |
1101 | virtual MirConnection* allocating_connection() const = 0; |
1102 | |
1103 | === modified file 'src/include/client/mir/mir_buffer_stream.h' |
1104 | --- src/include/client/mir/mir_buffer_stream.h 2017-03-10 19:47:57 +0000 |
1105 | +++ src/include/client/mir/mir_buffer_stream.h 2017-04-11 18:27:10 +0000 |
1106 | @@ -77,7 +77,11 @@ |
1107 | public: |
1108 | virtual ~MirBufferStream() = default; |
1109 | |
1110 | +#pragma GCC diagnostic push |
1111 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1112 | virtual MirWindowParameters get_parameters() const = 0; |
1113 | +#pragma GCC diagnostic pop |
1114 | + |
1115 | virtual std::shared_ptr<mir::client::ClientBuffer> get_current_buffer() = 0; |
1116 | virtual uint32_t get_current_buffer_id() = 0; |
1117 | virtual EGLNativeWindowType egl_native_window() = 0; |
1118 | |
1119 | === modified file 'src/include/client/mir/mir_render_surface.h' |
1120 | --- src/include/client/mir/mir_render_surface.h 2017-03-10 19:47:57 +0000 |
1121 | +++ src/include/client/mir/mir_render_surface.h 2017-04-11 18:27:10 +0000 |
1122 | @@ -32,10 +32,13 @@ |
1123 | virtual mir::geometry::Size size() const = 0; |
1124 | virtual void set_size(mir::geometry::Size) = 0; |
1125 | virtual bool valid() const = 0; |
1126 | +#pragma GCC diagnostic push |
1127 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1128 | virtual MirBufferStream* get_buffer_stream( |
1129 | int width, int height, |
1130 | MirPixelFormat format, |
1131 | MirBufferUsage buffer_usage) = 0; |
1132 | +#pragma GCC diagnostic pop |
1133 | virtual MirPresentationChain* get_presentation_chain() = 0; |
1134 | virtual char const* get_error_message() const = 0; |
1135 | virtual ~MirRenderSurface() = default; |
1136 | |
1137 | === modified file 'src/platforms/android/client/android_client_platform.cpp' |
1138 | --- src/platforms/android/client/android_client_platform.cpp 2017-03-16 03:23:51 +0000 |
1139 | +++ src/platforms/android/client/android_client_platform.cpp 2017-04-11 18:27:10 +0000 |
1140 | @@ -474,7 +474,10 @@ |
1141 | return mga::to_android_format(format); |
1142 | } |
1143 | |
1144 | +#pragma GCC diagnostic push |
1145 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1146 | uint32_t mcla::AndroidClientPlatform::native_flags_for(MirBufferUsage usage, mir::geometry::Size) const |
1147 | { |
1148 | +#pragma GCC diagnostic pop |
1149 | return mga::convert_to_android_usage(static_cast<mir::graphics::BufferUsage>(usage)); |
1150 | } |
1151 | |
1152 | === modified file 'src/platforms/android/client/android_client_platform.h' |
1153 | --- src/platforms/android/client/android_client_platform.h 2017-03-14 04:41:33 +0000 |
1154 | +++ src/platforms/android/client/android_client_platform.h 2017-04-11 18:27:10 +0000 |
1155 | @@ -49,7 +49,10 @@ |
1156 | MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override; |
1157 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; |
1158 | uint32_t native_format_for(MirPixelFormat) const override; |
1159 | +#pragma GCC diagnostic push |
1160 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1161 | uint32_t native_flags_for(MirBufferUsage, mir::geometry::Size) const override; |
1162 | +#pragma GCC diagnostic pop |
1163 | |
1164 | private: |
1165 | ClientContext* const context; |
1166 | |
1167 | === modified file 'src/platforms/android/utils/test_android_hardware_sanity.cpp' |
1168 | --- src/platforms/android/utils/test_android_hardware_sanity.cpp 2017-01-30 05:18:36 +0000 |
1169 | +++ src/platforms/android/utils/test_android_hardware_sanity.cpp 2017-04-11 18:27:10 +0000 |
1170 | @@ -117,17 +117,22 @@ |
1171 | |
1172 | auto const spec = mir_create_normal_window_spec( |
1173 | connection, test_width, test_height); |
1174 | +#pragma GCC diagnostic push |
1175 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1176 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
1177 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software); |
1178 | +#pragma GCC diagnostic pop |
1179 | auto const window = mir_create_window_sync(spec); |
1180 | mir_window_spec_release(spec); |
1181 | |
1182 | EXPECT_THAT(window, IsValid()); |
1183 | MirGraphicsRegion graphics_region; |
1184 | +#pragma GCC diagnostic push |
1185 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1186 | mir_buffer_stream_get_graphics_region(mir_window_get_buffer_stream(window), &graphics_region); |
1187 | draw_pattern.draw(graphics_region); |
1188 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
1189 | - |
1190 | +#pragma GCC diagnostic pop |
1191 | auto scene = runner->config.the_scene(); |
1192 | auto seq = scene->scene_elements_for(this); |
1193 | ASSERT_THAT(seq, testing::SizeIs(1)); |
1194 | @@ -166,23 +171,30 @@ |
1195 | EGL_NONE }; |
1196 | EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; |
1197 | |
1198 | +#pragma GCC diagnostic push |
1199 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1200 | auto native_display = mir_connection_get_egl_native_display(connection); |
1201 | +#pragma GCC diagnostic pop |
1202 | auto egl_display = eglGetDisplay(native_display); |
1203 | eglInitialize(egl_display, &major, &minor); |
1204 | eglChooseConfig(egl_display, attribs, &egl_config, 1, &n); |
1205 | |
1206 | eglGetConfigAttrib(egl_display, egl_config, EGL_NATIVE_VISUAL_ID, &visual_id); |
1207 | auto const spec = mir_create_normal_window_spec(connection, test_width, test_height); |
1208 | +#pragma GCC diagnostic push |
1209 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1210 | mir_window_spec_set_pixel_format(spec, select_format_for_visual_id(visual_id)); |
1211 | - |
1212 | +#pragma GCC diagnostic pop |
1213 | auto const mir_surface = mir_create_window_sync(spec); |
1214 | mir_window_spec_release(spec); |
1215 | |
1216 | EXPECT_THAT(mir_surface, IsValid()); |
1217 | |
1218 | +#pragma GCC diagnostic push |
1219 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1220 | auto native_window = static_cast<EGLNativeWindowType>( |
1221 | mir_buffer_stream_get_egl_native_window(mir_window_get_buffer_stream(mir_surface))); |
1222 | - |
1223 | +#pragma GCC diagnostic pop |
1224 | egl_surface = eglCreateWindowSurface(egl_display, egl_config, native_window, NULL); |
1225 | context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, context_attribs); |
1226 | eglMakeCurrent(egl_display, egl_surface, egl_surface, context); |
1227 | |
1228 | === modified file 'src/platforms/eglstream-kms/client/client_platform.cpp' |
1229 | --- src/platforms/eglstream-kms/client/client_platform.cpp 2017-01-30 08:13:20 +0000 |
1230 | +++ src/platforms/eglstream-kms/client/client_platform.cpp 2017-04-11 18:27:10 +0000 |
1231 | @@ -91,7 +91,10 @@ |
1232 | BOOST_THROW_EXCEPTION(std::runtime_error{"no buffer support"}); |
1233 | } |
1234 | |
1235 | +#pragma GCC diagnostic push |
1236 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1237 | uint32_t mcle::ClientPlatform::native_flags_for(MirBufferUsage, mir::geometry::Size) const |
1238 | { |
1239 | +#pragma GCC diagnostic pop |
1240 | BOOST_THROW_EXCEPTION(std::runtime_error{"no buffer support"}); |
1241 | } |
1242 | |
1243 | === modified file 'src/platforms/eglstream-kms/client/client_platform.h' |
1244 | --- src/platforms/eglstream-kms/client/client_platform.h 2017-01-30 08:13:20 +0000 |
1245 | +++ src/platforms/eglstream-kms/client/client_platform.h 2017-04-11 18:27:10 +0000 |
1246 | @@ -43,7 +43,10 @@ |
1247 | MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override; |
1248 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; |
1249 | uint32_t native_format_for(MirPixelFormat) const override; |
1250 | +#pragma GCC diagnostic push |
1251 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1252 | uint32_t native_flags_for(MirBufferUsage, mir::geometry::Size) const override; |
1253 | +#pragma GCC diagnostic pop |
1254 | }; |
1255 | |
1256 | } |
1257 | |
1258 | === modified file 'src/platforms/mesa/client/client_platform.cpp' |
1259 | --- src/platforms/mesa/client/client_platform.cpp 2017-03-16 03:23:51 +0000 |
1260 | +++ src/platforms/mesa/client/client_platform.cpp 2017-04-11 18:27:10 +0000 |
1261 | @@ -445,8 +445,12 @@ |
1262 | return mgm::mir_format_to_gbm_format(format); |
1263 | } |
1264 | |
1265 | +#pragma GCC diagnostic push |
1266 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1267 | uint32_t mclm::ClientPlatform::native_flags_for(MirBufferUsage, mir::geometry::Size size) const |
1268 | { |
1269 | +#pragma GCC diagnostic pop |
1270 | + |
1271 | uint32_t bo_flags{GBM_BO_USE_RENDERING}; |
1272 | if (size.width.as_uint32_t() >= 800 && size.height.as_uint32_t() >= 600) |
1273 | bo_flags |= GBM_BO_USE_SCANOUT; |
1274 | |
1275 | === modified file 'src/platforms/mesa/client/client_platform.h' |
1276 | --- src/platforms/mesa/client/client_platform.h 2017-03-16 03:23:51 +0000 |
1277 | +++ src/platforms/mesa/client/client_platform.h 2017-04-11 18:27:10 +0000 |
1278 | @@ -56,7 +56,10 @@ |
1279 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; |
1280 | void set_gbm_device(gbm_device*); |
1281 | uint32_t native_format_for(MirPixelFormat) const override; |
1282 | +#pragma GCC diagnostic push |
1283 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1284 | uint32_t native_flags_for(MirBufferUsage, mir::geometry::Size) const override; |
1285 | +#pragma GCC diagnostic pop |
1286 | |
1287 | private: |
1288 | ClientContext* const context; |
1289 | |
1290 | === modified file 'src/platforms/mesa/client/native_surface.cpp' |
1291 | --- src/platforms/mesa/client/native_surface.cpp 2017-01-18 02:29:37 +0000 |
1292 | +++ src/platforms/mesa/client/native_surface.cpp 2017-04-11 18:27:10 +0000 |
1293 | @@ -41,9 +41,12 @@ |
1294 | return s->advance_buffer(buffer_package); |
1295 | } |
1296 | |
1297 | +#pragma GCC diagnostic push |
1298 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1299 | static int get_parameters_static(MirMesaEGLNativeSurface* surface, |
1300 | MirWindowParameters* surface_parameters) |
1301 | { |
1302 | +#pragma GCC diagnostic pop |
1303 | auto s = static_cast<mclm::NativeSurface*>(surface); |
1304 | return s->get_parameters(surface_parameters); |
1305 | } |
1306 | @@ -94,6 +97,8 @@ |
1307 | return MIR_MESA_FALSE; |
1308 | } |
1309 | |
1310 | +#pragma GCC diagnostic push |
1311 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1312 | int mclm::NativeSurface::get_parameters(MirWindowParameters* surface_parameters) |
1313 | try |
1314 | { |
1315 | @@ -107,6 +112,7 @@ |
1316 | MIR_LOG_DRIVER_BOUNDARY_EXCEPTION(e); |
1317 | return MIR_MESA_FALSE; |
1318 | } |
1319 | +#pragma GCC diagnostic pop |
1320 | |
1321 | int mclm::NativeSurface::set_swapinterval(int interval) |
1322 | try |
1323 | |
1324 | === modified file 'src/platforms/mesa/client/native_surface.h' |
1325 | --- src/platforms/mesa/client/native_surface.h 2017-01-18 02:29:37 +0000 |
1326 | +++ src/platforms/mesa/client/native_surface.h 2017-04-11 18:27:10 +0000 |
1327 | @@ -35,7 +35,10 @@ |
1328 | explicit NativeSurface(EGLNativeSurface*); |
1329 | |
1330 | int advance_buffer(MirBufferPackage* buffer_package); |
1331 | +#pragma GCC diagnostic push |
1332 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1333 | int get_parameters(MirWindowParameters* surface_parameters); |
1334 | +#pragma GCC diagnostic pop |
1335 | int set_swapinterval(int interval); |
1336 | void use_native_surface(EGLNativeSurface* native_surface); |
1337 | |
1338 | |
1339 | === modified file 'src/server/graphics/nested/mir_client_host_connection.cpp' |
1340 | --- src/server/graphics/nested/mir_client_host_connection.cpp 2017-03-20 18:24:55 +0000 |
1341 | +++ src/server/graphics/nested/mir_client_host_connection.cpp 2017-04-11 18:27:10 +0000 |
1342 | @@ -353,8 +353,11 @@ |
1343 | |
1344 | EGLNativeDisplayType mgn::MirClientHostConnection::egl_native_display() |
1345 | { |
1346 | +#pragma GCC diagnostic push |
1347 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1348 | return reinterpret_cast<EGLNativeDisplayType>( |
1349 | mir_connection_get_egl_native_display(mir_connection)); |
1350 | +#pragma GCC diagnostic pop |
1351 | } |
1352 | |
1353 | auto mgn::MirClientHostConnection::create_display_config() |
1354 | @@ -397,6 +400,8 @@ |
1355 | properties.size.height.as_int()), |
1356 | mir_window_spec_release); |
1357 | |
1358 | +#pragma GCC diagnostic push |
1359 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1360 | MirBufferUsage usage = (properties.usage == mg::BufferUsage::hardware) ? |
1361 | mir_buffer_usage_hardware : mir_buffer_usage_software; |
1362 | |
1363 | @@ -406,6 +411,7 @@ |
1364 | mir_window_spec_set_fullscreen_on_output(spec.get(), output_id); |
1365 | MirBufferStreamInfo info { stream->handle(), displacement.dx.as_int(), displacement.dy.as_int() }; |
1366 | mir_window_spec_set_streams(spec.get(), &info, 1); |
1367 | +#pragma GCC diagnostic pop |
1368 | |
1369 | auto surf = std::shared_ptr<MirClientHostSurface>( |
1370 | new MirClientHostSurface(mir_connection, spec.get()), |
1371 | |
1372 | === modified file 'src/utils/screencast.cpp' |
1373 | --- src/utils/screencast.cpp 2017-01-18 13:59:18 +0000 |
1374 | +++ src/utils/screencast.cpp 2017-04-11 18:27:10 +0000 |
1375 | @@ -350,7 +350,8 @@ |
1376 | static EGLint const context_attribs[] = { |
1377 | EGL_CONTEXT_CLIENT_VERSION, 2, |
1378 | EGL_NONE }; |
1379 | - |
1380 | +#pragma GCC diagnostic push |
1381 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1382 | auto native_display = |
1383 | reinterpret_cast<EGLNativeDisplayType>( |
1384 | mir_connection_get_egl_native_display(connection)); |
1385 | @@ -358,7 +359,7 @@ |
1386 | auto native_window = |
1387 | reinterpret_cast<EGLNativeWindowType>( |
1388 | mir_buffer_stream_get_egl_native_window(buffer_stream)); |
1389 | - |
1390 | +#pragma GCC diagnostic pop |
1391 | egl_display = eglGetDisplay(native_display); |
1392 | |
1393 | eglInitialize(egl_display, nullptr, nullptr); |
1394 | |
1395 | === modified file 'tests/acceptance-tests/client_mediated_user_gestures.cpp' |
1396 | --- tests/acceptance-tests/client_mediated_user_gestures.cpp 2017-03-31 10:13:00 +0000 |
1397 | +++ tests/acceptance-tests/client_mediated_user_gestures.cpp 2017-04-11 18:27:10 +0000 |
1398 | @@ -193,8 +193,11 @@ |
1399 | have_focus.raise(); |
1400 | }); |
1401 | |
1402 | +#pragma GCC diagnostic push |
1403 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1404 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
1405 | - |
1406 | +#pragma GCC diagnostic pop |
1407 | + |
1408 | EXPECT_THAT(have_focus.wait_for(receive_event_timeout), Eq(true)); |
1409 | |
1410 | reset_window_event_handler(); |
1411 | |
1412 | === modified file 'tests/acceptance-tests/drag_and_drop.cpp' |
1413 | --- tests/acceptance-tests/drag_and_drop.cpp 2017-03-24 10:16:59 +0000 |
1414 | +++ tests/acceptance-tests/drag_and_drop.cpp 2017-04-11 18:27:10 +0000 |
1415 | @@ -158,6 +158,8 @@ |
1416 | |
1417 | void create_target_window() |
1418 | { |
1419 | +#pragma GCC diagnostic push |
1420 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1421 | another_connection = mir_connect_sync(new_connection().c_str(), "another_connection"); |
1422 | auto const spec = mir_create_normal_window_spec( |
1423 | connection, screen_geometry.size.width.as_int(), screen_geometry.size.height.as_int()); |
1424 | @@ -165,6 +167,7 @@ |
1425 | mir_window_spec_set_name(spec, "target_window"); |
1426 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
1427 | mir_window_spec_set_event_handler(spec, &window_event_handler, this); |
1428 | +#pragma GCC diagnostic pop |
1429 | |
1430 | target_window = mir_create_window_sync(spec); |
1431 | mir_window_spec_release(spec); |
1432 | @@ -234,9 +237,10 @@ |
1433 | if (mir_window_event_get_attribute_value(window_event)) |
1434 | have_focus.raise(); |
1435 | }); |
1436 | - |
1437 | +#pragma GCC diagnostic push |
1438 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1439 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(w)); |
1440 | - |
1441 | +#pragma GCC diagnostic pop |
1442 | EXPECT_THAT(have_focus.wait_for(receive_event_timeout), Eq(true)); |
1443 | |
1444 | reset_window_event_handler(w); |
1445 | |
1446 | === modified file 'tests/acceptance-tests/test_buffer_stream_arrangement.cpp' |
1447 | --- tests/acceptance-tests/test_buffer_stream_arrangement.cpp 2017-03-14 02:26:28 +0000 |
1448 | +++ tests/acceptance-tests/test_buffer_stream_arrangement.cpp 2017-04-11 18:27:10 +0000 |
1449 | @@ -67,6 +67,8 @@ |
1450 | swap_buffers(); |
1451 | } |
1452 | |
1453 | +#pragma GCC diagnostic push |
1454 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1455 | mt::LegacyStream::LegacyStream(MirConnection* connection, |
1456 | geom::Size physical_size, |
1457 | geom::Rectangle position) : |
1458 | @@ -296,3 +298,4 @@ |
1459 | |
1460 | EXPECT_THAT(mir_window_get_buffer_stream(window), Eq(nullptr)); |
1461 | } |
1462 | +#pragma GCC diagnostic pop |
1463 | \ No newline at end of file |
1464 | |
1465 | === modified file 'tests/acceptance-tests/test_client_cookie.cpp' |
1466 | --- tests/acceptance-tests/test_client_cookie.cpp 2017-03-14 02:26:28 +0000 |
1467 | +++ tests/acceptance-tests/test_client_cookie.cpp 2017-04-11 18:27:10 +0000 |
1468 | @@ -59,14 +59,18 @@ |
1469 | |
1470 | // Need fullscreen for the cursor events |
1471 | auto const spec = mir_create_normal_window_spec(connection, 100, 100); |
1472 | +#pragma GCC diagnostic push |
1473 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1474 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
1475 | +#pragma GCC diagnostic pop |
1476 | mir_window_spec_set_fullscreen_on_output(spec, 1); |
1477 | mir_window_spec_set_event_handler(spec, &cookie_capturing_callback, this); |
1478 | window = mir_create_window_sync(spec); |
1479 | mir_window_spec_release(spec); |
1480 | - |
1481 | +#pragma GCC diagnostic push |
1482 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1483 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
1484 | - |
1485 | +#pragma GCC diagnostic pop |
1486 | ready_to_accept_events.wait_for(max_wait); |
1487 | if (!ready_to_accept_events.raised()) |
1488 | BOOST_THROW_EXCEPTION(std::runtime_error("Timeout waiting for window to become focused and exposed")); |
1489 | |
1490 | === modified file 'tests/acceptance-tests/test_client_cursor_api.cpp' |
1491 | --- tests/acceptance-tests/test_client_cursor_api.cpp 2017-04-11 03:54:16 +0000 |
1492 | +++ tests/acceptance-tests/test_client_cursor_api.cpp 2017-04-11 18:27:10 +0000 |
1493 | @@ -189,7 +189,10 @@ |
1494 | MirWindow *make_window(MirConnection *connection, std::string const& client_name) |
1495 | { |
1496 | auto spec = mir_create_normal_window_spec(connection, 1, 1); |
1497 | +#pragma GCC diagnostic push |
1498 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1499 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
1500 | +#pragma GCC diagnostic pop |
1501 | mir_window_spec_set_name(spec, client_name.c_str()); |
1502 | |
1503 | WindowReadyHandler event_handler; |
1504 | @@ -198,8 +201,10 @@ |
1505 | auto const window = mir_create_window_sync(spec); |
1506 | mir_window_spec_release(spec); |
1507 | |
1508 | +#pragma GCC diagnostic push |
1509 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1510 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
1511 | - |
1512 | +#pragma GCC diagnostic pop |
1513 | event_handler.wait_for_window_to_become_focused_and_exposed(); |
1514 | mir_window_set_event_handler(window, nullptr, nullptr); |
1515 | |
1516 | @@ -275,6 +280,8 @@ |
1517 | MirWindowSpec * const spec; |
1518 | }; |
1519 | |
1520 | +#pragma GCC diagnostic push |
1521 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1522 | struct BufferStream |
1523 | { |
1524 | BufferStream(MirConnection *connection) |
1525 | @@ -282,13 +289,10 @@ |
1526 | stream{mir_connection_create_buffer_stream_sync(connection, 24, 24, mir_pixel_format_argb_8888,mir_buffer_usage_software)} |
1527 | {} |
1528 | |
1529 | -#pragma GCC diagnostic push |
1530 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1531 | BufferStream(RenderSurface const& surface) |
1532 | : stream_owned(false), |
1533 | stream{mir_render_surface_get_buffer_stream(surface.get(), 24, 24, mir_pixel_format_argb_8888)} |
1534 | {} |
1535 | -#pragma GCC diagnostic pop |
1536 | |
1537 | ~BufferStream() |
1538 | { |
1539 | @@ -304,6 +308,7 @@ |
1540 | bool stream_owned; |
1541 | MirBufferStream *stream; |
1542 | }; |
1543 | +#pragma GCC diagnostic pop |
1544 | |
1545 | #pragma GCC diagnostic push |
1546 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1547 | |
1548 | === modified file 'tests/acceptance-tests/test_client_focus_notification.cpp' |
1549 | --- tests/acceptance-tests/test_client_focus_notification.cpp 2017-01-18 02:29:37 +0000 |
1550 | +++ tests/acceptance-tests/test_client_focus_notification.cpp 2017-04-11 18:27:10 +0000 |
1551 | @@ -41,13 +41,18 @@ |
1552 | connection(connection) |
1553 | { |
1554 | auto spec = mir_create_normal_window_spec(connection, 100, 100); |
1555 | +#pragma GCC diagnostic push |
1556 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1557 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
1558 | +#pragma GCC diagnostic pop |
1559 | mir_window_spec_set_event_handler(spec, FocusSurface::handle_event, this); |
1560 | |
1561 | window = mir_create_window_sync(spec); |
1562 | mir_window_spec_release(spec); |
1563 | - |
1564 | +#pragma GCC diagnostic push |
1565 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1566 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
1567 | +#pragma GCC diagnostic pop |
1568 | } |
1569 | |
1570 | ~FocusSurface() |
1571 | |
1572 | === modified file 'tests/acceptance-tests/test_client_input.cpp' |
1573 | --- tests/acceptance-tests/test_client_input.cpp 2017-04-06 13:43:19 +0000 |
1574 | +++ tests/acceptance-tests/test_client_input.cpp 2017-04-11 18:27:10 +0000 |
1575 | @@ -179,7 +179,10 @@ |
1576 | mir_connection_get_error_message(connection)}); |
1577 | } |
1578 | auto spec = mir_create_normal_window_spec(connection, surface_width, surface_height); |
1579 | +#pragma GCC diagnostic push |
1580 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1581 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
1582 | +#pragma GCC diagnostic pop |
1583 | mir_window_spec_set_event_handler(spec, handle_event, this); |
1584 | mir_window_spec_set_name(spec, name.c_str()); |
1585 | window = mir_create_window_sync(spec); |
1586 | @@ -188,9 +191,11 @@ |
1587 | BOOST_THROW_EXCEPTION(std::runtime_error{std::string{"Failed creating a window: "}+ |
1588 | mir_window_get_error_message(window)}); |
1589 | |
1590 | +#pragma GCC diagnostic push |
1591 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1592 | mir_buffer_stream_swap_buffers_sync( |
1593 | mir_window_get_buffer_stream(window)); |
1594 | - |
1595 | +#pragma GCC diagnostic pop |
1596 | ready_to_accept_events.wait_for(4s); |
1597 | if (!ready_to_accept_events.raised()) |
1598 | BOOST_THROW_EXCEPTION(std::runtime_error("Timeout waiting for window to become focused and exposed")); |
1599 | |
1600 | === modified file 'tests/acceptance-tests/test_client_library.cpp' |
1601 | --- tests/acceptance-tests/test_client_library.cpp 2017-03-10 19:47:57 +0000 |
1602 | +++ tests/acceptance-tests/test_client_library.cpp 2017-04-11 18:27:10 +0000 |
1603 | @@ -46,6 +46,7 @@ |
1604 | { |
1605 | #pragma GCC diagnostic push |
1606 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1607 | + |
1608 | // Assert our MirSurfaceType is 1to1 to MirWindowType |
1609 | static_assert( |
1610 | static_cast<int32_t>(mir_surface_type_normal) == |
1611 | @@ -151,7 +152,6 @@ |
1612 | "mir_surface_visibility_exposed != mir_window_visibility_exposed"); |
1613 | static_assert(sizeof(MirSurfaceVisibility) == sizeof(MirWindowVisibility), |
1614 | "sizeof(MirSurfaceVisibility) != sizeof(MirWindowVisibility)"); |
1615 | -#pragma GCC diagnostic pop |
1616 | |
1617 | struct ClientLibrary : mtf::HeadlessInProcessServer |
1618 | { |
1619 | @@ -239,8 +239,6 @@ |
1620 | { |
1621 | for (int i = 0; i < 10; i++) |
1622 | { |
1623 | -#pragma GCC diagnostic push |
1624 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1625 | mir_wait_for_one(mir_surface_set_state(surf, |
1626 | mir_surface_state_maximized)); |
1627 | mir_wait_for_one(mir_surface_set_state(surf, |
1628 | @@ -249,7 +247,6 @@ |
1629 | mir_surface_state_fullscreen)); |
1630 | mir_wait_for_one(mir_surface_set_state(surf, |
1631 | mir_surface_state_minimized)); |
1632 | -#pragma GCC diagnostic pop |
1633 | } |
1634 | } |
1635 | }; |
1636 | @@ -263,10 +260,10 @@ |
1637 | { |
1638 | MirWaitHandle* wh = mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this); |
1639 | EXPECT_THAT(wh, NotNull()); |
1640 | -#pragma GCC diagnostic push |
1641 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1642 | + |
1643 | + |
1644 | mir_wait_for(wh); |
1645 | -#pragma GCC diagnostic pop |
1646 | + |
1647 | |
1648 | ASSERT_THAT(connection, NotNull()); |
1649 | EXPECT_TRUE(mir_connection_is_valid(connection)); |
1650 | @@ -349,10 +346,7 @@ |
1651 | |
1652 | TEST_F(ClientLibrary, creates_surface) |
1653 | { |
1654 | -#pragma GCC diagnostic push |
1655 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1656 | mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this)); |
1657 | -#pragma GCC diagnostic pop |
1658 | |
1659 | int request_width = 640, request_height = 480; |
1660 | MirPixelFormat request_format = mir_pixel_format_abgr_8888; |
1661 | @@ -407,8 +401,6 @@ |
1662 | |
1663 | EXPECT_THAT(mir_window_get_state(window), Eq(mir_window_state_restored)); |
1664 | |
1665 | -#pragma GCC diagnostic push |
1666 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1667 | mir_wait_for(mir_surface_set_state(window, mir_surface_state_fullscreen)); |
1668 | EXPECT_THAT(mir_surface_get_state(window), Eq(mir_surface_state_fullscreen)); |
1669 | |
1670 | @@ -429,7 +421,6 @@ |
1671 | mir_wait_for(mir_surface_set_state(window, mir_surface_state_fullscreen)); |
1672 | ASSERT_THAT(mir_surface_get_state(window), Eq(mir_surface_state_fullscreen)); |
1673 | } |
1674 | -#pragma GCC diagnostic pop |
1675 | |
1676 | mir_window_release_sync(window); |
1677 | mir_connection_release(connection); |
1678 | @@ -443,6 +434,7 @@ |
1679 | auto const format = mir_pixel_format_abgr_8888; |
1680 | auto const spec = mir_create_normal_window_spec(connection, width, height); |
1681 | mir_window_spec_set_pixel_format(spec, format); |
1682 | + |
1683 | mir_window_spec_set_pointer_confinement(spec, mir_pointer_confined_to_window); |
1684 | window = mir_create_window_sync(spec); |
1685 | mir_window_spec_release(spec); |
1686 | @@ -594,8 +586,10 @@ |
1687 | window = mir_create_window_sync(spec); |
1688 | |
1689 | MirNativeBuffer *native; |
1690 | + |
1691 | auto bs = mir_window_get_buffer_stream(window); |
1692 | mir_buffer_stream_get_current_buffer(bs, &native); |
1693 | + |
1694 | EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout); |
1695 | mir_buffer_stream_swap_buffers_sync(bs); |
1696 | EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout); |
1697 | @@ -605,21 +599,25 @@ |
1698 | mir_window_spec_set_height(spec, 100); |
1699 | |
1700 | window = mir_create_window_sync(spec); |
1701 | + |
1702 | bs = mir_window_get_buffer_stream(window); |
1703 | mir_buffer_stream_get_current_buffer(bs, &native); |
1704 | + |
1705 | EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout); |
1706 | mir_buffer_stream_swap_buffers_sync(bs); |
1707 | EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout); |
1708 | mir_window_release_sync(window); |
1709 | |
1710 | - |
1711 | mir_window_spec_set_width(spec, 800); |
1712 | mir_window_spec_set_height(spec, 600); |
1713 | + |
1714 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software); |
1715 | |
1716 | window = mir_create_window_sync(spec); |
1717 | + |
1718 | bs = mir_window_get_buffer_stream(window); |
1719 | mir_buffer_stream_get_current_buffer(bs, &native); |
1720 | + |
1721 | EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout); |
1722 | mir_buffer_stream_swap_buffers_sync(bs); |
1723 | EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout); |
1724 | @@ -630,6 +628,7 @@ |
1725 | window = mir_create_window_sync(spec); |
1726 | bs = mir_window_get_buffer_stream(window); |
1727 | mir_buffer_stream_get_current_buffer(bs, &native); |
1728 | + |
1729 | EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout); |
1730 | mir_buffer_stream_swap_buffers_sync(bs); |
1731 | EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout); |
1732 | @@ -661,6 +660,7 @@ |
1733 | mir_window_spec_set_height(spec, size.height); |
1734 | |
1735 | window = mir_create_window_sync(spec); |
1736 | + |
1737 | auto bs = mir_window_get_buffer_stream(window); |
1738 | |
1739 | MirNativeBuffer *native = NULL; |
1740 | @@ -687,16 +687,14 @@ |
1741 | int const n_surfaces = 13; |
1742 | size_t old_surface_count = 0; |
1743 | |
1744 | -#pragma GCC diagnostic push |
1745 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1746 | mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this)); |
1747 | -#pragma GCC diagnostic pop |
1748 | |
1749 | auto const spec = |
1750 | mir_create_normal_window_spec(connection, 640, 480); |
1751 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
1752 | |
1753 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
1754 | + |
1755 | for (int i = 0; i != n_surfaces; ++i) |
1756 | { |
1757 | old_surface_count = current_surface_count(); |
1758 | @@ -725,18 +723,14 @@ |
1759 | |
1760 | TEST_F(ClientLibrary, client_library_accesses_and_advances_buffers) |
1761 | { |
1762 | -#pragma GCC diagnostic push |
1763 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1764 | mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this)); |
1765 | -#pragma GCC diagnostic pop |
1766 | |
1767 | window = mtf::make_any_surface(connection); |
1768 | |
1769 | buffers = 0; |
1770 | -#pragma GCC diagnostic push |
1771 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1772 | + |
1773 | mir_wait_for(mir_buffer_stream_swap_buffers(mir_window_get_buffer_stream(window), swap_buffers_callback, this)); |
1774 | -#pragma GCC diagnostic pop |
1775 | + |
1776 | EXPECT_THAT(buffers, Eq(1)); |
1777 | |
1778 | mir_window_release(window, release_surface_callback, this); |
1779 | @@ -754,6 +748,7 @@ |
1780 | window = mtf::make_any_surface(connection); |
1781 | |
1782 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
1783 | + |
1784 | EXPECT_TRUE(mir_window_is_valid(window)); |
1785 | EXPECT_STREQ(mir_window_get_error_message(window), ""); |
1786 | |
1787 | @@ -790,18 +785,14 @@ |
1788 | TEST_F(ClientLibrary, accesses_platform_package) |
1789 | { |
1790 | using namespace testing; |
1791 | -#pragma GCC diagnostic push |
1792 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1793 | + |
1794 | mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this)); |
1795 | -#pragma GCC diagnostic pop |
1796 | |
1797 | MirPlatformPackage platform_package; |
1798 | ::memset(&platform_package, -1, sizeof(platform_package)); |
1799 | |
1800 | -#pragma GCC diagnostic push |
1801 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1802 | mir_connection_get_platform(connection, &platform_package); |
1803 | -#pragma GCC diagnostic pop |
1804 | + |
1805 | EXPECT_THAT(platform_package, mtf::IsStubPlatformPackage()); |
1806 | |
1807 | mir_connection_release(connection); |
1808 | @@ -809,10 +800,7 @@ |
1809 | |
1810 | TEST_F(ClientLibrary, accesses_display_info) |
1811 | { |
1812 | -#pragma GCC diagnostic push |
1813 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1814 | mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this)); |
1815 | -#pragma GCC diagnostic pop |
1816 | |
1817 | auto configuration = mir_connection_create_display_configuration(connection); |
1818 | ASSERT_THAT(configuration, NotNull()); |
1819 | @@ -836,10 +824,7 @@ |
1820 | |
1821 | TEST_F(ClientLibrary, MultiSurfaceClientTracksBufferFdsCorrectly) |
1822 | { |
1823 | -#pragma GCC diagnostic push |
1824 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1825 | mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this)); |
1826 | -#pragma GCC diagnostic pop |
1827 | |
1828 | auto const surf_one = mtf::make_any_surface(connection); |
1829 | auto const surf_two = mtf::make_any_surface(connection); |
1830 | @@ -901,6 +886,7 @@ |
1831 | int const width{800}, height{600}; |
1832 | MirPixelFormat const format{mir_pixel_format_bgr_888}; |
1833 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); |
1834 | + |
1835 | mir_window_spec_set_pixel_format(surface_spec, format); |
1836 | |
1837 | auto window = mir_create_window_sync(surface_spec); |
1838 | @@ -927,6 +913,7 @@ |
1839 | int const width{800}, height{600}; |
1840 | MirPixelFormat const format{mir_pixel_format_xbgr_8888}; |
1841 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); |
1842 | + |
1843 | mir_window_spec_set_pixel_format(surface_spec, format); |
1844 | |
1845 | window = mir_create_window_sync(surface_spec); |
1846 | @@ -935,6 +922,7 @@ |
1847 | EXPECT_THAT(window, IsValid()); |
1848 | |
1849 | MirNativeBuffer* native_buffer; |
1850 | + |
1851 | mir_buffer_stream_get_current_buffer( |
1852 | mir_window_get_buffer_stream(window), &native_buffer); |
1853 | |
1854 | @@ -1120,8 +1108,8 @@ |
1855 | mir_connection_release(connection); |
1856 | } |
1857 | |
1858 | -#pragma GCC diagnostic push |
1859 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1860 | + |
1861 | + |
1862 | TEST_F(ClientLibrary, can_get_persistent_surface_id) |
1863 | { |
1864 | auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__); |
1865 | @@ -1183,7 +1171,7 @@ |
1866 | mir_connection_release(first_client); |
1867 | mir_connection_release(im_client); |
1868 | } |
1869 | -#pragma GCC diagnostic pop |
1870 | + |
1871 | |
1872 | //lp:1661704 |
1873 | TEST_F(ClientLibrary, can_get_window_id_more_than_once_in_quick_succession) |
1874 | @@ -1232,3 +1220,4 @@ |
1875 | MIR_CLIENT_API_VERSION_MINOR, |
1876 | MIR_CLIENT_API_VERSION_PATCH) == mir_get_client_api_version()); |
1877 | } |
1878 | +#pragma GCC diagnostic pop |
1879 | |
1880 | === modified file 'tests/acceptance-tests/test_client_library_callbacks.cpp' |
1881 | --- tests/acceptance-tests/test_client_library_callbacks.cpp 2017-01-18 16:58:17 +0000 |
1882 | +++ tests/acceptance-tests/test_client_library_callbacks.cpp 2017-04-11 18:27:10 +0000 |
1883 | @@ -154,11 +154,11 @@ |
1884 | { |
1885 | connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__); |
1886 | window = mtf::make_any_surface(connection); |
1887 | - |
1888 | +#pragma GCC diagnostic push |
1889 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1890 | auto const wh = mir_buffer_stream_swap_buffers( |
1891 | mir_window_get_buffer_stream(window), swap_buffers_callback, this); |
1892 | -#pragma GCC diagnostic push |
1893 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1894 | + |
1895 | mir_wait_for(wh); |
1896 | #pragma GCC diagnostic pop |
1897 | |
1898 | |
1899 | === modified file 'tests/acceptance-tests/test_client_library_errors.cpp' |
1900 | --- tests/acceptance-tests/test_client_library_errors.cpp 2017-03-10 19:47:57 +0000 |
1901 | +++ tests/acceptance-tests/test_client_library_errors.cpp 2017-04-11 18:27:10 +0000 |
1902 | @@ -91,7 +91,10 @@ |
1903 | ASSERT_THAT(connection, IsValid()); |
1904 | |
1905 | auto spec = mir_create_normal_window_spec(connection, 800, 600); |
1906 | +#pragma GCC diagnostic push |
1907 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1908 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888); |
1909 | +#pragma GCC diagnostic pop |
1910 | auto window = mir_create_window_sync(spec); |
1911 | mir_window_spec_release(spec); |
1912 | |
1913 | @@ -103,6 +106,8 @@ |
1914 | mir_connection_release(connection); |
1915 | } |
1916 | |
1917 | +#pragma GCC diagnostic push |
1918 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1919 | TEST_F(ClientLibraryErrors, create_buffer_stream_returns_error_object_on_failure) |
1920 | { |
1921 | std::string const exception_text{"Extravaganza!"}; |
1922 | @@ -123,6 +128,7 @@ |
1923 | mir_buffer_stream_release_sync(stream); |
1924 | mir_connection_release(connection); |
1925 | } |
1926 | +#pragma GCC diagnostic pop |
1927 | |
1928 | TEST_F(ClientLibraryErrors, create_surface_doesnt_double_close_buffer_file_descriptors_on_error) |
1929 | { |
1930 | @@ -138,7 +144,10 @@ |
1931 | ASSERT_THAT(connection, IsValid()); |
1932 | |
1933 | auto spec = mir_create_normal_window_spec(connection, 800, 600); |
1934 | +#pragma GCC diagnostic push |
1935 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1936 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888); |
1937 | +#pragma GCC diagnostic pop |
1938 | auto window = mir_create_window_sync(spec); |
1939 | mir_window_spec_release(spec); |
1940 | |
1941 | @@ -167,7 +176,10 @@ |
1942 | ASSERT_THAT(connection, IsValid()); |
1943 | |
1944 | auto spec = mir_create_normal_window_spec(connection, 800, 600); |
1945 | +#pragma GCC diagnostic push |
1946 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1947 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888); |
1948 | +#pragma GCC diagnostic pop |
1949 | auto window = mir_create_window_sync(spec); |
1950 | mir_window_spec_release(spec); |
1951 | |
1952 | @@ -194,7 +206,10 @@ |
1953 | ASSERT_THAT(connection, IsValid()); |
1954 | |
1955 | auto spec = mir_create_normal_window_spec(connection, 800, 600); |
1956 | +#pragma GCC diagnostic push |
1957 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1958 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888); |
1959 | +#pragma GCC diagnostic pop |
1960 | auto window = mir_create_window_sync(spec); |
1961 | mir_window_spec_release(spec); |
1962 | |
1963 | |
1964 | === modified file 'tests/acceptance-tests/test_client_logging.cpp' |
1965 | --- tests/acceptance-tests/test_client_logging.cpp 2017-01-21 01:13:44 +0000 |
1966 | +++ tests/acceptance-tests/test_client_logging.cpp 2017-04-11 18:27:10 +0000 |
1967 | @@ -54,7 +54,8 @@ |
1968 | } |
1969 | }; |
1970 | } // namespace |
1971 | - |
1972 | +#pragma GCC diagnostic push |
1973 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1974 | TEST_F(ClientLogging, reports_performance) |
1975 | { |
1976 | auto spec = mir_create_normal_window_spec(connection, 123, 456); |
1977 | @@ -144,3 +145,4 @@ |
1978 | |
1979 | mir_window_release_sync(window); |
1980 | } |
1981 | +#pragma GCC diagnostic pop |
1982 | \ No newline at end of file |
1983 | |
1984 | === modified file 'tests/acceptance-tests/test_client_scaling.cpp' |
1985 | --- tests/acceptance-tests/test_client_scaling.cpp 2017-03-14 02:26:28 +0000 |
1986 | +++ tests/acceptance-tests/test_client_scaling.cpp 2017-04-11 18:27:10 +0000 |
1987 | @@ -160,10 +160,12 @@ |
1988 | { |
1989 | using namespace std::literals::chrono_literals; |
1990 | auto scale = 2.0f; |
1991 | +#pragma GCC diagnostic push |
1992 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1993 | auto stream = mir_window_get_buffer_stream(window); |
1994 | mir_buffer_stream_set_swapinterval(stream, GetParam()); |
1995 | mir_buffer_stream_set_scale(stream, scale); |
1996 | - |
1997 | +#pragma GCC diagnostic pop |
1998 | mir_buffer_stream_swap_buffers_sync(stream); |
1999 | |
2000 | int frames = 0; |
2001 | |
2002 | === modified file 'tests/acceptance-tests/test_client_surface_events.cpp' |
2003 | --- tests/acceptance-tests/test_client_surface_events.cpp 2017-04-11 03:54:16 +0000 |
2004 | +++ tests/acceptance-tests/test_client_surface_events.cpp 2017-04-11 18:27:10 +0000 |
2005 | @@ -425,7 +425,10 @@ |
2006 | &focus_received); |
2007 | |
2008 | // Swap buffers to get the window into the scene so it can be focused. |
2009 | +#pragma GCC diagnostic push |
2010 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2011 | auto buffer_stream = mir_window_get_buffer_stream(window); |
2012 | +#pragma GCC diagnostic pop |
2013 | mir_buffer_stream_swap_buffers_sync(buffer_stream); |
2014 | |
2015 | ASSERT_TRUE(focus_received.wait_for(10s)); |
2016 | @@ -469,7 +472,10 @@ |
2017 | &focus_received); |
2018 | |
2019 | // Swap buffers to get the window into the scene so it can be focused. |
2020 | +#pragma GCC diagnostic push |
2021 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2022 | auto buffer_stream = mir_window_get_buffer_stream(window); |
2023 | +#pragma GCC diagnostic pop |
2024 | mir_buffer_stream_swap_buffers_sync(buffer_stream); |
2025 | |
2026 | ASSERT_TRUE(focus_received.wait_for(10s)); |
2027 | @@ -489,8 +495,10 @@ |
2028 | |
2029 | // Add a new window that will take focus. |
2030 | auto focus_grabbing_surface = mtf::make_any_surface(connection); |
2031 | +#pragma GCC diagnostic push |
2032 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2033 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(focus_grabbing_surface)); |
2034 | - |
2035 | +#pragma GCC diagnostic pop |
2036 | ASSERT_TRUE(unfocus_received.wait_for(10s)); |
2037 | |
2038 | unfocus_received.reset(); |
2039 | @@ -547,7 +555,10 @@ |
2040 | mt::Signal done; |
2041 | |
2042 | auto spec = mir_create_normal_window_spec(connection, 100, 100); |
2043 | +#pragma GCC diagnostic push |
2044 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2045 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
2046 | +#pragma GCC diagnostic pop |
2047 | mir_window_spec_set_event_handler(spec, &raise_signal_on_close_event, &done); |
2048 | |
2049 | auto window = mir_create_window_sync(spec); |
2050 | @@ -639,7 +650,10 @@ |
2051 | EventContext context; |
2052 | |
2053 | auto spec = mir_create_normal_window_spec(connection, 640, 480); |
2054 | +#pragma GCC diagnostic push |
2055 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2056 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
2057 | +#pragma GCC diagnostic pop |
2058 | mir_window_spec_set_event_handler(spec, &surface_output_capturing_callback, &context); |
2059 | auto window = mir_create_window_sync(spec); |
2060 | mir_window_spec_release(spec); |
2061 | @@ -730,7 +744,10 @@ |
2062 | ASSERT_THAT(height, Ne(surface_height)); |
2063 | |
2064 | auto spec = mir_create_normal_window_spec(connection, width, height); |
2065 | +#pragma GCC diagnostic push |
2066 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2067 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
2068 | +#pragma GCC diagnostic pop |
2069 | mir_window_spec_set_event_handler(spec, callback, &context); |
2070 | |
2071 | auto window = mir_create_window_sync(spec); |
2072 | |
2073 | === modified file 'tests/acceptance-tests/test_client_surface_swap_buffers.cpp' |
2074 | --- tests/acceptance-tests/test_client_surface_swap_buffers.cpp 2017-03-14 02:26:28 +0000 |
2075 | +++ tests/acceptance-tests/test_client_surface_swap_buffers.cpp 2017-04-11 18:27:10 +0000 |
2076 | @@ -62,9 +62,10 @@ |
2077 | for (int i = 0; i != 10; ++i) |
2078 | { |
2079 | mt::Signal buffers_swapped; |
2080 | - |
2081 | +#pragma GCC diagnostic push |
2082 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2083 | mir_buffer_stream_swap_buffers(mir_window_get_buffer_stream(window), swap_buffers_callback, &buffers_swapped); |
2084 | - |
2085 | +#pragma GCC diagnostic pop |
2086 | /* |
2087 | * ASSERT instead of EXPECT, since if we continue we will block in future |
2088 | * mir client calls (e.g mir_connection_release). |
2089 | @@ -136,6 +137,9 @@ |
2090 | //LP: #1584784 |
2091 | TEST_F(SwapBuffersDoesntBlockOnSubmission, can_swap_nbuffers_times_without_blocking) |
2092 | { |
2093 | +#pragma GCC diagnostic push |
2094 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2095 | for (auto i = 0u; i != nbuffers; ++i) |
2096 | mir_buffer_stream_swap_buffers(mir_window_get_buffer_stream(window), nullptr, nullptr); |
2097 | +#pragma GCC diagnostic pop |
2098 | } |
2099 | |
2100 | === modified file 'tests/acceptance-tests/test_client_surface_visibility.cpp' |
2101 | --- tests/acceptance-tests/test_client_surface_visibility.cpp 2017-03-14 02:26:28 +0000 |
2102 | +++ tests/acceptance-tests/test_client_surface_visibility.cpp 2017-04-11 18:27:10 +0000 |
2103 | @@ -109,9 +109,12 @@ |
2104 | { |
2105 | auto const spec = mir_create_normal_window_spec( |
2106 | connection, size.width.as_int(), size.height.as_int()); |
2107 | +#pragma GCC diagnostic push |
2108 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2109 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_bgr_888); |
2110 | mir_window_spec_set_name(spec, name); |
2111 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2112 | +#pragma GCC diagnostic pop |
2113 | mir_window_spec_set_event_handler(spec, &event_callback, &mock_callback); |
2114 | auto window = mir_create_window_sync(spec); |
2115 | mir_window_spec_release(spec); |
2116 | @@ -162,7 +165,10 @@ |
2117 | mir_window_visibility_exposed, |
2118 | [this] |
2119 | { |
2120 | +#pragma GCC diagnostic push |
2121 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2122 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
2123 | +#pragma GCC diagnostic pop |
2124 | }); |
2125 | |
2126 | // GMock is behaving strangely, checking expectations after they |
2127 | |
2128 | === modified file 'tests/acceptance-tests/test_client_surfaces.cpp' |
2129 | --- tests/acceptance-tests/test_client_surfaces.cpp 2017-03-14 04:41:33 +0000 |
2130 | +++ tests/acceptance-tests/test_client_surfaces.cpp 2017-04-11 18:27:10 +0000 |
2131 | @@ -61,7 +61,8 @@ |
2132 | testing::NiceMock<mtd::MockWindowManager> window_manager; |
2133 | }; |
2134 | } |
2135 | - |
2136 | +#pragma GCC diagnostic push |
2137 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2138 | TEST_F(ClientSurfaces, are_created_with_correct_size) |
2139 | { |
2140 | int width_1 = 640, height_1 = 480, width_2 = 1600, height_2 = 1200; |
2141 | @@ -338,8 +339,7 @@ |
2142 | mir_window_release_sync(window); |
2143 | } |
2144 | |
2145 | -#pragma GCC diagnostic push |
2146 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2147 | + |
2148 | TEST_F(ClientSurfaces, input_methods_get_corret_parent_coordinates) |
2149 | { |
2150 | using namespace testing; |
2151 | |
2152 | === modified file 'tests/acceptance-tests/test_confined_pointer.cpp' |
2153 | --- tests/acceptance-tests/test_confined_pointer.cpp 2017-02-15 07:38:33 +0000 |
2154 | +++ tests/acceptance-tests/test_confined_pointer.cpp 2017-04-11 18:27:10 +0000 |
2155 | @@ -78,7 +78,10 @@ |
2156 | mir_connection_get_error_message(connection)}); |
2157 | } |
2158 | auto spec = mir_create_normal_window_spec(connection, surface_width, surface_height); |
2159 | +#pragma GCC diagnostic push |
2160 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2161 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
2162 | +#pragma GCC diagnostic pop |
2163 | mir_window_spec_set_pointer_confinement(spec, mir_pointer_confined_to_window); |
2164 | mir_window_spec_set_name(spec, name.c_str()); |
2165 | mir_window_spec_set_event_handler(spec, handle_event, this); |
2166 | @@ -90,9 +93,11 @@ |
2167 | mir_window_get_error_message(window)}); |
2168 | } |
2169 | |
2170 | +#pragma GCC diagnostic push |
2171 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2172 | mir_buffer_stream_swap_buffers_sync( |
2173 | mir_window_get_buffer_stream(window)); |
2174 | - |
2175 | +#pragma GCC diagnostic pop |
2176 | ready_to_accept_events.wait_for(4s); |
2177 | if (!ready_to_accept_events.raised()) |
2178 | { |
2179 | |
2180 | === modified file 'tests/acceptance-tests/test_custom_window_management.cpp' |
2181 | --- tests/acceptance-tests/test_custom_window_management.cpp 2017-03-14 02:26:28 +0000 |
2182 | +++ tests/acceptance-tests/test_custom_window_management.cpp 2017-04-11 18:27:10 +0000 |
2183 | @@ -77,7 +77,10 @@ |
2184 | auto surface_create() const -> MirWindow* |
2185 | { |
2186 | auto spec = mir_create_normal_window_spec(connection, 800, 600); |
2187 | +#pragma GCC diagnostic push |
2188 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2189 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_bgr_888); |
2190 | +#pragma GCC diagnostic pop |
2191 | auto window = mir_create_window_sync(spec); |
2192 | mir_window_spec_release(spec); |
2193 | |
2194 | @@ -302,7 +305,10 @@ |
2195 | MirPixelFormat const format{mir_pixel_format_bgr_888}; |
2196 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); |
2197 | |
2198 | +#pragma GCC diagnostic push |
2199 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2200 | mir_window_spec_set_pixel_format(surface_spec, format); |
2201 | +#pragma GCC diagnostic pop |
2202 | mir_window_spec_set_shell_chrome(surface_spec, mir_shell_chrome_low); |
2203 | |
2204 | auto const check_add_surface = []( |
2205 | @@ -332,8 +338,10 @@ |
2206 | int const width{800}, height{600}; |
2207 | MirPixelFormat const format{mir_pixel_format_bgr_888}; |
2208 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); |
2209 | +#pragma GCC diagnostic push |
2210 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2211 | mir_window_spec_set_pixel_format(surface_spec, format); |
2212 | - |
2213 | +#pragma GCC diagnostic pop |
2214 | auto window = mir_create_window_sync(surface_spec); |
2215 | mir_window_spec_release(surface_spec); |
2216 | |
2217 | @@ -372,8 +380,10 @@ |
2218 | int const width{800}, height{600}; |
2219 | MirPixelFormat const format{mir_pixel_format_bgr_888}; |
2220 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); |
2221 | +#pragma GCC diagnostic push |
2222 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2223 | mir_window_spec_set_pixel_format(surface_spec, format); |
2224 | - |
2225 | +#pragma GCC diagnostic pop |
2226 | auto window = mir_create_window_sync(surface_spec); |
2227 | mir_window_spec_release(surface_spec); |
2228 | |
2229 | @@ -426,13 +436,19 @@ |
2230 | start_server(); |
2231 | auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__); |
2232 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); |
2233 | +#pragma GCC diagnostic push |
2234 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2235 | mir_window_spec_set_pixel_format(surface_spec, format); |
2236 | +#pragma GCC diagnostic pop |
2237 | auto parent = mir_create_window_sync(surface_spec); |
2238 | mir_window_spec_release(surface_spec); |
2239 | |
2240 | surface_spec = mir_create_tip_window_spec( |
2241 | connection, width, height, parent, &dummy_rect, mir_edge_attachment_any); |
2242 | +#pragma GCC diagnostic push |
2243 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2244 | mir_window_spec_set_pixel_format(surface_spec, format); |
2245 | +#pragma GCC diagnostic pop |
2246 | |
2247 | mir_window_spec_set_placement( |
2248 | surface_spec, &aux_rect, rect_gravity, surface_gravity, placement_hints, offset_dx, offset_dy); |
2249 | @@ -506,13 +522,19 @@ |
2250 | start_server(); |
2251 | auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__); |
2252 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); |
2253 | +#pragma GCC diagnostic push |
2254 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2255 | mir_window_spec_set_pixel_format(surface_spec, format); |
2256 | +#pragma GCC diagnostic pop |
2257 | auto parent = mir_create_window_sync(surface_spec); |
2258 | mir_window_spec_release(surface_spec); |
2259 | |
2260 | surface_spec = mir_create_menu_window_spec( |
2261 | connection, width, height, parent, &dummy_rect, mir_edge_attachment_any); |
2262 | +#pragma GCC diagnostic push |
2263 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2264 | mir_window_spec_set_pixel_format(surface_spec, format); |
2265 | +#pragma GCC diagnostic pop |
2266 | auto child = mir_create_window_sync(surface_spec); |
2267 | mir_window_spec_release(surface_spec); |
2268 | |
2269 | @@ -635,7 +657,10 @@ |
2270 | |
2271 | PlacementCheck placement_check{placement}; |
2272 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); |
2273 | +#pragma GCC diagnostic push |
2274 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2275 | mir_window_spec_set_pixel_format(surface_spec, format); |
2276 | +#pragma GCC diagnostic pop |
2277 | mir_window_spec_set_event_handler(surface_spec, &window_placement_event_callback, &placement_check); |
2278 | auto window = mir_create_window_sync(surface_spec); |
2279 | mir_window_spec_release(surface_spec); |
2280 | |
2281 | === modified file 'tests/acceptance-tests/test_latency.cpp' |
2282 | --- tests/acceptance-tests/test_latency.cpp 2017-03-14 02:26:28 +0000 |
2283 | +++ tests/acceptance-tests/test_latency.cpp 2017-04-11 18:27:10 +0000 |
2284 | @@ -285,8 +285,10 @@ |
2285 | std::unique_ptr<MirWindowSpec, decltype(del)> spec( |
2286 | mir_create_normal_window_spec(connection, 100, 100), |
2287 | del); |
2288 | +#pragma GCC diagnostic push |
2289 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2290 | mir_window_spec_set_pixel_format(spec.get(), mir_pixel_format_abgr_8888); |
2291 | - |
2292 | +#pragma GCC diagnostic pop |
2293 | visible_surface = std::make_unique<mtf::VisibleSurface>(spec.get()); |
2294 | surface = *visible_surface; |
2295 | |
2296 | @@ -315,7 +317,10 @@ |
2297 | |
2298 | TEST_F(ClientLatency, average_swap_buffers_sync_latency_is_one_frame) |
2299 | { |
2300 | +#pragma GCC diagnostic push |
2301 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2302 | auto stream = mir_window_get_buffer_stream(surface); |
2303 | +#pragma GCC diagnostic pop |
2304 | auto const deadline = steady_clock::now() + 60s; |
2305 | |
2306 | while (stats.frames_composited() < test_frames && |
2307 | @@ -338,7 +343,10 @@ |
2308 | |
2309 | TEST_F(ClientLatency, max_latency_is_limited_to_nbuffers) |
2310 | { |
2311 | +#pragma GCC diagnostic push |
2312 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2313 | auto stream = mir_window_get_buffer_stream(surface); |
2314 | +#pragma GCC diagnostic pop |
2315 | auto const deadline = steady_clock::now() + 60s; |
2316 | |
2317 | while (stats.frames_composited() < test_frames && |
2318 | @@ -357,7 +365,10 @@ |
2319 | |
2320 | TEST_F(ClientLatency, dropping_latency_is_closer_to_zero_than_one) |
2321 | { |
2322 | +#pragma GCC diagnostic push |
2323 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2324 | auto stream = mir_window_get_buffer_stream(surface); |
2325 | +#pragma GCC diagnostic pop |
2326 | mir_buffer_stream_set_swapinterval(stream, 0); |
2327 | stats.swap_interval = 0; |
2328 | auto const deadline = steady_clock::now() + 60s; |
2329 | @@ -381,7 +392,10 @@ |
2330 | |
2331 | TEST_F(ClientLatency, average_async_swap_latency_is_less_than_nbuffers) |
2332 | { |
2333 | +#pragma GCC diagnostic push |
2334 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2335 | auto stream = mir_window_get_buffer_stream(surface); |
2336 | +#pragma GCC diagnostic pop |
2337 | auto const deadline = steady_clock::now() + 60s; |
2338 | |
2339 | while (stats.frames_composited() < test_frames && |
2340 | @@ -407,7 +421,10 @@ |
2341 | |
2342 | TEST_F(ClientLatency, max_async_swap_latency_is_limited_to_nbuffers) |
2343 | { |
2344 | +#pragma GCC diagnostic push |
2345 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2346 | auto stream = mir_window_get_buffer_stream(surface); |
2347 | +#pragma GCC diagnostic pop |
2348 | auto const deadline = steady_clock::now() + 60s; |
2349 | |
2350 | while (stats.frames_composited() < test_frames && |
2351 | @@ -429,7 +446,10 @@ |
2352 | |
2353 | TEST_F(ClientLatency, async_swap_dropping_latency_is_closer_to_zero_than_one) |
2354 | { |
2355 | +#pragma GCC diagnostic push |
2356 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2357 | auto stream = mir_window_get_buffer_stream(surface); |
2358 | +#pragma GCC diagnostic pop |
2359 | mir_buffer_stream_set_swapinterval(stream, 0); |
2360 | stats.swap_interval = 0; |
2361 | auto const deadline = steady_clock::now() + 60s; |
2362 | @@ -459,7 +479,10 @@ |
2363 | int const throttled_input_rate = refresh_rate * 3 / 4; |
2364 | microseconds const input_interval(1000000/throttled_input_rate); |
2365 | auto next_input_event = high_resolution_clock::now(); |
2366 | +#pragma GCC diagnostic push |
2367 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2368 | auto stream = mir_window_get_buffer_stream(surface); |
2369 | +#pragma GCC diagnostic pop |
2370 | auto const deadline = steady_clock::now() + 60s; |
2371 | |
2372 | while (stats.frames_composited() < test_frames && |
2373 | |
2374 | === modified file 'tests/acceptance-tests/test_nested_input.cpp' |
2375 | --- tests/acceptance-tests/test_nested_input.cpp 2017-04-04 07:04:57 +0000 |
2376 | +++ tests/acceptance-tests/test_nested_input.cpp 2017-04-11 18:27:10 +0000 |
2377 | @@ -248,7 +248,10 @@ |
2378 | this); |
2379 | |
2380 | window = mtf::make_any_surface(connection, handle_event, this); |
2381 | +#pragma GCC diagnostic push |
2382 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2383 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
2384 | +#pragma GCC diagnostic pop |
2385 | } |
2386 | |
2387 | MOCK_METHOD1(handle_input, void(MirEvent const*)); |
2388 | |
2389 | === modified file 'tests/acceptance-tests/test_nested_mir.cpp' |
2390 | --- tests/acceptance-tests/test_nested_mir.cpp 2017-04-11 03:54:16 +0000 |
2391 | +++ tests/acceptance-tests/test_nested_mir.cpp 2017-04-11 18:27:10 +0000 |
2392 | @@ -535,14 +535,20 @@ |
2393 | Client(nested_mir), |
2394 | window(mtf::make_surface(connection, size, format)) |
2395 | { |
2396 | +#pragma GCC diagnostic push |
2397 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2398 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
2399 | +#pragma GCC diagnostic pop |
2400 | } |
2401 | |
2402 | ClientWithAPaintedSurface(NestedMirRunner& nested_mir) : |
2403 | Client(nested_mir), |
2404 | window(mtf::make_any_surface(connection)) |
2405 | { |
2406 | +#pragma GCC diagnostic push |
2407 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2408 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
2409 | +#pragma GCC diagnostic pop |
2410 | } |
2411 | |
2412 | ~ClientWithAPaintedSurface() |
2413 | @@ -562,6 +568,8 @@ |
2414 | MirWindow* window; |
2415 | }; |
2416 | |
2417 | +#pragma GCC diagnostic push |
2418 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2419 | struct ClientWithAPaintedSurfaceAndABufferStream : virtual Client, ClientWithAPaintedSurface |
2420 | { |
2421 | ClientWithAPaintedSurfaceAndABufferStream(NestedMirRunner& nested_mir) : |
2422 | @@ -584,8 +592,6 @@ |
2423 | MirBufferStream* const buffer_stream; |
2424 | }; |
2425 | |
2426 | -#pragma GCC diagnostic push |
2427 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2428 | struct ClientWithAPaintedWindowAndASurface : virtual Client, ClientWithAPaintedSurface |
2429 | { |
2430 | ClientWithAPaintedWindowAndASurface(NestedMirRunner& nested_mir) : |
2431 | @@ -684,8 +690,10 @@ |
2432 | Client client{nested_mir}; |
2433 | |
2434 | auto spec = mir_create_normal_window_spec(client.connection, 800, 600); |
2435 | +#pragma GCC diagnostic push |
2436 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2437 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
2438 | - |
2439 | +#pragma GCC diagnostic pop |
2440 | mt::Signal surface_event_received; |
2441 | mir_window_spec_set_event_handler(spec, [](MirWindow*, MirEvent const* event, void* ctx) |
2442 | { |
2443 | @@ -786,7 +794,10 @@ |
2444 | .WillOnce(InvokeWithoutArgs([]{})) |
2445 | .WillOnce(InvokeWithoutArgs([&] { wait.raise(); })); |
2446 | |
2447 | +#pragma GCC diagnostic push |
2448 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2449 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
2450 | +#pragma GCC diagnostic pop |
2451 | |
2452 | wait.wait_for(timeout); |
2453 | Mock::VerifyAndClearExpectations(mock_session_mediator_report.get()); |
2454 | |
2455 | === modified file 'tests/acceptance-tests/test_new_display_configuration.cpp' |
2456 | --- tests/acceptance-tests/test_new_display_configuration.cpp 2017-03-21 22:20:26 +0000 |
2457 | +++ tests/acceptance-tests/test_new_display_configuration.cpp 2017-04-11 18:27:10 +0000 |
2458 | @@ -261,6 +261,8 @@ |
2459 | SimpleClient(std::string const& mir_test_socket) : |
2460 | mir_test_socket{mir_test_socket} {} |
2461 | |
2462 | +#pragma GCC diagnostic push |
2463 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2464 | void connect() |
2465 | { |
2466 | connection = mir_connect_sync(mir_test_socket.c_str(), __PRETTY_FUNCTION__); |
2467 | @@ -276,7 +278,7 @@ |
2468 | if (!ready_to_accept_events.raised()) |
2469 | BOOST_THROW_EXCEPTION(std::runtime_error("Timeout waiting for window to become focused and exposed")); |
2470 | } |
2471 | - |
2472 | +#pragma GCC diagnostic pop |
2473 | static void handle_event(MirWindow*, MirEvent const* ev, void* context) |
2474 | { |
2475 | auto const client = static_cast<SimpleClient*>(context); |
2476 | |
2477 | === modified file 'tests/acceptance-tests/test_presentation_chain.cpp' |
2478 | --- tests/acceptance-tests/test_presentation_chain.cpp 2017-03-14 04:41:33 +0000 |
2479 | +++ tests/acceptance-tests/test_presentation_chain.cpp 2017-04-11 18:27:10 +0000 |
2480 | @@ -133,9 +133,9 @@ |
2481 | { |
2482 | auto spec = mir_create_normal_window_spec( |
2483 | connection, size.width.as_int(), size.height.as_int()); |
2484 | +#pragma GCC diagnostic push |
2485 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2486 | mir_window_spec_set_pixel_format(spec, pf); |
2487 | -#pragma GCC diagnostic push |
2488 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2489 | mir_window_spec_add_render_surface( |
2490 | spec, chain.content(), size.width.as_int(), size.height.as_int(), 0, 0); |
2491 | #pragma GCC diagnostic pop |
2492 | |
2493 | === modified file 'tests/acceptance-tests/test_render_override.cpp' |
2494 | --- tests/acceptance-tests/test_render_override.cpp 2017-03-14 02:26:28 +0000 |
2495 | +++ tests/acceptance-tests/test_render_override.cpp 2017-04-11 18:27:10 +0000 |
2496 | @@ -125,8 +125,11 @@ |
2497 | |
2498 | TEST_F(DisplayBufferCompositorOverride, composite_called_with_surface) |
2499 | { |
2500 | +#pragma GCC diagnostic push |
2501 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2502 | MirWindowParameters surface_params; |
2503 | mir_window_get_parameters(window, &surface_params); |
2504 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
2505 | +#pragma GCC diagnostic pop |
2506 | EXPECT_TRUE(tracker->wait_until_surface_is_rendered_with_size({surface_params.width, surface_params.height})); |
2507 | } |
2508 | |
2509 | === modified file 'tests/acceptance-tests/test_server_disconnect.cpp' |
2510 | --- tests/acceptance-tests/test_server_disconnect.cpp 2017-01-18 16:58:17 +0000 |
2511 | +++ tests/acceptance-tests/test_server_disconnect.cpp 2017-04-11 18:27:10 +0000 |
2512 | @@ -83,8 +83,11 @@ |
2513 | |
2514 | while (!signalled.load() && clock::now() < time_limit) |
2515 | { |
2516 | +#pragma GCC diagnostic push |
2517 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2518 | mir_buffer_stream_swap_buffers_sync( |
2519 | mir_window_get_buffer_stream(window)); |
2520 | +#pragma GCC diagnostic pop |
2521 | } |
2522 | |
2523 | mir_window_release_sync(window); |
2524 | @@ -119,7 +122,10 @@ |
2525 | |
2526 | create_surface.exec([&] { |
2527 | auto spec = mir_create_normal_window_spec(connection, 800, 600); |
2528 | +#pragma GCC diagnostic push |
2529 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2530 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888); |
2531 | +#pragma GCC diagnostic pop |
2532 | window = mir_create_window_sync(spec); |
2533 | mir_window_spec_release(spec); |
2534 | }); |
2535 | |
2536 | === modified file 'tests/acceptance-tests/test_session_mediator_report.cpp' |
2537 | --- tests/acceptance-tests/test_session_mediator_report.cpp 2017-01-18 02:29:37 +0000 |
2538 | +++ tests/acceptance-tests/test_session_mediator_report.cpp 2017-04-11 18:27:10 +0000 |
2539 | @@ -159,7 +159,10 @@ |
2540 | connect_client(); |
2541 | |
2542 | auto const window = mtf::make_any_surface(connection); |
2543 | +#pragma GCC diagnostic push |
2544 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2545 | auto const buffer_stream = mir_window_get_buffer_stream(window); |
2546 | +#pragma GCC diagnostic pop |
2547 | mir_buffer_stream_swap_buffers_sync(buffer_stream); |
2548 | mir_window_release_sync(window); |
2549 | EXPECT_TRUE(report_received->wait_for(10s)); |
2550 | @@ -198,9 +201,11 @@ |
2551 | auto report_received = std::make_shared<mt::Signal>(); |
2552 | ON_CALL(*report, session_create_buffer_stream_called(_)) |
2553 | .WillByDefault(InvokeWithoutArgs([report_received]() { report_received->raise(); })); |
2554 | - |
2555 | +#pragma GCC diagnostic push |
2556 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2557 | auto const buffer_stream = mir_connection_create_buffer_stream_sync(connection, |
2558 | 640, 480, mir_pixel_format_abgr_8888, mir_buffer_usage_software); |
2559 | +#pragma GCC diagnostic pop |
2560 | EXPECT_TRUE(report_received->wait_for(10s)); |
2561 | |
2562 | report_received->reset(); |
2563 | @@ -208,6 +213,9 @@ |
2564 | ON_CALL(*report, session_release_buffer_stream_called(_)) |
2565 | .WillByDefault(InvokeWithoutArgs([report_received]() { report_received->raise(); })); |
2566 | |
2567 | +#pragma GCC diagnostic push |
2568 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2569 | mir_buffer_stream_release_sync(buffer_stream); |
2570 | +#pragma GCC diagnostic pop |
2571 | EXPECT_TRUE(report_received->wait_for(10s)); |
2572 | } |
2573 | |
2574 | === modified file 'tests/acceptance-tests/test_surface_modifications.cpp' |
2575 | --- tests/acceptance-tests/test_surface_modifications.cpp 2017-03-14 02:26:28 +0000 |
2576 | +++ tests/acceptance-tests/test_surface_modifications.cpp 2017-04-11 18:27:10 +0000 |
2577 | @@ -73,7 +73,10 @@ |
2578 | scene_surface->add_observer(mt::fake_shared(surface_observer)); |
2579 | |
2580 | // Swap buffers to ensure window is visible for event based tests |
2581 | +#pragma GCC diagnostic push |
2582 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2583 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
2584 | +#pragma GCC diagnostic pop |
2585 | } |
2586 | |
2587 | void generate_alt_click_at(Point const& click_position) |
2588 | |
2589 | === modified file 'tests/acceptance-tests/test_surface_morphing.cpp' |
2590 | --- tests/acceptance-tests/test_surface_morphing.cpp 2017-01-18 02:29:37 +0000 |
2591 | +++ tests/acceptance-tests/test_surface_morphing.cpp 2017-04-11 18:27:10 +0000 |
2592 | @@ -181,8 +181,11 @@ |
2593 | mir_window_spec_set_type(spec, old_type); |
2594 | mir_window_spec_set_width(spec, width); |
2595 | mir_window_spec_set_height(spec, height); |
2596 | +#pragma GCC diagnostic push |
2597 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2598 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2599 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2600 | +#pragma GCC diagnostic pop |
2601 | }); |
2602 | |
2603 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
2604 | @@ -206,8 +209,11 @@ |
2605 | mir_window_spec_set_type(spec, mir_window_type_normal); |
2606 | mir_window_spec_set_width(spec, width); |
2607 | mir_window_spec_set_height(spec, height); |
2608 | +#pragma GCC diagnostic push |
2609 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2610 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2611 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2612 | +#pragma GCC diagnostic pop |
2613 | }); |
2614 | |
2615 | auto const window = create_surface([&](MirWindowSpec* spec) |
2616 | @@ -215,8 +221,11 @@ |
2617 | mir_window_spec_set_type(spec, old_type); |
2618 | mir_window_spec_set_width(spec, width); |
2619 | mir_window_spec_set_height(spec, height); |
2620 | +#pragma GCC diagnostic push |
2621 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2622 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2623 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2624 | +#pragma GCC diagnostic pop |
2625 | }); |
2626 | |
2627 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
2628 | @@ -247,8 +256,11 @@ |
2629 | mir_window_spec_set_type(spec, mir_window_type_normal); |
2630 | mir_window_spec_set_width(spec, width); |
2631 | mir_window_spec_set_height(spec, height); |
2632 | +#pragma GCC diagnostic push |
2633 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2634 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2635 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2636 | +#pragma GCC diagnostic pop |
2637 | }); |
2638 | |
2639 | auto const window = create_surface([&](MirWindowSpec* spec) |
2640 | @@ -256,8 +268,11 @@ |
2641 | mir_window_spec_set_type(spec, old_type); |
2642 | mir_window_spec_set_width(spec, width); |
2643 | mir_window_spec_set_height(spec, height); |
2644 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
2645 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2646 | +#pragma GCC diagnostic push |
2647 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2648 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
2649 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2650 | +#pragma GCC diagnostic pop |
2651 | }); |
2652 | |
2653 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
2654 | @@ -282,8 +297,11 @@ |
2655 | mir_window_spec_set_type(spec, old_type); |
2656 | mir_window_spec_set_width(spec, width); |
2657 | mir_window_spec_set_height(spec, height); |
2658 | +#pragma GCC diagnostic push |
2659 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2660 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2661 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2662 | +#pragma GCC diagnostic pop |
2663 | }); |
2664 | |
2665 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
2666 | @@ -313,8 +331,11 @@ |
2667 | mir_window_spec_set_type(spec, mir_window_type_normal); |
2668 | mir_window_spec_set_width(spec, width); |
2669 | mir_window_spec_set_height(spec, height); |
2670 | +#pragma GCC diagnostic push |
2671 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2672 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2673 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2674 | +#pragma GCC diagnostic pop |
2675 | }); |
2676 | |
2677 | auto const window = create_surface([&](MirWindowSpec* spec) |
2678 | @@ -322,8 +343,11 @@ |
2679 | mir_window_spec_set_type(spec, old_type); |
2680 | mir_window_spec_set_width(spec, width); |
2681 | mir_window_spec_set_height(spec, height); |
2682 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
2683 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2684 | +#pragma GCC diagnostic push |
2685 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2686 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
2687 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2688 | +#pragma GCC diagnostic pop |
2689 | }); |
2690 | |
2691 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
2692 | @@ -348,8 +372,11 @@ |
2693 | mir_window_spec_set_type(spec, mir_window_type_normal); |
2694 | mir_window_spec_set_width(spec, width); |
2695 | mir_window_spec_set_height(spec, height); |
2696 | +#pragma GCC diagnostic push |
2697 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2698 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2699 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2700 | +#pragma GCC diagnostic pop |
2701 | }); |
2702 | |
2703 | auto const window = create_surface([&](MirWindowSpec* spec) |
2704 | @@ -357,8 +384,11 @@ |
2705 | mir_window_spec_set_type(spec, old_type); |
2706 | mir_window_spec_set_width(spec, width); |
2707 | mir_window_spec_set_height(spec, height); |
2708 | +#pragma GCC diagnostic push |
2709 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2710 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2711 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2712 | +#pragma GCC diagnostic pop |
2713 | }); |
2714 | |
2715 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
2716 | |
2717 | === modified file 'tests/acceptance-tests/test_surface_placement.cpp' |
2718 | --- tests/acceptance-tests/test_surface_placement.cpp 2017-01-18 02:29:37 +0000 |
2719 | +++ tests/acceptance-tests/test_surface_placement.cpp 2017-04-11 18:27:10 +0000 |
2720 | @@ -86,7 +86,10 @@ |
2721 | MirWindow* create_normal_surface(int width, int height, Specifier const& specifier) const |
2722 | { |
2723 | auto const spec = mir_create_normal_window_spec(connection, width, height); |
2724 | +#pragma GCC diagnostic push |
2725 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2726 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2727 | +#pragma GCC diagnostic pop |
2728 | |
2729 | specifier(spec); |
2730 | |
2731 | @@ -479,8 +482,11 @@ |
2732 | mir_window_spec_set_type(spec, GetParam()); |
2733 | mir_window_spec_set_width(spec, width); |
2734 | mir_window_spec_set_height(spec, height); |
2735 | +#pragma GCC diagnostic push |
2736 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2737 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2738 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2739 | +#pragma GCC diagnostic pop |
2740 | }); |
2741 | |
2742 | auto const shell_surface = latest_shell_surface(); |
2743 | @@ -540,8 +546,11 @@ |
2744 | mir_window_spec_set_type(spec, GetParam()); |
2745 | mir_window_spec_set_width(spec, width); |
2746 | mir_window_spec_set_height(spec, height); |
2747 | +#pragma GCC diagnostic push |
2748 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2749 | mir_window_spec_set_pixel_format(spec, pixel_format); |
2750 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
2751 | +#pragma GCC diagnostic pop |
2752 | mir_window_spec_set_parent(spec, parent); |
2753 | }); |
2754 | |
2755 | |
2756 | === modified file 'tests/acceptance-tests/test_surface_raise.cpp' |
2757 | --- tests/acceptance-tests/test_surface_raise.cpp 2017-01-18 02:29:37 +0000 |
2758 | +++ tests/acceptance-tests/test_surface_raise.cpp 2017-04-11 18:27:10 +0000 |
2759 | @@ -66,12 +66,13 @@ |
2760 | mir_window_spec_set_event_handler(spec, &cookie_capturing_callback, this); |
2761 | mir_window_apply_spec(surface2, spec); |
2762 | mir_window_spec_release(spec); |
2763 | - |
2764 | +#pragma GCC diagnostic push |
2765 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
2766 | mir_buffer_stream_swap_buffers_sync( |
2767 | mir_window_get_buffer_stream(surface1)); |
2768 | mir_buffer_stream_swap_buffers_sync( |
2769 | mir_window_get_buffer_stream(surface2)); |
2770 | - |
2771 | +#pragma GCC diagnostic pop |
2772 | bool surface_fullscreen = mt::spin_wait_for_condition_or_timeout( |
2773 | [this] |
2774 | { |
2775 | |
2776 | === modified file 'tests/acceptance-tests/test_surface_specification.cpp' |
2777 | --- tests/acceptance-tests/test_surface_specification.cpp 2017-01-18 02:29:37 +0000 |
2778 | +++ tests/acceptance-tests/test_surface_specification.cpp 2017-04-11 18:27:10 +0000 |
2779 | @@ -44,164 +44,164 @@ |
2780 | |
2781 | namespace |
2782 | { |
2783 | -class MockSurfaceObserver : public ms::NullSurfaceObserver |
2784 | -{ |
2785 | -public: |
2786 | - MOCK_METHOD1(renamed, void(char const*)); |
2787 | - MOCK_METHOD2(attrib_changed, void(MirWindowAttrib attrib, int value)); |
2788 | - MOCK_METHOD1(resized_to, void(Size const& size)); |
2789 | -}; |
2790 | - |
2791 | -struct SurfaceSpecification : mtf::ConnectedClientHeadlessServer |
2792 | -{ |
2793 | - SurfaceSpecification() { add_to_environment("MIR_SERVER_ENABLE_INPUT", "OFF"); } |
2794 | - |
2795 | - Rectangle const first_display {{ 0, 0}, {640, 480}}; |
2796 | - Rectangle const second_display{{640, 0}, {640, 480}}; |
2797 | - |
2798 | - void SetUp() override |
2799 | - { |
2800 | - initial_display_layout({first_display, second_display}); |
2801 | - |
2802 | - server.wrap_shell([this](std::shared_ptr<msh::Shell> const& wrapped) |
2803 | - { |
2804 | - auto const msc = std::make_shared<mtd::WrapShellToTrackLatestSurface>(wrapped); |
2805 | - shell = msc; |
2806 | - return msc; |
2807 | - }); |
2808 | - |
2809 | - mtf::ConnectedClientHeadlessServer::SetUp(); |
2810 | - |
2811 | - init_pixel_format(); |
2812 | - } |
2813 | - |
2814 | - void TearDown() override |
2815 | - { |
2816 | - shell.reset(); |
2817 | - mtf::ConnectedClientHeadlessServer::TearDown(); |
2818 | - } |
2819 | - |
2820 | - std::shared_ptr<ms::Surface> latest_shell_surface() const |
2821 | - { |
2822 | - auto const result = shell->latest_surface.lock(); |
2823 | + class MockSurfaceObserver : public ms::NullSurfaceObserver |
2824 | + { |
2825 | + public: |
2826 | + MOCK_METHOD1(renamed, void(char const*)); |
2827 | + MOCK_METHOD2(attrib_changed, void(MirWindowAttrib attrib, int value)); |
2828 | + MOCK_METHOD1(resized_to, void(Size const& size)); |
2829 | + }; |
2830 | + |
2831 | + struct SurfaceSpecification : mtf::ConnectedClientHeadlessServer |
2832 | + { |
2833 | + SurfaceSpecification() { add_to_environment("MIR_SERVER_ENABLE_INPUT", "OFF"); } |
2834 | + |
2835 | + Rectangle const first_display {{ 0, 0}, {640, 480}}; |
2836 | + Rectangle const second_display{{640, 0}, {640, 480}}; |
2837 | + |
2838 | + void SetUp() override |
2839 | + { |
2840 | + initial_display_layout({first_display, second_display}); |
2841 | + |
2842 | + server.wrap_shell([this](std::shared_ptr<msh::Shell> const& wrapped) |
2843 | + { |
2844 | + auto const msc = std::make_shared<mtd::WrapShellToTrackLatestSurface>(wrapped); |
2845 | + shell = msc; |
2846 | + return msc; |
2847 | + }); |
2848 | + |
2849 | + mtf::ConnectedClientHeadlessServer::SetUp(); |
2850 | + |
2851 | + init_pixel_format(); |
2852 | + } |
2853 | + |
2854 | + void TearDown() override |
2855 | + { |
2856 | + shell.reset(); |
2857 | + mtf::ConnectedClientHeadlessServer::TearDown(); |
2858 | + } |
2859 | + |
2860 | + std::shared_ptr<ms::Surface> latest_shell_surface() const |
2861 | + { |
2862 | + auto const result = shell->latest_surface.lock(); |
2863 | // ASSERT_THAT(result, NotNull()); //<= doesn't compile!? |
2864 | - EXPECT_THAT(result, NotNull()); |
2865 | - return result; |
2866 | - } |
2867 | - |
2868 | - template<typename Specifier> |
2869 | - mtf::VisibleSurface create_surface(Specifier const& specifier) |
2870 | - { |
2871 | - auto del = [] (MirWindowSpec* spec) { mir_window_spec_release(spec); }; |
2872 | - std::unique_ptr<MirWindowSpec, decltype(del)> spec(mir_create_window_spec(connection), del); |
2873 | - specifier(spec.get()); |
2874 | - return mtf::VisibleSurface{spec.get()}; |
2875 | - } |
2876 | - |
2877 | - NiceMock<MockSurfaceObserver> surface_observer; |
2878 | - |
2879 | - void change_observed() { signal_change.raise(); } |
2880 | - MirPixelFormat pixel_format{mir_pixel_format_invalid}; |
2881 | - static auto const width = 97; |
2882 | - static auto const height= 101; |
2883 | - MirInputDeviceId const device_id = MirInputDeviceId(7); |
2884 | - std::chrono::nanoseconds const timestamp = std::chrono::nanoseconds(39); |
2885 | - |
2886 | - void generate_alt_click_at(Point const& click_position) |
2887 | - { |
2888 | - auto const modifiers = mir_input_event_modifier_alt; |
2889 | - |
2890 | - auto const x_axis_value = click_position.x.as_int(); |
2891 | - auto const y_axis_value = click_position.y.as_int(); |
2892 | - auto const hscroll_value = 0.0; |
2893 | - auto const vscroll_value = 0.0; |
2894 | - auto const action = mir_pointer_action_button_down; |
2895 | - auto const relative_x_value = 0.0; |
2896 | - auto const relative_y_value = 0.0; |
2897 | - |
2898 | - auto const click_event = mev::make_event(device_id, timestamp, cookie, modifiers, |
2899 | - action, mir_pointer_button_tertiary, |
2900 | - x_axis_value, y_axis_value, |
2901 | - hscroll_value, vscroll_value, |
2902 | - relative_x_value, relative_y_value); |
2903 | - |
2904 | - server.the_shell()->handle(*click_event); |
2905 | - } |
2906 | - |
2907 | - void generate_alt_move_to(Point const& drag_position) |
2908 | - { |
2909 | - auto const modifiers = mir_input_event_modifier_alt; |
2910 | - |
2911 | - auto const x_axis_value = drag_position.x.as_int(); |
2912 | - auto const y_axis_value = drag_position.y.as_int(); |
2913 | - auto const hscroll_value = 0.0; |
2914 | - auto const vscroll_value = 0.0; |
2915 | - auto const action = mir_pointer_action_motion; |
2916 | - auto const relative_x_value = 0.0; |
2917 | - auto const relative_y_value = 0.0; |
2918 | - |
2919 | - auto const drag_event = mev::make_event(device_id, timestamp, cookie, modifiers, |
2920 | - action, mir_pointer_button_tertiary, |
2921 | - x_axis_value, y_axis_value, |
2922 | - hscroll_value, vscroll_value, |
2923 | - relative_x_value, relative_y_value); |
2924 | - |
2925 | - server.the_shell()->handle(*drag_event); |
2926 | - } |
2927 | - |
2928 | - void wait_for_arbitrary_change(MirWindow* surface) |
2929 | - { |
2930 | - auto const new_title = __PRETTY_FUNCTION__; |
2931 | - |
2932 | - EXPECT_CALL(surface_observer, renamed(StrEq(new_title))). |
2933 | - WillOnce(InvokeWithoutArgs([&]{ change_observed(); })); |
2934 | - |
2935 | - signal_change.reset(); |
2936 | - |
2937 | - auto const spec = mir_create_window_spec(connection); |
2938 | - |
2939 | - mir_window_spec_set_name(spec, new_title); |
2940 | - |
2941 | - mir_window_apply_spec(surface, spec); |
2942 | - mir_window_spec_release(spec); |
2943 | - signal_change.wait_for(1s); |
2944 | - } |
2945 | - |
2946 | -private: |
2947 | - std::shared_ptr<mtd::WrapShellToTrackLatestSurface> shell; |
2948 | - mt::Signal signal_change; |
2949 | - std::vector<uint8_t> cookie; |
2950 | - |
2951 | - void init_pixel_format() |
2952 | - { |
2953 | - unsigned int valid_formats{0}; |
2954 | - mir_connection_get_available_surface_formats(connection, &pixel_format, 1, &valid_formats); |
2955 | - } |
2956 | -}; |
2957 | - |
2958 | -struct SurfaceSpecificationCase : SurfaceSpecification, ::testing::WithParamInterface<MirWindowType> {}; |
2959 | -using SurfaceWithoutParent = SurfaceSpecificationCase; |
2960 | -using SurfaceNeedingParent = SurfaceSpecificationCase; |
2961 | -using SurfaceMayHaveParent = SurfaceSpecificationCase; |
2962 | - |
2963 | -MATCHER(IsValidSurface, "") |
2964 | -{ |
2965 | - if (arg == nullptr) return false; |
2966 | - |
2967 | - if (!mir_window_is_valid(arg)) return false; |
2968 | - |
2969 | - return true; |
2970 | -} |
2971 | - |
2972 | -MATCHER_P(WidthEq, value, "") |
2973 | -{ |
2974 | - return Width(value) == arg.width; |
2975 | -} |
2976 | - |
2977 | -MATCHER_P(HeightEq, value, "") |
2978 | -{ |
2979 | - return Height(value) == arg.height; |
2980 | -} |
2981 | + EXPECT_THAT(result, NotNull()); |
2982 | + return result; |
2983 | + } |
2984 | + |
2985 | + template<typename Specifier> |
2986 | + mtf::VisibleSurface create_surface(Specifier const& specifier) |
2987 | + { |
2988 | + auto del = [] (MirWindowSpec* spec) { mir_window_spec_release(spec); }; |
2989 | + std::unique_ptr<MirWindowSpec, decltype(del)> spec(mir_create_window_spec(connection), del); |
2990 | + specifier(spec.get()); |
2991 | + return mtf::VisibleSurface{spec.get()}; |
2992 | + } |
2993 | + |
2994 | + NiceMock<MockSurfaceObserver> surface_observer; |
2995 | + |
2996 | + void change_observed() { signal_change.raise(); } |
2997 | + MirPixelFormat pixel_format{mir_pixel_format_invalid}; |
2998 | + static auto const width = 97; |
2999 | + static auto const height= 101; |
3000 | + MirInputDeviceId const device_id = MirInputDeviceId(7); |
3001 | + std::chrono::nanoseconds const timestamp = std::chrono::nanoseconds(39); |
3002 | + |
3003 | + void generate_alt_click_at(Point const& click_position) |
3004 | + { |
3005 | + auto const modifiers = mir_input_event_modifier_alt; |
3006 | + |
3007 | + auto const x_axis_value = click_position.x.as_int(); |
3008 | + auto const y_axis_value = click_position.y.as_int(); |
3009 | + auto const hscroll_value = 0.0; |
3010 | + auto const vscroll_value = 0.0; |
3011 | + auto const action = mir_pointer_action_button_down; |
3012 | + auto const relative_x_value = 0.0; |
3013 | + auto const relative_y_value = 0.0; |
3014 | + |
3015 | + auto const click_event = mev::make_event(device_id, timestamp, cookie, modifiers, |
3016 | + action, mir_pointer_button_tertiary, |
3017 | + x_axis_value, y_axis_value, |
3018 | + hscroll_value, vscroll_value, |
3019 | + relative_x_value, relative_y_value); |
3020 | + |
3021 | + server.the_shell()->handle(*click_event); |
3022 | + } |
3023 | + |
3024 | + void generate_alt_move_to(Point const& drag_position) |
3025 | + { |
3026 | + auto const modifiers = mir_input_event_modifier_alt; |
3027 | + |
3028 | + auto const x_axis_value = drag_position.x.as_int(); |
3029 | + auto const y_axis_value = drag_position.y.as_int(); |
3030 | + auto const hscroll_value = 0.0; |
3031 | + auto const vscroll_value = 0.0; |
3032 | + auto const action = mir_pointer_action_motion; |
3033 | + auto const relative_x_value = 0.0; |
3034 | + auto const relative_y_value = 0.0; |
3035 | + |
3036 | + auto const drag_event = mev::make_event(device_id, timestamp, cookie, modifiers, |
3037 | + action, mir_pointer_button_tertiary, |
3038 | + x_axis_value, y_axis_value, |
3039 | + hscroll_value, vscroll_value, |
3040 | + relative_x_value, relative_y_value); |
3041 | + |
3042 | + server.the_shell()->handle(*drag_event); |
3043 | + } |
3044 | + |
3045 | + void wait_for_arbitrary_change(MirWindow* surface) |
3046 | + { |
3047 | + auto const new_title = __PRETTY_FUNCTION__; |
3048 | + |
3049 | + EXPECT_CALL(surface_observer, renamed(StrEq(new_title))). |
3050 | + WillOnce(InvokeWithoutArgs([&]{ change_observed(); })); |
3051 | + |
3052 | + signal_change.reset(); |
3053 | + |
3054 | + auto const spec = mir_create_window_spec(connection); |
3055 | + |
3056 | + mir_window_spec_set_name(spec, new_title); |
3057 | + |
3058 | + mir_window_apply_spec(surface, spec); |
3059 | + mir_window_spec_release(spec); |
3060 | + signal_change.wait_for(1s); |
3061 | + } |
3062 | + |
3063 | + private: |
3064 | + std::shared_ptr<mtd::WrapShellToTrackLatestSurface> shell; |
3065 | + mt::Signal signal_change; |
3066 | + std::vector<uint8_t> cookie; |
3067 | + |
3068 | + void init_pixel_format() |
3069 | + { |
3070 | + unsigned int valid_formats{0}; |
3071 | + mir_connection_get_available_surface_formats(connection, &pixel_format, 1, &valid_formats); |
3072 | + } |
3073 | + }; |
3074 | + |
3075 | + struct SurfaceSpecificationCase : SurfaceSpecification, ::testing::WithParamInterface<MirWindowType> {}; |
3076 | + using SurfaceWithoutParent = SurfaceSpecificationCase; |
3077 | + using SurfaceNeedingParent = SurfaceSpecificationCase; |
3078 | + using SurfaceMayHaveParent = SurfaceSpecificationCase; |
3079 | + |
3080 | + MATCHER(IsValidSurface, "") |
3081 | + { |
3082 | + if (arg == nullptr) return false; |
3083 | + |
3084 | + if (!mir_window_is_valid(arg)) return false; |
3085 | + |
3086 | + return true; |
3087 | + } |
3088 | + |
3089 | + MATCHER_P(WidthEq, value, "") |
3090 | + { |
3091 | + return Width(value) == arg.width; |
3092 | + } |
3093 | + |
3094 | + MATCHER_P(HeightEq, value, "") |
3095 | + { |
3096 | + return Height(value) == arg.height; |
3097 | + } |
3098 | } |
3099 | |
3100 | TEST_F(SurfaceSpecification, surface_spec_min_width_is_respected) |
3101 | @@ -209,14 +209,17 @@ |
3102 | auto const min_width = 17; |
3103 | |
3104 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3105 | - { |
3106 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3107 | - mir_window_spec_set_width(spec, width); |
3108 | - mir_window_spec_set_height(spec, height); |
3109 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3110 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3111 | - mir_window_spec_set_min_width(spec, min_width); |
3112 | - }); |
3113 | + { |
3114 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3115 | + mir_window_spec_set_width(spec, width); |
3116 | + mir_window_spec_set_height(spec, height); |
3117 | +#pragma GCC diagnostic push |
3118 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3119 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3120 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3121 | +#pragma GCC diagnostic pop |
3122 | + mir_window_spec_set_min_width(spec, min_width); |
3123 | + }); |
3124 | |
3125 | auto const shell_surface = latest_shell_surface(); |
3126 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3127 | @@ -234,14 +237,17 @@ |
3128 | auto const min_height = 19; |
3129 | |
3130 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3131 | - { |
3132 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3133 | - mir_window_spec_set_width(spec, width); |
3134 | - mir_window_spec_set_height(spec, height); |
3135 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3136 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3137 | - mir_window_spec_set_min_height(spec, min_height); |
3138 | - }); |
3139 | + { |
3140 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3141 | + mir_window_spec_set_width(spec, width); |
3142 | + mir_window_spec_set_height(spec, height); |
3143 | +#pragma GCC diagnostic push |
3144 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3145 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3146 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3147 | +#pragma GCC diagnostic pop |
3148 | + mir_window_spec_set_min_height(spec, min_height); |
3149 | + }); |
3150 | |
3151 | auto const shell_surface = latest_shell_surface(); |
3152 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3153 | @@ -259,14 +265,17 @@ |
3154 | auto const max_width = 23; |
3155 | |
3156 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3157 | - { |
3158 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3159 | - mir_window_spec_set_width(spec, width); |
3160 | - mir_window_spec_set_height(spec, height); |
3161 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3162 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3163 | - mir_window_spec_set_max_width(spec, max_width); |
3164 | - }); |
3165 | + { |
3166 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3167 | + mir_window_spec_set_width(spec, width); |
3168 | + mir_window_spec_set_height(spec, height); |
3169 | +#pragma GCC diagnostic push |
3170 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3171 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3172 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3173 | +#pragma GCC diagnostic pop |
3174 | + mir_window_spec_set_max_width(spec, max_width); |
3175 | + }); |
3176 | |
3177 | auto const shell_surface = latest_shell_surface(); |
3178 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3179 | @@ -284,14 +293,17 @@ |
3180 | auto const max_height = 29; |
3181 | |
3182 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3183 | - { |
3184 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3185 | - mir_window_spec_set_width(spec, width); |
3186 | - mir_window_spec_set_height(spec, height); |
3187 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3188 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3189 | - mir_window_spec_set_max_height(spec, max_height); |
3190 | - }); |
3191 | + { |
3192 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3193 | + mir_window_spec_set_width(spec, width); |
3194 | + mir_window_spec_set_height(spec, height); |
3195 | +#pragma GCC diagnostic push |
3196 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3197 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3198 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3199 | +#pragma GCC diagnostic pop |
3200 | + mir_window_spec_set_max_height(spec, max_height); |
3201 | + }); |
3202 | |
3203 | auto const shell_surface = latest_shell_surface(); |
3204 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3205 | @@ -309,14 +321,17 @@ |
3206 | auto const width_inc = 13; |
3207 | |
3208 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3209 | - { |
3210 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3211 | - mir_window_spec_set_width(spec, width); |
3212 | - mir_window_spec_set_height(spec, height); |
3213 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3214 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3215 | - mir_window_spec_set_width_increment(spec, width_inc); |
3216 | - }); |
3217 | + { |
3218 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3219 | + mir_window_spec_set_width(spec, width); |
3220 | + mir_window_spec_set_height(spec, height); |
3221 | +#pragma GCC diagnostic push |
3222 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3223 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3224 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3225 | +#pragma GCC diagnostic pop |
3226 | + mir_window_spec_set_width_increment(spec, width_inc); |
3227 | + }); |
3228 | |
3229 | auto const shell_surface = latest_shell_surface(); |
3230 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3231 | @@ -338,15 +353,18 @@ |
3232 | auto const min_width = 7; |
3233 | |
3234 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3235 | - { |
3236 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3237 | - mir_window_spec_set_width(spec, width); |
3238 | - mir_window_spec_set_height(spec, height); |
3239 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3240 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3241 | - mir_window_spec_set_width_increment(spec, width_inc); |
3242 | - mir_window_spec_set_min_width(spec, min_width); |
3243 | - }); |
3244 | + { |
3245 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3246 | + mir_window_spec_set_width(spec, width); |
3247 | + mir_window_spec_set_height(spec, height); |
3248 | +#pragma GCC diagnostic push |
3249 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3250 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3251 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3252 | +#pragma GCC diagnostic pop |
3253 | + mir_window_spec_set_width_increment(spec, width_inc); |
3254 | + mir_window_spec_set_min_width(spec, min_width); |
3255 | + }); |
3256 | |
3257 | auto const shell_surface = latest_shell_surface(); |
3258 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3259 | @@ -367,14 +385,17 @@ |
3260 | auto const height_inc = 13; |
3261 | |
3262 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3263 | - { |
3264 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3265 | - mir_window_spec_set_width(spec, width); |
3266 | - mir_window_spec_set_height(spec, height); |
3267 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3268 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3269 | - mir_window_spec_set_height_increment(spec, height_inc); |
3270 | - }); |
3271 | + { |
3272 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3273 | + mir_window_spec_set_width(spec, width); |
3274 | + mir_window_spec_set_height(spec, height); |
3275 | +#pragma GCC diagnostic push |
3276 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3277 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3278 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3279 | +#pragma GCC diagnostic pop |
3280 | + mir_window_spec_set_height_increment(spec, height_inc); |
3281 | + }); |
3282 | |
3283 | auto const shell_surface = latest_shell_surface(); |
3284 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3285 | @@ -396,15 +417,18 @@ |
3286 | auto const min_height = 7; |
3287 | |
3288 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3289 | - { |
3290 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3291 | - mir_window_spec_set_width(spec, width); |
3292 | - mir_window_spec_set_height(spec, height); |
3293 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3294 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3295 | - mir_window_spec_set_height_increment(spec, height_inc); |
3296 | - mir_window_spec_set_min_height(spec, min_height); |
3297 | - }); |
3298 | + { |
3299 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3300 | + mir_window_spec_set_width(spec, width); |
3301 | + mir_window_spec_set_height(spec, height); |
3302 | +#pragma GCC diagnostic push |
3303 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3304 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3305 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3306 | +#pragma GCC diagnostic pop |
3307 | + mir_window_spec_set_height_increment(spec, height_inc); |
3308 | + mir_window_spec_set_min_height(spec, min_height); |
3309 | + }); |
3310 | |
3311 | auto const shell_surface = latest_shell_surface(); |
3312 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3313 | @@ -426,14 +450,17 @@ |
3314 | auto const aspect_height = 7; |
3315 | |
3316 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3317 | - { |
3318 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3319 | - mir_window_spec_set_width(spec, width); |
3320 | - mir_window_spec_set_height(spec, height); |
3321 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3322 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3323 | - mir_window_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height); |
3324 | - }); |
3325 | + { |
3326 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3327 | + mir_window_spec_set_width(spec, width); |
3328 | + mir_window_spec_set_height(spec, height); |
3329 | +#pragma GCC diagnostic push |
3330 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3331 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3332 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3333 | +#pragma GCC diagnostic pop |
3334 | + mir_window_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height); |
3335 | + }); |
3336 | |
3337 | auto const shell_surface = latest_shell_surface(); |
3338 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3339 | @@ -456,14 +483,17 @@ |
3340 | auto const aspect_height = 11; |
3341 | |
3342 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3343 | - { |
3344 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3345 | - mir_window_spec_set_width(spec, width); |
3346 | - mir_window_spec_set_height(spec, height); |
3347 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3348 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3349 | - mir_window_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height); |
3350 | - }); |
3351 | + { |
3352 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3353 | + mir_window_spec_set_width(spec, width); |
3354 | + mir_window_spec_set_height(spec, height); |
3355 | +#pragma GCC diagnostic push |
3356 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3357 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3358 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3359 | +#pragma GCC diagnostic pop |
3360 | + mir_window_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height); |
3361 | + }); |
3362 | |
3363 | auto const shell_surface = latest_shell_surface(); |
3364 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3365 | @@ -493,28 +523,31 @@ |
3366 | auto const expected_aspect_ratio = FloatEq(float(aspect_width)/aspect_height); |
3367 | |
3368 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3369 | - { |
3370 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3371 | - mir_window_spec_set_width(spec, width); |
3372 | - mir_window_spec_set_height(spec, height); |
3373 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3374 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3375 | - |
3376 | - mir_window_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height); |
3377 | - mir_window_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height); |
3378 | - |
3379 | - mir_window_spec_set_min_height(spec, min_height); |
3380 | - mir_window_spec_set_min_width(spec, min_width); |
3381 | - |
3382 | - mir_window_spec_set_max_height(spec, max_height); |
3383 | - mir_window_spec_set_max_width(spec, max_width); |
3384 | - |
3385 | - mir_window_spec_set_width_increment(spec, width_inc); |
3386 | - mir_window_spec_set_height_increment(spec, height_inc); |
3387 | - |
3388 | - mir_window_spec_set_height(spec, min_height); |
3389 | - mir_window_spec_set_width(spec, min_width); |
3390 | - }); |
3391 | + { |
3392 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3393 | + mir_window_spec_set_width(spec, width); |
3394 | + mir_window_spec_set_height(spec, height); |
3395 | +#pragma GCC diagnostic push |
3396 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3397 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3398 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3399 | +#pragma GCC diagnostic pop |
3400 | + |
3401 | + mir_window_spec_set_min_aspect_ratio(spec, aspect_width, aspect_height); |
3402 | + mir_window_spec_set_max_aspect_ratio(spec, aspect_width, aspect_height); |
3403 | + |
3404 | + mir_window_spec_set_min_height(spec, min_height); |
3405 | + mir_window_spec_set_min_width(spec, min_width); |
3406 | + |
3407 | + mir_window_spec_set_max_height(spec, max_height); |
3408 | + mir_window_spec_set_max_width(spec, max_width); |
3409 | + |
3410 | + mir_window_spec_set_width_increment(spec, width_inc); |
3411 | + mir_window_spec_set_height_increment(spec, height_inc); |
3412 | + |
3413 | + mir_window_spec_set_height(spec, min_height); |
3414 | + mir_window_spec_set_width(spec, min_width); |
3415 | + }); |
3416 | |
3417 | auto const shell_surface = latest_shell_surface(); |
3418 | shell_surface->add_observer(mt::fake_shared(surface_observer)); |
3419 | @@ -534,8 +567,8 @@ |
3420 | generate_alt_move_to(bottom_right + motion); |
3421 | |
3422 | Size const expected_size{ |
3423 | - std::min(max_width, min_width + delta*width_inc), |
3424 | - std::min(max_height, min_height + delta*height_inc)}; |
3425 | + std::min(max_width, min_width + delta*width_inc), |
3426 | + std::min(max_height, min_height + delta*height_inc)}; |
3427 | |
3428 | EXPECT_THAT(static_cast<float>(actual.width.as_int())/actual.height.as_int(), expected_aspect_ratio); |
3429 | EXPECT_THAT(actual, Eq(expected_size)); |
3430 | @@ -547,13 +580,16 @@ |
3431 | auto const type = GetParam(); |
3432 | |
3433 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3434 | - { |
3435 | - mir_window_spec_set_type(spec, type); |
3436 | - mir_window_spec_set_width(spec, width); |
3437 | - mir_window_spec_set_height(spec, height); |
3438 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3439 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3440 | - }); |
3441 | + { |
3442 | + mir_window_spec_set_type(spec, type); |
3443 | + mir_window_spec_set_width(spec, width); |
3444 | + mir_window_spec_set_height(spec, height); |
3445 | +#pragma GCC diagnostic push |
3446 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3447 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3448 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3449 | +#pragma GCC diagnostic pop |
3450 | + }); |
3451 | |
3452 | EXPECT_THAT(surface, IsValidSurface()); |
3453 | } |
3454 | @@ -563,23 +599,29 @@ |
3455 | auto const type = GetParam(); |
3456 | |
3457 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3458 | - { |
3459 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3460 | - mir_window_spec_set_width(spec, width); |
3461 | - mir_window_spec_set_height(spec, height); |
3462 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3463 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3464 | - }); |
3465 | + { |
3466 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3467 | + mir_window_spec_set_width(spec, width); |
3468 | + mir_window_spec_set_height(spec, height); |
3469 | +#pragma GCC diagnostic push |
3470 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3471 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3472 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3473 | +#pragma GCC diagnostic pop |
3474 | + }); |
3475 | |
3476 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3477 | - { |
3478 | - mir_window_spec_set_type(spec, type); |
3479 | - mir_window_spec_set_width(spec, width); |
3480 | - mir_window_spec_set_height(spec, height); |
3481 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3482 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3483 | - mir_window_spec_set_parent(spec, parent); |
3484 | - }); |
3485 | + { |
3486 | + mir_window_spec_set_type(spec, type); |
3487 | + mir_window_spec_set_width(spec, width); |
3488 | + mir_window_spec_set_height(spec, height); |
3489 | +#pragma GCC diagnostic push |
3490 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3491 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3492 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3493 | +#pragma GCC diagnostic pop |
3494 | + mir_window_spec_set_parent(spec, parent); |
3495 | + }); |
3496 | |
3497 | EXPECT_THAT(surface, Not(IsValidSurface())); |
3498 | } |
3499 | @@ -589,23 +631,29 @@ |
3500 | auto const type = GetParam(); |
3501 | |
3502 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3503 | - { |
3504 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3505 | - mir_window_spec_set_width(spec, width); |
3506 | - mir_window_spec_set_height(spec, height); |
3507 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3508 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3509 | - }); |
3510 | + { |
3511 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3512 | + mir_window_spec_set_width(spec, width); |
3513 | + mir_window_spec_set_height(spec, height); |
3514 | +#pragma GCC diagnostic push |
3515 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3516 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3517 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3518 | +#pragma GCC diagnostic pop |
3519 | + }); |
3520 | |
3521 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3522 | - { |
3523 | - mir_window_spec_set_type(spec, type); |
3524 | - mir_window_spec_set_width(spec, width); |
3525 | - mir_window_spec_set_height(spec, height); |
3526 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3527 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3528 | - mir_window_spec_set_parent(spec, parent); |
3529 | - }); |
3530 | + { |
3531 | + mir_window_spec_set_type(spec, type); |
3532 | + mir_window_spec_set_width(spec, width); |
3533 | + mir_window_spec_set_height(spec, height); |
3534 | +#pragma GCC diagnostic push |
3535 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3536 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3537 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3538 | +#pragma GCC diagnostic pop |
3539 | + mir_window_spec_set_parent(spec, parent); |
3540 | + }); |
3541 | |
3542 | EXPECT_THAT(surface, IsValidSurface()); |
3543 | } |
3544 | @@ -615,13 +663,16 @@ |
3545 | auto const type = GetParam(); |
3546 | |
3547 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3548 | - { |
3549 | - mir_window_spec_set_type(spec, type); |
3550 | - mir_window_spec_set_width(spec, width); |
3551 | - mir_window_spec_set_height(spec, height); |
3552 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3553 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3554 | - }); |
3555 | + { |
3556 | + mir_window_spec_set_type(spec, type); |
3557 | + mir_window_spec_set_width(spec, width); |
3558 | + mir_window_spec_set_height(spec, height); |
3559 | +#pragma GCC diagnostic push |
3560 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3561 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3562 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3563 | +#pragma GCC diagnostic pop |
3564 | + }); |
3565 | |
3566 | EXPECT_THAT(surface, Not(IsValidSurface())); |
3567 | } |
3568 | @@ -631,23 +682,29 @@ |
3569 | auto const type = GetParam(); |
3570 | |
3571 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3572 | - { |
3573 | - mir_window_spec_set_type(spec, mir_window_type_normal); |
3574 | - mir_window_spec_set_width(spec, width); |
3575 | - mir_window_spec_set_height(spec, height); |
3576 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3577 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3578 | - }); |
3579 | + { |
3580 | + mir_window_spec_set_type(spec, mir_window_type_normal); |
3581 | + mir_window_spec_set_width(spec, width); |
3582 | + mir_window_spec_set_height(spec, height); |
3583 | +#pragma GCC diagnostic push |
3584 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3585 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3586 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3587 | +#pragma GCC diagnostic pop |
3588 | + }); |
3589 | |
3590 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3591 | - { |
3592 | - mir_window_spec_set_type(spec, type); |
3593 | - mir_window_spec_set_width(spec, width); |
3594 | - mir_window_spec_set_height(spec, height); |
3595 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3596 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3597 | - mir_window_spec_set_parent(spec, parent); |
3598 | - }); |
3599 | + { |
3600 | + mir_window_spec_set_type(spec, type); |
3601 | + mir_window_spec_set_width(spec, width); |
3602 | + mir_window_spec_set_height(spec, height); |
3603 | +#pragma GCC diagnostic push |
3604 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3605 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3606 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3607 | +#pragma GCC diagnostic pop |
3608 | + mir_window_spec_set_parent(spec, parent); |
3609 | + }); |
3610 | |
3611 | EXPECT_THAT(surface, IsValidSurface()); |
3612 | } |
3613 | @@ -657,22 +714,26 @@ |
3614 | auto const type = GetParam(); |
3615 | |
3616 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3617 | - { |
3618 | - mir_window_spec_set_type(spec, type); |
3619 | - mir_window_spec_set_width(spec, width); |
3620 | - mir_window_spec_set_height(spec, height); |
3621 | - mir_window_spec_set_pixel_format(spec, pixel_format); |
3622 | - mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3623 | - }); |
3624 | + { |
3625 | + mir_window_spec_set_type(spec, type); |
3626 | + mir_window_spec_set_width(spec, width); |
3627 | + mir_window_spec_set_height(spec, height); |
3628 | +#pragma GCC diagnostic push |
3629 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3630 | + mir_window_spec_set_pixel_format(spec, pixel_format); |
3631 | + mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
3632 | +#pragma GCC diagnostic pop |
3633 | + |
3634 | + }); |
3635 | |
3636 | EXPECT_THAT(surface, IsValidSurface()); |
3637 | } |
3638 | |
3639 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceWithoutParent, |
3640 | - Values(mir_window_type_utility, mir_window_type_normal)); |
3641 | + Values(mir_window_type_utility, mir_window_type_normal)); |
3642 | |
3643 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceNeedingParent, |
3644 | - Values(mir_window_type_satellite, mir_window_type_gloss, mir_window_type_tip)); |
3645 | + Values(mir_window_type_satellite, mir_window_type_gloss, mir_window_type_tip)); |
3646 | |
3647 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceMayHaveParent, |
3648 | - Values(mir_window_type_dialog, mir_window_type_freestyle)); |
3649 | + Values(mir_window_type_dialog, mir_window_type_freestyle)); |
3650 | |
3651 | === modified file 'tests/acceptance-tests/test_surfaces_with_output_id.cpp' |
3652 | --- tests/acceptance-tests/test_surfaces_with_output_id.cpp 2017-01-18 13:59:18 +0000 |
3653 | +++ tests/acceptance-tests/test_surfaces_with_output_id.cpp 2017-04-11 18:27:10 +0000 |
3654 | @@ -134,7 +134,10 @@ |
3655 | static_cast<int>(width) - 1, |
3656 | static_cast<int>(height) + 1), |
3657 | del); |
3658 | +#pragma GCC diagnostic push |
3659 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3660 | mir_window_spec_set_pixel_format(spec.get(), mir_pixel_format_abgr_8888); |
3661 | +#pragma GCC diagnostic pop |
3662 | mir_window_spec_set_fullscreen_on_output(spec.get(), mir_output_get_id(output)); |
3663 | return std::make_shared<mtf::VisibleSurface>(spec.get()); |
3664 | } |
3665 | @@ -151,7 +154,10 @@ |
3666 | static_cast<int>(width), |
3667 | static_cast<int>(height)), |
3668 | del); |
3669 | +#pragma GCC diagnostic push |
3670 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3671 | mir_window_spec_set_pixel_format(spec.get(), mir_pixel_format_abgr_8888); |
3672 | +#pragma GCC diagnostic pop |
3673 | mir_window_spec_set_fullscreen_on_output(spec.get(), mir_output_get_id(output)); |
3674 | return std::make_shared<mtf::VisibleSurface>(spec.get()); |
3675 | } |
3676 | |
3677 | === modified file 'tests/acceptance-tests/test_system_compositor_window_manager.cpp' |
3678 | --- tests/acceptance-tests/test_system_compositor_window_manager.cpp 2017-01-18 02:29:37 +0000 |
3679 | +++ tests/acceptance-tests/test_system_compositor_window_manager.cpp 2017-04-11 18:27:10 +0000 |
3680 | @@ -50,7 +50,10 @@ |
3681 | |
3682 | void post_buffer() |
3683 | { |
3684 | +#pragma GCC diagnostic push |
3685 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3686 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
3687 | +#pragma GCC diagnostic pop |
3688 | } |
3689 | |
3690 | SurfaceHandle(SurfaceHandle const&& that) : window{that.window} { window = nullptr; } |
3691 | @@ -75,8 +78,10 @@ |
3692 | auto create_surface(int output_id) -> SurfaceHandle |
3693 | { |
3694 | auto const spec = mir_create_normal_window_spec(connection_, 800, 600); |
3695 | - |
3696 | +#pragma GCC diagnostic push |
3697 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3698 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_bgr_888); |
3699 | +#pragma GCC diagnostic pop |
3700 | mir_window_spec_set_fullscreen_on_output(spec, output_id); |
3701 | auto const window = mir_create_window_sync(spec); |
3702 | mir_window_spec_release(spec); |
3703 | |
3704 | === modified file 'tests/include/mir/test/doubles/mock_client_platform.h' |
3705 | --- tests/include/mir/test/doubles/mock_client_platform.h 2017-02-14 15:09:24 +0000 |
3706 | +++ tests/include/mir/test/doubles/mock_client_platform.h 2017-04-11 18:27:10 +0000 |
3707 | @@ -64,8 +64,10 @@ |
3708 | MOCK_CONST_METHOD2(get_egl_pixel_format, MirPixelFormat(EGLDisplay, EGLConfig)); |
3709 | MOCK_METHOD2(request_interface, void*(char const*, int)); |
3710 | MOCK_CONST_METHOD1(native_format_for, uint32_t(MirPixelFormat)); |
3711 | +#pragma GCC diagnostic push |
3712 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3713 | MOCK_CONST_METHOD2(native_flags_for, uint32_t(MirBufferUsage, mir::geometry::Size)); |
3714 | - |
3715 | +#pragma GCC diagnostic pop |
3716 | client::ClientContext* client_context = nullptr; |
3717 | }; |
3718 | |
3719 | |
3720 | === modified file 'tests/include/mir/test/doubles/mock_egl_native_surface.h' |
3721 | --- tests/include/mir/test/doubles/mock_egl_native_surface.h 2017-01-18 02:29:37 +0000 |
3722 | +++ tests/include/mir/test/doubles/mock_egl_native_surface.h 2017-04-11 18:27:10 +0000 |
3723 | @@ -32,7 +32,10 @@ |
3724 | |
3725 | struct MockEGLNativeSurface : public client::EGLNativeSurface |
3726 | { |
3727 | +#pragma GCC diagnostic push |
3728 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3729 | MOCK_CONST_METHOD0(get_parameters, MirWindowParameters()); |
3730 | +#pragma GCC diagnostic pop |
3731 | MOCK_METHOD0(get_current_buffer, std::shared_ptr<client::ClientBuffer>()); |
3732 | MOCK_METHOD0(swap_buffers_sync, void()); |
3733 | MOCK_METHOD2(request_and_wait_for_configure, void(MirWindowAttrib,int)); |
3734 | |
3735 | === modified file 'tests/include/mir/test/doubles/mock_mir_buffer.h' |
3736 | --- tests/include/mir/test/doubles/mock_mir_buffer.h 2017-01-24 07:49:13 +0000 |
3737 | +++ tests/include/mir/test/doubles/mock_mir_buffer.h 2017-04-11 18:27:10 +0000 |
3738 | @@ -45,8 +45,10 @@ |
3739 | MOCK_CONST_METHOD0(client_buffer, std::shared_ptr<client::ClientBuffer>()); |
3740 | MOCK_METHOD0(map_region, MirGraphicsRegion()); |
3741 | MOCK_METHOD0(unmap_region, void()); |
3742 | - |
3743 | +#pragma GCC diagnostic push |
3744 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3745 | MOCK_CONST_METHOD0(buffer_usage, MirBufferUsage()); |
3746 | +#pragma GCC diagnostic pop |
3747 | MOCK_CONST_METHOD0(pixel_format, MirPixelFormat()); |
3748 | MOCK_CONST_METHOD0(size, geometry::Size()); |
3749 | MOCK_CONST_METHOD0(allocating_connection, MirConnection*()); |
3750 | |
3751 | === modified file 'tests/include/mir/test/doubles/mock_mir_buffer_stream.h' |
3752 | --- tests/include/mir/test/doubles/mock_mir_buffer_stream.h 2017-03-10 19:47:57 +0000 |
3753 | +++ tests/include/mir/test/doubles/mock_mir_buffer_stream.h 2017-04-11 18:27:10 +0000 |
3754 | @@ -33,8 +33,10 @@ |
3755 | struct MockMirBufferStream : public MirBufferStream |
3756 | { |
3757 | MOCK_METHOD2(release, MirWaitHandle*(MirBufferStreamCallback, void*)); |
3758 | - |
3759 | +#pragma GCC diagnostic push |
3760 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3761 | MOCK_CONST_METHOD0(get_parameters, MirWindowParameters()); |
3762 | +#pragma GCC diagnostic pop |
3763 | MOCK_METHOD0(get_current_buffer, std::shared_ptr<client::ClientBuffer>()); |
3764 | MOCK_METHOD0(get_current_buffer_id, uint32_t()); |
3765 | MOCK_METHOD0(egl_native_window, EGLNativeWindowType()); |
3766 | |
3767 | === modified file 'tests/include/mir/test/doubles/stub_buffer_allocator.h' |
3768 | --- tests/include/mir/test/doubles/stub_buffer_allocator.h 2017-03-10 19:47:57 +0000 |
3769 | +++ tests/include/mir/test/doubles/stub_buffer_allocator.h 2017-04-11 18:27:10 +0000 |
3770 | @@ -51,8 +51,11 @@ |
3771 | std::shared_ptr<graphics::Buffer> alloc_buffer(geometry::Size sz, uint32_t, uint32_t flags) |
3772 | { |
3773 | graphics::BufferProperties properties{sz, mir_pixel_format_abgr_8888, graphics::BufferUsage::hardware}; |
3774 | +#pragma GCC diagnostic push |
3775 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3776 | if (mir_buffer_usage_software == static_cast<MirBufferUsage>(flags)) |
3777 | - properties.usage = graphics::BufferUsage::software; |
3778 | + properties.usage = graphics::BufferUsage::software; |
3779 | +#pragma GCC diagnostic pop |
3780 | return std::make_shared<StubBuffer>(std::make_shared<mir_test_framework::NativeBuffer>(properties), sz); |
3781 | } |
3782 | |
3783 | |
3784 | === modified file 'tests/include/mir_test_framework/stub_client_platform_factory.h' |
3785 | --- tests/include/mir_test_framework/stub_client_platform_factory.h 2017-03-10 19:47:57 +0000 |
3786 | +++ tests/include/mir_test_framework/stub_client_platform_factory.h 2017-04-11 18:27:10 +0000 |
3787 | @@ -52,7 +52,10 @@ |
3788 | MirNativeBuffer* convert_native_buffer(mir::graphics::NativeBuffer* buf) const override; |
3789 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; |
3790 | uint32_t native_format_for(MirPixelFormat) const override; |
3791 | +#pragma GCC diagnostic push |
3792 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3793 | uint32_t native_flags_for(MirBufferUsage, mir::geometry::Size) const override; |
3794 | +#pragma GCC diagnostic pop |
3795 | |
3796 | mir::client::ClientContext* const context; |
3797 | MirBufferPackage mutable native_buffer; |
3798 | |
3799 | === modified file 'tests/integration-tests/client/test_mirsurface.cpp' |
3800 | --- tests/integration-tests/client/test_mirsurface.cpp 2017-01-18 02:29:37 +0000 |
3801 | +++ tests/integration-tests/client/test_mirsurface.cpp 2017-04-11 18:27:10 +0000 |
3802 | @@ -62,10 +62,13 @@ |
3803 | |
3804 | MATCHER_P(MatchesRequired, spec, "") |
3805 | { |
3806 | +#pragma GCC diagnostic push |
3807 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3808 | return spec->width == arg.size.width.as_int() && |
3809 | spec->height == arg.size.height.as_int() && |
3810 | spec->pixel_format == arg.pixel_format && |
3811 | spec->buffer_usage == static_cast<MirBufferUsage>(arg.buffer_usage); |
3812 | +#pragma GCC diagnostic pop |
3813 | } |
3814 | |
3815 | MATCHER_P(MatchesOptional, spec, "") |
3816 | @@ -184,7 +187,10 @@ |
3817 | auto spec_deleter = [](MirWindowSpec* spec) {mir_window_spec_release(spec);}; |
3818 | auto spec_temp = mir_create_menu_window_spec(connection, 640, 480, |
3819 | parent.get(), &attachment_rect, edge); |
3820 | +#pragma GCC diagnostic push |
3821 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3822 | mir_window_spec_set_pixel_format(spec_temp, mir_pixel_format_abgr_8888); |
3823 | +#pragma GCC diagnostic pop |
3824 | std::unique_ptr<MirWindowSpec, decltype(spec_deleter)> menu_spec{ |
3825 | spec_temp, |
3826 | spec_deleter |
3827 | @@ -208,7 +214,10 @@ |
3828 | auto spec_deleter = [](MirWindowSpec* spec) {mir_window_spec_release(spec);}; |
3829 | auto spec_temp = mir_create_tip_window_spec(connection, 640, 480, |
3830 | parent.get(), &placement_hint, mir_edge_attachment_vertical); |
3831 | +#pragma GCC diagnostic push |
3832 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3833 | mir_window_spec_set_pixel_format(spec_temp, mir_pixel_format_abgr_8888); |
3834 | +#pragma GCC diagnostic pop |
3835 | std::unique_ptr<MirWindowSpec, decltype(spec_deleter)> tooltip_spec{ |
3836 | spec_temp, |
3837 | spec_deleter |
3838 | @@ -230,8 +239,10 @@ |
3839 | }; |
3840 | |
3841 | ASSERT_THAT(dialog_spec, NotNull()); |
3842 | +#pragma GCC diagnostic push |
3843 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3844 | mir_window_spec_set_pixel_format(dialog_spec.get(), mir_pixel_format_abgr_8888); |
3845 | - |
3846 | +#pragma GCC diagnostic pop |
3847 | EXPECT_CALL(*mock_shell, create_surface(_, AllOf(IsADialog(), NoParentSet()),_)); |
3848 | create_surface(dialog_spec.get()); |
3849 | } |
3850 | @@ -249,8 +260,10 @@ |
3851 | }; |
3852 | |
3853 | ASSERT_THAT(dialog_spec, NotNull()); |
3854 | +#pragma GCC diagnostic push |
3855 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3856 | mir_window_spec_set_pixel_format(dialog_spec.get(), mir_pixel_format_abgr_8888); |
3857 | - |
3858 | +#pragma GCC diagnostic pop |
3859 | EXPECT_CALL(*mock_shell, create_surface(_, AllOf(IsADialog(), HasParent(parent.get())),_)); |
3860 | create_surface(dialog_spec.get()); |
3861 | } |
3862 | |
3863 | === modified file 'tests/integration-tests/test_client_screencast.cpp' |
3864 | --- tests/integration-tests/test_client_screencast.cpp 2017-01-18 02:29:37 +0000 |
3865 | +++ tests/integration-tests/test_client_screencast.cpp 2017-04-11 18:27:10 +0000 |
3866 | @@ -188,8 +188,12 @@ |
3867 | ASSERT_NE(nullptr, screencast); |
3868 | ASSERT_TRUE(mir_screencast_is_valid(screencast)); |
3869 | |
3870 | +#pragma GCC diagnostic push |
3871 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3872 | auto egl_native_window = |
3873 | mir_buffer_stream_get_egl_native_window(mir_screencast_get_buffer_stream(screencast)); |
3874 | +#pragma GCC diagnostic pop |
3875 | + |
3876 | EXPECT_NE(MirEGLNativeWindowType(), egl_native_window); |
3877 | |
3878 | mir_screencast_spec_release(spec); |
3879 | |
3880 | === modified file 'tests/integration-tests/test_error_reporting.cpp' |
3881 | --- tests/integration-tests/test_error_reporting.cpp 2017-01-18 02:29:37 +0000 |
3882 | +++ tests/integration-tests/test_error_reporting.cpp 2017-04-11 18:27:10 +0000 |
3883 | @@ -130,8 +130,10 @@ |
3884 | ASSERT_THAT(connection, IsValid()); |
3885 | |
3886 | auto const spec = mir_create_normal_window_spec(connection, 640, 480); |
3887 | +#pragma GCC diagnostic push |
3888 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3889 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
3890 | - |
3891 | +#pragma GCC diagnostic pop |
3892 | auto const window = mir_create_window_sync(spec); |
3893 | mir_window_spec_release(spec); |
3894 | |
3895 | |
3896 | === modified file 'tests/integration-tests/test_focus_selection.cpp' |
3897 | --- tests/integration-tests/test_focus_selection.cpp 2017-01-18 02:29:37 +0000 |
3898 | +++ tests/integration-tests/test_focus_selection.cpp 2017-04-11 18:27:10 +0000 |
3899 | @@ -133,7 +133,10 @@ |
3900 | ASSERT_TRUE(mir_connection_is_valid(connection)); |
3901 | |
3902 | auto const window = mtf::make_any_surface(connection); |
3903 | +#pragma GCC diagnostic push |
3904 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3905 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
3906 | +#pragma GCC diagnostic pop |
3907 | mir_window_release_sync(window); |
3908 | |
3909 | mir_connection_release(connection); |
3910 | |
3911 | === modified file 'tests/integration-tests/test_server_shutdown.cpp' |
3912 | --- tests/integration-tests/test_server_shutdown.cpp 2017-01-30 05:18:36 +0000 |
3913 | +++ tests/integration-tests/test_server_shutdown.cpp 2017-04-11 18:27:10 +0000 |
3914 | @@ -93,15 +93,21 @@ |
3915 | |
3916 | void swap_sync() |
3917 | { |
3918 | +#pragma GCC diagnostic push |
3919 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3920 | mir_buffer_stream_swap_buffers_sync( |
3921 | mir_window_get_buffer_stream(window)); |
3922 | +#pragma GCC diagnostic pop |
3923 | } |
3924 | |
3925 | void swap_async() |
3926 | { |
3927 | +#pragma GCC diagnostic push |
3928 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3929 | mir_buffer_stream_swap_buffers( |
3930 | mir_window_get_buffer_stream(window), |
3931 | null_buffer_stream_callback, nullptr); |
3932 | +#pragma GCC diagnostic pop |
3933 | } |
3934 | |
3935 | MirConnection* const connection; |
3936 | |
3937 | === modified file 'tests/integration-tests/test_stale_frames.cpp' |
3938 | --- tests/integration-tests/test_stale_frames.cpp 2017-01-18 02:29:37 +0000 |
3939 | +++ tests/integration-tests/test_stale_frames.cpp 2017-04-11 18:27:10 +0000 |
3940 | @@ -292,8 +292,10 @@ |
3941 | std::set<mg::BufferID> stale_buffers; |
3942 | |
3943 | stale_buffers.emplace(mir_debug_window_current_buffer_id(window)); |
3944 | - |
3945 | +#pragma GCC diagnostic push |
3946 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3947 | auto bs = mir_window_get_buffer_stream(window); |
3948 | +#pragma GCC diagnostic pop |
3949 | mir_buffer_stream_set_swapinterval(bs, GetParam()); |
3950 | mir_buffer_stream_swap_buffers_sync(bs); |
3951 | |
3952 | @@ -321,8 +323,10 @@ |
3953 | using namespace testing; |
3954 | |
3955 | stop_compositor(); |
3956 | - |
3957 | +#pragma GCC diagnostic push |
3958 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3959 | auto bs = mir_window_get_buffer_stream(window); |
3960 | +#pragma GCC diagnostic pop |
3961 | mir_buffer_stream_set_swapinterval(bs, GetParam()); |
3962 | mir_buffer_stream_swap_buffers_sync(bs); |
3963 | mir_buffer_stream_swap_buffers_sync(bs); |
3964 | |
3965 | === modified file 'tests/integration-tests/test_surface_first_frame_sync.cpp' |
3966 | --- tests/integration-tests/test_surface_first_frame_sync.cpp 2017-01-30 05:18:36 +0000 |
3967 | +++ tests/integration-tests/test_surface_first_frame_sync.cpp 2017-04-11 18:27:10 +0000 |
3968 | @@ -209,10 +209,11 @@ |
3969 | * all before we reach this point. |
3970 | */ |
3971 | EXPECT_EQ(0, number_of_executed_render_operations()); |
3972 | - |
3973 | +#pragma GCC diagnostic push |
3974 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3975 | mir_buffer_stream_swap_buffers_sync( |
3976 | mir_window_get_buffer_stream(window)); |
3977 | - |
3978 | +#pragma GCC diagnostic pop |
3979 | /* After submitting the buffer we should get some render operations */ |
3980 | mir::test::spin_wait_for_condition_or_timeout( |
3981 | [this] { return number_of_executed_render_operations() > 0; }, |
3982 | |
3983 | === modified file 'tests/integration-tests/test_surfaceloop.cpp' |
3984 | --- tests/integration-tests/test_surfaceloop.cpp 2017-01-18 02:29:37 +0000 |
3985 | +++ tests/integration-tests/test_surfaceloop.cpp 2017-04-11 18:27:10 +0000 |
3986 | @@ -141,7 +141,10 @@ |
3987 | { |
3988 | mtf::BasicClientServerFixture<BufferCounterConfig>::SetUp(); |
3989 | surface_spec = mir_create_normal_window_spec(connection, 640, 480); |
3990 | +#pragma GCC diagnostic push |
3991 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3992 | mir_window_spec_set_pixel_format(surface_spec, mir_pixel_format_abgr_8888); |
3993 | +#pragma GCC diagnostic pop |
3994 | } |
3995 | |
3996 | void TearDown() override |
3997 | |
3998 | === modified file 'tests/integration-tests/test_swapinterval.cpp' |
3999 | --- tests/integration-tests/test_swapinterval.cpp 2017-01-18 16:58:17 +0000 |
4000 | +++ tests/integration-tests/test_swapinterval.cpp 2017-04-11 18:27:10 +0000 |
4001 | @@ -113,13 +113,19 @@ |
4002 | { |
4003 | mtf::BasicClientServerFixture<ServerConfig>::SetUp(); |
4004 | window = mtf::make_any_surface(connection); |
4005 | +#pragma GCC diagnostic push |
4006 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4007 | stream = mir_connection_create_buffer_stream_sync( |
4008 | connection, 10, 10, mir_pixel_format_abgr_8888, mir_buffer_usage_hardware); |
4009 | +#pragma GCC diagnostic pop |
4010 | } |
4011 | |
4012 | void TearDown() |
4013 | { |
4014 | +#pragma GCC diagnostic push |
4015 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4016 | mir_buffer_stream_release_sync(stream); |
4017 | +#pragma GCC diagnostic pop |
4018 | mir_window_release_sync(window); |
4019 | mtf::BasicClientServerFixture<ServerConfig>::TearDown(); |
4020 | } |
4021 | |
4022 | === modified file 'tests/mir_test_framework/any_surface.cpp' |
4023 | --- tests/mir_test_framework/any_surface.cpp 2017-02-15 07:38:33 +0000 |
4024 | +++ tests/mir_test_framework/any_surface.cpp 2017-04-11 18:27:10 +0000 |
4025 | @@ -39,7 +39,10 @@ |
4026 | MirWindow* mtf::make_any_surface(MirConnection *connection, MirWindowEventCallback callback, void* context) |
4027 | { |
4028 | auto spec = mir_create_normal_window_spec(connection, width, height); |
4029 | +#pragma GCC diagnostic push |
4030 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4031 | mir_window_spec_set_pixel_format(spec, format); |
4032 | +#pragma GCC diagnostic pop |
4033 | mir_window_spec_set_event_handler(spec, callback, context); |
4034 | auto window = mir_create_window_sync(spec); |
4035 | mir_window_spec_release(spec); |
4036 | @@ -57,7 +60,10 @@ |
4037 | { |
4038 | |
4039 | auto spec = mir_create_normal_window_spec(connection, size.width.as_int(), size.height.as_int()); |
4040 | +#pragma GCC diagnostic push |
4041 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4042 | mir_window_spec_set_pixel_format(spec, f); |
4043 | +#pragma GCC diagnostic pop |
4044 | auto window = mir_create_window_sync(spec); |
4045 | mir_window_spec_release(spec); |
4046 | |
4047 | |
4048 | === modified file 'tests/mir_test_framework/connected_client_with_a_window.cpp' |
4049 | --- tests/mir_test_framework/connected_client_with_a_window.cpp 2017-03-14 02:26:28 +0000 |
4050 | +++ tests/mir_test_framework/connected_client_with_a_window.cpp 2017-04-11 18:27:10 +0000 |
4051 | @@ -27,9 +27,12 @@ |
4052 | auto const spec = mir_create_normal_window_spec( |
4053 | connection, |
4054 | surface_size.width.as_int(), surface_size.height.as_int()); |
4055 | +#pragma GCC diagnostic push |
4056 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4057 | mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888); |
4058 | mir_window_spec_set_name(spec, "ConnectedClientWithASurfaceFixtureSurface"); |
4059 | mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware); |
4060 | +#pragma GCC diagnostic pop |
4061 | |
4062 | window = mir_create_window_sync(spec); |
4063 | mir_window_spec_release(spec); |
4064 | |
4065 | === modified file 'tests/mir_test_framework/stub_client_platform_factory.cpp' |
4066 | --- tests/mir_test_framework/stub_client_platform_factory.cpp 2017-03-10 19:47:57 +0000 |
4067 | +++ tests/mir_test_framework/stub_client_platform_factory.cpp 2017-04-11 18:27:10 +0000 |
4068 | @@ -223,8 +223,11 @@ |
4069 | return 0u; |
4070 | } |
4071 | |
4072 | +#pragma GCC diagnostic push |
4073 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4074 | uint32_t mtf::StubClientPlatform::native_flags_for(MirBufferUsage usage, mir::geometry::Size) const |
4075 | { |
4076 | +#pragma GCC diagnostic pop |
4077 | return static_cast<uint32_t>(usage); |
4078 | } |
4079 | |
4080 | |
4081 | === modified file 'tests/mir_test_framework/visible_surface.cpp' |
4082 | --- tests/mir_test_framework/visible_surface.cpp 2017-01-18 02:29:37 +0000 |
4083 | +++ tests/mir_test_framework/visible_surface.cpp 2017-04-11 18:27:10 +0000 |
4084 | @@ -27,7 +27,10 @@ |
4085 | // Swap buffers to ensure window is visible for event based tests |
4086 | if (mir_window_is_valid(window)) |
4087 | { |
4088 | +#pragma GCC diagnostic push |
4089 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4090 | mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window)); |
4091 | +#pragma GCC diagnostic pop |
4092 | |
4093 | std::unique_lock<std::mutex> lk(mutex); |
4094 | if (!cv.wait_for(lk, std::chrono::seconds(5), [this] { return visible; })) |
4095 | |
4096 | === modified file 'tests/performance-tests/test_client_startup.cpp' |
4097 | --- tests/performance-tests/test_client_startup.cpp 2017-01-18 02:29:37 +0000 |
4098 | +++ tests/performance-tests/test_client_startup.cpp 2017-04-11 18:27:10 +0000 |
4099 | @@ -70,7 +70,10 @@ |
4100 | auto format = find_pixel_format(connection); |
4101 | |
4102 | auto spec = mir_create_normal_window_spec(connection, 720, 1280); |
4103 | +#pragma GCC diagnostic push |
4104 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4105 | mir_window_spec_set_pixel_format(spec, format); |
4106 | +#pragma GCC diagnostic pop |
4107 | auto window = mir_create_window_sync(spec); |
4108 | |
4109 | mir_window_spec_release(spec); |
4110 | @@ -92,7 +95,10 @@ |
4111 | |
4112 | auto conn = create_connection(); |
4113 | auto window = make_surface(conn); |
4114 | +#pragma GCC diagnostic push |
4115 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4116 | auto stream = mir_window_get_buffer_stream(window); |
4117 | +#pragma GCC diagnostic pop |
4118 | if (!mir_buffer_stream_is_valid(stream)) |
4119 | { |
4120 | std::string error_msg{"Could not get buffer stream from window: "}; |
4121 | |
4122 | === modified file 'tests/privileged-tests/test_input_events.cpp' |
4123 | --- tests/privileged-tests/test_input_events.cpp 2017-02-15 07:38:33 +0000 |
4124 | +++ tests/privileged-tests/test_input_events.cpp 2017-04-11 18:27:10 +0000 |
4125 | @@ -199,7 +199,8 @@ |
4126 | if (!success) |
4127 | throw std::runtime_error("Timeout waiting for window to become focused and exposed"); |
4128 | } |
4129 | - |
4130 | +#pragma GCC diagnostic push |
4131 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4132 | MirSurfaceUPtr create_surface_with_input_handler( |
4133 | MirConnection* connection, |
4134 | MockInputHandler* handler) |
4135 | @@ -222,7 +223,7 @@ |
4136 | |
4137 | return MirSurfaceUPtr(window, mir_window_release_sync); |
4138 | } |
4139 | - |
4140 | +#pragma GCC diagnostic pop |
4141 | static int const key_down = 1; |
4142 | static int const key_up = 0; |
4143 | |
4144 | |
4145 | === modified file 'tests/test-clients/impolite-shutdown/scroll.cpp' |
4146 | --- tests/test-clients/impolite-shutdown/scroll.cpp 2017-01-18 02:29:37 +0000 |
4147 | +++ tests/test-clients/impolite-shutdown/scroll.cpp 2017-04-11 18:27:10 +0000 |
4148 | @@ -38,7 +38,8 @@ |
4149 | static char const *socket_file = NULL; |
4150 | static EGLDisplay disp; |
4151 | |
4152 | - |
4153 | +#pragma GCC diagnostic push |
4154 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4155 | void create_and_run_scroll_surface(MirConnection *connection) |
4156 | { |
4157 | /* egl setup */ |
4158 | @@ -193,6 +194,6 @@ |
4159 | |
4160 | return 0; |
4161 | } |
4162 | - |
4163 | +#pragma GCC diagnostic pop |
4164 | |
4165 | |
4166 | |
4167 | === modified file 'tests/test-clients/mir-stress/src/client.cpp' |
4168 | --- tests/test-clients/mir-stress/src/client.cpp 2017-01-18 13:59:18 +0000 |
4169 | +++ tests/test-clients/mir-stress/src/client.cpp 2017-04-11 18:27:10 +0000 |
4170 | @@ -58,6 +58,8 @@ |
4171 | return true; |
4172 | } |
4173 | |
4174 | +#pragma GCC diagnostic push |
4175 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4176 | bool UnacceleratedClient::create_surface() |
4177 | { |
4178 | auto display_configuration = mir_connection_create_display_configuration(connection_); |
4179 | @@ -83,6 +85,7 @@ |
4180 | |
4181 | return true; |
4182 | } |
4183 | +#pragma GCC diagnostic pop |
4184 | |
4185 | void UnacceleratedClient::release_surface() |
4186 | { |
4187 | |
4188 | === modified file 'tests/unit-tests/client/test_client_buffer_stream.cpp' |
4189 | --- tests/unit-tests/client/test_client_buffer_stream.cpp 2017-03-14 04:41:33 +0000 |
4190 | +++ tests/unit-tests/client/test_client_buffer_stream.cpp 2017-04-11 18:27:10 +0000 |
4191 | @@ -107,10 +107,13 @@ |
4192 | { |
4193 | return 0u; |
4194 | } |
4195 | +#pragma GCC diagnostic push |
4196 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4197 | uint32_t native_flags_for(MirBufferUsage, mir::geometry::Size) const override |
4198 | { |
4199 | return 0u; |
4200 | } |
4201 | +#pragma GCC diagnostic pop |
4202 | |
4203 | static EGLNativeWindowType egl_native_window; |
4204 | std::shared_ptr<mcl::ClientBufferFactory> const buffer_factory; |
4205 | @@ -170,9 +173,11 @@ |
4206 | ON_CALL(mock_factory, create_buffer(_,An<geom::Size>(),_)) |
4207 | .WillByDefault(Return(std::make_shared<mtd::NullClientBuffer>())); |
4208 | } |
4209 | - |
4210 | +#pragma GCC diagnostic push |
4211 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4212 | mp::BufferStream a_protobuf_buffer_stream(MirPixelFormat format, MirBufferUsage usage) |
4213 | { |
4214 | +#pragma GCC diagnostic pop |
4215 | mp::BufferStream protobuf_bs; |
4216 | mp::BufferStreamId bs_id; |
4217 | |
4218 | @@ -221,8 +226,10 @@ |
4219 | testing::NiceMock<mtd::MockProtobufServer> mock_protobuf_server; |
4220 | |
4221 | MirPixelFormat const default_pixel_format = mir_pixel_format_argb_8888; |
4222 | +#pragma GCC diagnostic push |
4223 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4224 | MirBufferUsage const default_buffer_usage = mir_buffer_usage_hardware; |
4225 | - |
4226 | +#pragma GCC diagnostic pop |
4227 | std::shared_ptr<mcl::PerfReport> const perf_report = std::make_shared<mcl::NullPerfReport>(); |
4228 | |
4229 | MirBufferPackage buffer_package = a_buffer_package(); |
4230 | |
4231 | === modified file 'tests/unit-tests/client/test_mir_buffer.cpp' |
4232 | --- tests/unit-tests/client/test_mir_buffer.cpp 2017-01-24 07:49:13 +0000 |
4233 | +++ tests/unit-tests/client/test_mir_buffer.cpp 2017-04-11 18:27:10 +0000 |
4234 | @@ -49,7 +49,10 @@ |
4235 | geom::Width width { 190 }; |
4236 | geom::Height height { 119 }; |
4237 | geom::Stride stride { 2211 }; |
4238 | +#pragma GCC diagnostic push |
4239 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4240 | MirBufferUsage usage { mir_buffer_usage_hardware }; |
4241 | +#pragma GCC diagnostic pop |
4242 | MirPixelFormat format { mir_pixel_format_abgr_8888 }; |
4243 | std::shared_ptr<char> vaddr { std::make_shared<char>('\0') }; |
4244 | MirBufferCallback cb { buffer_callback }; |
4245 | |
4246 | === modified file 'tests/unit-tests/client/test_mir_connection.cpp' |
4247 | --- tests/unit-tests/client/test_mir_connection.cpp 2017-03-10 19:47:57 +0000 |
4248 | +++ tests/unit-tests/client/test_mir_connection.cpp 2017-04-11 18:27:10 +0000 |
4249 | @@ -85,6 +85,8 @@ |
4250 | { |
4251 | MOCK_METHOD1(cancel_requests_with_context, void(void*)); |
4252 | MOCK_METHOD1(generate_buffer, std::unique_ptr<mcl::MirBuffer>(mp::Buffer const&)); |
4253 | +#pragma GCC diagnostic push |
4254 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4255 | MOCK_METHOD7(expect_buffer, void( |
4256 | std::shared_ptr<mcl::ClientBufferFactory> const& native_buffer_factory, |
4257 | MirConnection* connection, |
4258 | @@ -93,6 +95,7 @@ |
4259 | MirBufferUsage usage, |
4260 | MirBufferCallback cb, |
4261 | void* cb_context)); |
4262 | +#pragma GCC diagnostic pop |
4263 | MOCK_METHOD7(expect_buffer, void( |
4264 | std::shared_ptr<mcl::ClientBufferFactory> const& native_buffer_factory, |
4265 | MirConnection* connection, |
4266 | @@ -216,7 +219,10 @@ |
4267 | MOCK_CONST_METHOD2(get_egl_pixel_format, MirPixelFormat(EGLDisplay, EGLConfig)); |
4268 | MOCK_METHOD2(request_interface, void*(char const*, int)); |
4269 | MOCK_CONST_METHOD1(native_format_for, uint32_t(MirPixelFormat)); |
4270 | +#pragma GCC diagnostic push |
4271 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4272 | MOCK_CONST_METHOD2(native_flags_for, uint32_t(MirBufferUsage, mir::geometry::Size)); |
4273 | +#pragma GCC diagnostic pop |
4274 | mcl::ClientContext* client_context = nullptr; |
4275 | }; |
4276 | |
4277 | |
4278 | === modified file 'tests/unit-tests/client/test_presentation_chain.cpp' |
4279 | --- tests/unit-tests/client/test_presentation_chain.cpp 2017-03-10 19:47:57 +0000 |
4280 | +++ tests/unit-tests/client/test_presentation_chain.cpp 2017-04-11 18:27:10 +0000 |
4281 | @@ -49,7 +49,10 @@ |
4282 | MirConnection* connection {reinterpret_cast<MirConnection*>(this)}; |
4283 | geom::Size size {100, 200}; |
4284 | MirPixelFormat format = mir_pixel_format_abgr_8888; |
4285 | +#pragma GCC diagnostic push |
4286 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4287 | MirBufferUsage usage = mir_buffer_usage_software; |
4288 | +#pragma GCC diagnostic pop |
4289 | mtd::MockProtobufServer mock_server; |
4290 | int buffer_id {4312}; |
4291 | mp::Buffer ipc_buf; |
4292 | |
4293 | === modified file 'tests/unit-tests/client/test_protobuf_rpc_channel.cpp' |
4294 | --- tests/unit-tests/client/test_protobuf_rpc_channel.cpp 2017-04-04 07:04:57 +0000 |
4295 | +++ tests/unit-tests/client/test_protobuf_rpc_channel.cpp 2017-04-11 18:27:10 +0000 |
4296 | @@ -690,11 +690,14 @@ |
4297 | { |
4298 | MOCK_METHOD1(cancel_requests_with_context, void(void*)); |
4299 | MOCK_METHOD1(generate_buffer, std::unique_ptr<mcl::MirBuffer>(mir::protobuf::Buffer const&)); |
4300 | +#pragma GCC diagnostic push |
4301 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4302 | MOCK_METHOD7(expect_buffer, void( |
4303 | std::shared_ptr<mcl::ClientBufferFactory> const&, |
4304 | MirConnection*, |
4305 | mir::geometry::Size, MirPixelFormat, MirBufferUsage, |
4306 | MirBufferCallback, void*)); |
4307 | +#pragma GCC diagnostic pop |
4308 | MOCK_METHOD7(expect_buffer, void( |
4309 | std::shared_ptr<mcl::ClientBufferFactory> const&, |
4310 | MirConnection*, mir::geometry::Size, uint32_t, uint32_t, |
4311 | @@ -733,11 +736,14 @@ |
4312 | int buffer_id(3); |
4313 | auto stream_map = std::make_shared<MockSurfaceMap>(); |
4314 | auto mock_buffer_factory = std::make_shared<MockBufferFactory>(); |
4315 | +#pragma GCC diagnostic push |
4316 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4317 | EXPECT_CALL(*mock_buffer_factory, generate_buffer(_)) |
4318 | .WillOnce(InvokeWithoutArgs([&]{ |
4319 | return std::make_unique<mcl::Buffer>( |
4320 | buffer_cb, nullptr, buffer_id, nullptr, nullptr, mir_buffer_usage_software); |
4321 | })); |
4322 | +#pragma GCC diagnostic pop |
4323 | EXPECT_CALL(*stream_map, insert(buffer_id, _)); |
4324 | |
4325 | auto transport = std::make_unique<NiceMock<MockStreamTransport>>(); |
4326 | @@ -769,7 +775,10 @@ |
4327 | auto stream_map = std::make_shared<MockSurfaceMap>(); |
4328 | auto mock_buffer_factory = std::make_shared<MockBufferFactory>(); |
4329 | auto mock_client_buffer = std::make_shared<mtd::MockClientBuffer>(); |
4330 | +#pragma GCC diagnostic push |
4331 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4332 | auto buf = std::make_shared<mcl::Buffer>(buffer_cb, nullptr, buffer_id, mock_client_buffer, nullptr, mir_buffer_usage_software); |
4333 | +#pragma GCC diagnostic pop |
4334 | EXPECT_CALL(*stream_map, buffer(buffer_id)).Times(1) |
4335 | .WillOnce(Return(buf)); |
4336 | EXPECT_CALL(*mock_client_buffer, update_from(_)) |
4337 | @@ -804,7 +813,10 @@ |
4338 | auto stream_map = std::make_shared<MockSurfaceMap>(); |
4339 | auto mock_buffer_factory = std::make_shared<MockBufferFactory>(); |
4340 | auto mock_client_buffer = std::make_shared<mtd::MockClientBuffer>(); |
4341 | +#pragma GCC diagnostic push |
4342 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4343 | auto buf = std::make_shared<mcl::Buffer>(buffer_cb, nullptr, buffer_id, mock_client_buffer, nullptr, mir_buffer_usage_software); |
4344 | +#pragma GCC diagnostic pop |
4345 | EXPECT_CALL(*stream_map, stream(mir::frontend::BufferStreamId{stream_id})) |
4346 | .Times(1); |
4347 | |
4348 | |
4349 | === modified file 'tests/unit-tests/client/test_screencast_stream.cpp' |
4350 | --- tests/unit-tests/client/test_screencast_stream.cpp 2017-03-10 19:47:57 +0000 |
4351 | +++ tests/unit-tests/client/test_screencast_stream.cpp 2017-04-11 18:27:10 +0000 |
4352 | @@ -78,9 +78,11 @@ |
4353 | ON_CALL(mock_factory, create_buffer(_,An<geom::Size>(),_)) |
4354 | .WillByDefault(Return(std::make_shared<mtd::NullClientBuffer>())); |
4355 | } |
4356 | - |
4357 | +#pragma GCC diagnostic push |
4358 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4359 | mp::BufferStream a_protobuf_buffer_stream(MirPixelFormat format, MirBufferUsage usage, MirBufferPackage const& package) |
4360 | { |
4361 | +#pragma GCC diagnostic pop |
4362 | mp::BufferStream protobuf_bs; |
4363 | mp::BufferStreamId bs_id; |
4364 | |
4365 | @@ -100,8 +102,10 @@ |
4366 | testing::NiceMock<mtd::MockProtobufServer> mock_protobuf_server; |
4367 | |
4368 | MirPixelFormat const default_pixel_format = mir_pixel_format_argb_8888; |
4369 | +#pragma GCC diagnostic push |
4370 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4371 | MirBufferUsage const default_buffer_usage = mir_buffer_usage_hardware; |
4372 | - |
4373 | +#pragma GCC diagnostic pop |
4374 | MirBufferPackage buffer_package = a_buffer_package(); |
4375 | geom::Size size{buffer_package.width, buffer_package.height}; |
4376 | mp::BufferStream response = a_protobuf_buffer_stream( |
4377 | |
4378 | === modified file 'tests/unit-tests/platforms/android/client/test_egl_native_surface_interpreter.cpp' |
4379 | --- tests/unit-tests/platforms/android/client/test_egl_native_surface_interpreter.cpp 2017-01-18 04:43:15 +0000 |
4380 | +++ tests/unit-tests/platforms/android/client/test_egl_native_surface_interpreter.cpp 2017-04-11 18:27:10 +0000 |
4381 | @@ -37,6 +37,8 @@ |
4382 | namespace mt=mir::test; |
4383 | namespace mtd=mir::test::doubles; |
4384 | |
4385 | +#pragma GCC diagnostic push |
4386 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4387 | struct MockMirSurface : public mcl::EGLNativeSurface |
4388 | { |
4389 | MockMirSurface(MirWindowParameters params) : |
4390 | @@ -83,6 +85,7 @@ |
4391 | MirWindowParameters surf_params; |
4392 | std::shared_ptr<mtd::MockClientBuffer> mock_client_buffer; |
4393 | }; |
4394 | +#pragma GCC diagnostic pop |
4395 | |
4396 | TEST_F(AndroidInterpreter, gets_buffer_via_the_surface_on_request) |
4397 | { |
4398 | @@ -244,9 +247,11 @@ |
4399 | TEST_F(AndroidInterpreter, returns_proper_usage_bits_based_on_surface) |
4400 | { |
4401 | using namespace testing; |
4402 | +#pragma GCC diagnostic push |
4403 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4404 | MirWindowParameters const software = { "", 1, 2, mir_pixel_format_abgr_8888, mir_buffer_usage_software, 0 }; |
4405 | MirWindowParameters const hardware = { "", 1, 2, mir_pixel_format_abgr_8888, mir_buffer_usage_hardware, 0 }; |
4406 | - |
4407 | +#pragma GCC diagnostic pop |
4408 | testing::NiceMock<MockMirSurface> mock_surface{surf_params}; |
4409 | mcla::EGLNativeSurfaceInterpreter interpreter(mock_surface); |
4410 | |
4411 | |
4412 | === modified file 'tests/unit-tests/platforms/mesa/client/test_native_surface.cpp' |
4413 | --- tests/unit-tests/platforms/mesa/client/test_native_surface.cpp 2017-01-18 02:29:37 +0000 |
4414 | +++ tests/unit-tests/platforms/mesa/client/test_native_surface.cpp 2017-04-11 18:27:10 +0000 |
4415 | @@ -51,8 +51,10 @@ |
4416 | .WillByDefault(Return( |
4417 | mt::fake_shared(native_buffer))); |
4418 | } |
4419 | - |
4420 | +#pragma GCC diagnostic push |
4421 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4422 | MirWindowParameters surf_params; |
4423 | +#pragma GCC diagnostic pop |
4424 | const char* error_msg = "thrown as part of test"; |
4425 | mg::mesa::NativeBuffer native_buffer; |
4426 | testing::NiceMock<mtd::MockClientBuffer> mock_buffer; |
4427 | @@ -62,7 +64,10 @@ |
4428 | |
4429 | TEST_F(MesaClientNativeSurfaceTest, basic_parameters) |
4430 | { |
4431 | +#pragma GCC diagnostic push |
4432 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4433 | MirWindowParameters params; |
4434 | +#pragma GCC diagnostic pop |
4435 | EXPECT_EQ(MIR_MESA_TRUE, native_surface.surface_get_parameters(&native_surface, ¶ms)); |
4436 | EXPECT_EQ(surf_params.width, params.width); |
4437 | EXPECT_EQ(surf_params.height, params.height); |
4438 | @@ -139,8 +144,10 @@ |
4439 | |
4440 | EXPECT_CALL(mock_surface, get_parameters()) |
4441 | .WillOnce(Throw(std::runtime_error(error_msg))); |
4442 | - |
4443 | +#pragma GCC diagnostic push |
4444 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4445 | MirWindowParameters surface_params; |
4446 | +#pragma GCC diagnostic pop |
4447 | EXPECT_EQ(MIR_MESA_FALSE, native_surface.get_parameters(&surface_params)); |
4448 | } |
4449 | |
4450 | @@ -157,8 +164,10 @@ |
4451 | TEST_F(MesaClientNativeSurfaceTest, null_native_surface_returns_error) |
4452 | { |
4453 | using namespace testing; |
4454 | - |
4455 | +#pragma GCC diagnostic push |
4456 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4457 | MirWindowParameters params; |
4458 | +#pragma GCC diagnostic pop |
4459 | MirBufferPackage buffer_package; |
4460 | |
4461 | mclg::NativeSurface null_native_surface{nullptr}; |
4462 | @@ -174,8 +183,10 @@ |
4463 | TEST_F(MesaClientNativeSurfaceTest, native_surface_after_null_returns_success) |
4464 | { |
4465 | using namespace testing; |
4466 | - |
4467 | +#pragma GCC diagnostic push |
4468 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4469 | MirWindowParameters params; |
4470 | +#pragma GCC diagnostic pop |
4471 | MirBufferPackage buffer_package; |
4472 | |
4473 | mclg::NativeSurface native_surface{nullptr}; |
4474 | |
4475 | === modified file 'tests/unit-tests/platforms/nested/test_host_buffer.cpp' |
4476 | --- tests/unit-tests/platforms/nested/test_host_buffer.cpp 2017-04-03 16:22:38 +0000 |
4477 | +++ tests/unit-tests/platforms/nested/test_host_buffer.cpp 2017-04-11 18:27:10 +0000 |
4478 | @@ -72,6 +72,8 @@ |
4479 | { |
4480 | return nullptr; |
4481 | } |
4482 | +#pragma GCC diagnostic push |
4483 | +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
4484 | void expect_buffer( |
4485 | std::shared_ptr<mcl::ClientBufferFactory> const&, |
4486 | MirConnection* conn, mir::geometry::Size, |
4487 | @@ -81,6 +83,7 @@ |
4488 | buffer = std::make_shared<mcl::Buffer>(cb, ctx, 1, nullptr, conn, usage); |
4489 | cb(reinterpret_cast<MirBuffer*>(buffer.get()), ctx); |
4490 | } |
4491 | +#pragma GCC diagnostic pop |
4492 | void expect_buffer( |
4493 | std::shared_ptr<mcl::ClientBufferFactory> const&, |
4494 | MirConnection*, mir::geometry::Size, uint32_t, uint32_t, |
PASSED: Continuous integration, rev:4154 /mir-jenkins. ubuntu. com/job/ mir-ci/ 3361/ /mir-jenkins. ubuntu. com/job/ build-mir/ 4542 /mir-jenkins. ubuntu. com/job/ build-0- fetch/4662 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 4651 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 4651 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 4651 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/4651 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/4574 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/4574/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4574 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4574/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/4574 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/4574/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 4574 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 4574/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 4574 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 4574/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4574 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 4574/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
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: /mir-jenkins. ubuntu. com/job/ mir-ci/ 3361/rebuild
https:/