Mir

Merge lp:~kdub/mir/publish-nbs-client-api into lp:mir

Proposed by Kevin DuBois
Status: Work in progress
Proposed branch: lp:~kdub/mir/publish-nbs-client-api
Merge into: lp:mir
Diff against target: 313 lines (+79/-107)
11 files modified
examples/CMakeLists.txt (+17/-0)
include/client/mir_toolkit/client_types.h (+26/-0)
include/client/mir_toolkit/mir_buffer.h (+1/-1)
include/client/mir_toolkit/mir_presentation_chain.h (+1/-1)
playground/CMakeLists.txt (+0/-18)
src/client/mir_connection.h (+1/-1)
src/client/symbols.map (+31/-33)
src/include/client/mir/client_buffer.h (+1/-1)
src/include/client/mir_toolkit/client_types_nbs.h (+0/-50)
tests/acceptance-tests/CMakeLists.txt (+1/-0)
tests/acceptance-tests/throwback/CMakeLists.txt (+0/-2)
To merge this branch: bzr merge lp:~kdub/mir/publish-nbs-client-api
Reviewer Review Type Date Requested Status
Cemil Azizoglu (community) Disapprove
Mir CI Bot continuous-integration Needs Fixing
Review via email: mp+299457@code.launchpad.net

Commit message

publish the already-vetted headers for MirBuffer and MirPresentationChain for the 0.25 series.

Description of the change

publish the already-vetted headers for MirBuffer and MirPresentationChain for the 0.25 series.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

It's actually resubmit.

I don't think this should be published until we're fully done with the MirRenderSurface work.

review: Disapprove
Revision history for this message
Kevin DuBois (kdub) wrote :

Hmm, my understanding was that the 'MirRenderSurface' work would stack nicely on top of both the MirBufferStream and MirPresentationChain api. It would be good to get as many of the "NBS" headers out as possible in 0.25.

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

I don't have any concerns for NBS at the moment. Just being a bit cautious but like you said I'd like to see the MirRenderSurface actually be able to nicely fit on top of NBS.

Revision history for this message
Chris Halse Rogers (raof) wrote :

I'm reasonably certain that this won't conflict at all with MirRenderSurface. But there's plenty of room for my reasonable-certainties to be wrong ☺.

I'd be happy for this to land now, and equally happy to delay it until after MirRenderSurface.

Revision history for this message
Kevin DuBois (kdub) wrote :

Well, happy to change to WIP for now, but I think it would be good to work out the MirRenderSurface compatibility stuff so at least the NBS headers (and vulkan support) can be released in 0.25.

Unmerged revisions

3396. By Kevin DuBois

merge in mir, fix a conflict

3395. By Kevin DuBois

merge in mir, fix conflicts

3394. By Kevin DuBois

merge in mir

3393. By Kevin DuBois

merge mir, 1 conflict

3392. By Kevin DuBois

publish NBS client api

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/CMakeLists.txt'
2--- examples/CMakeLists.txt 2016-06-02 05:33:50 +0000
3+++ examples/CMakeLists.txt 2016-07-07 18:42:58 +0000
4@@ -277,3 +277,20 @@
5 eglapp
6 ${Boost_LIBRARIES}
7 )
8+
9+mir_add_wrapped_executable(mir_demo_client_prerendered_frames
10+ mir_demo_client_prerendered_frames.c
11+)
12+
13+target_link_libraries(mir_demo_client_prerendered_frames
14+ mirclient
15+ m
16+)
17+
18+mir_add_wrapped_executable(mir_demo_client_chain_jumping_buffers
19+ mir_demo_client_chain_jumping_buffers.c
20+)
21+
22+target_link_libraries(mir_demo_client_chain_jumping_buffers
23+ mirclient
24+)
25
26=== renamed file 'playground/mir_demo_client_chain_jumping_buffers.c' => 'examples/mir_demo_client_chain_jumping_buffers.c'
27=== renamed file 'playground/mir_demo_client_prerendered_frames.c' => 'examples/mir_demo_client_prerendered_frames.c'
28=== modified file 'include/client/mir_toolkit/client_types.h'
29--- include/client/mir_toolkit/client_types.h 2016-06-03 03:38:40 +0000
30+++ include/client/mir_toolkit/client_types.h 2016-07-07 18:42:58 +0000
31@@ -47,6 +47,9 @@
32 typedef struct MirPersistentId MirPersistentId;
33 typedef struct MirBlob MirBlob;
34 typedef struct MirDisplayConfig MirDisplayConfig;
35+typedef struct MirPresentationChain MirPresentationChain;
36+typedef struct MirBuffer MirBuffer;
37+typedef void* MirNativeFence;
38 typedef struct MirError MirError;
39
40
41@@ -313,6 +316,13 @@
42 mir_output_connection_state_unknown
43 } MirOutputConnectionState;
44
45+typedef enum MirBufferAccess
46+{
47+ mir_none,
48+ mir_read,
49+ mir_read_write,
50+} MirBufferAccess;
51+
52 typedef struct MirDisplayMode
53 {
54 uint32_t vertical_resolution;
55@@ -479,6 +489,22 @@
56 MirError const* error,
57 void* context);
58
59+/**
60+ * Callback called when a buffer is available for use.
61+ * \param [in] buffer The buffer that is availble
62+ * \param [in, out] context The context provided by client
63+ */
64+typedef void (*mir_buffer_callback)(
65+ MirBuffer* buffer, void* context);
66+
67+/**
68+ * Callback called when a presentation chain is available
69+ * \param [in] chain The chain that is availble
70+ * \param [in, out] context The context provided by client
71+ */
72+typedef void (*mir_presentation_chain_callback)(
73+ MirPresentationChain* chain, void* context);
74+
75 #ifdef __cplusplus
76 }
77 /**@}*/
78
79=== renamed file 'src/include/client/mir_toolkit/mir_buffer.h' => 'include/client/mir_toolkit/mir_buffer.h'
80--- src/include/client/mir_toolkit/mir_buffer.h 2016-07-05 12:40:56 +0000
81+++ include/client/mir_toolkit/mir_buffer.h 2016-07-07 18:42:58 +0000
82@@ -19,7 +19,7 @@
83 #define MIR_TOOLKIT_MIR_BUFFER_H_
84
85 #include <mir_toolkit/mir_native_buffer.h>
86-#include <mir_toolkit/client_types_nbs.h>
87+#include <mir_toolkit/client_types.h>
88
89 #ifdef __cplusplus
90 /**
91
92=== renamed file 'src/include/client/mir_toolkit/mir_presentation_chain.h' => 'include/client/mir_toolkit/mir_presentation_chain.h'
93--- src/include/client/mir_toolkit/mir_presentation_chain.h 2016-06-02 05:33:50 +0000
94+++ include/client/mir_toolkit/mir_presentation_chain.h 2016-07-07 18:42:58 +0000
95@@ -18,7 +18,7 @@
96 #ifndef MIR_TOOLKIT_MIR_PRESENTATION_CHAIN_H_
97 #define MIR_TOOLKIT_MIR_PRESENTATION_CHAIN_H_
98
99-#include <mir_toolkit/client_types_nbs.h>
100+#include <mir_toolkit/client_types.h>
101
102 #ifdef __cplusplus
103 /**
104
105=== modified file 'playground/CMakeLists.txt'
106--- playground/CMakeLists.txt 2016-06-07 18:17:41 +0000
107+++ playground/CMakeLists.txt 2016-07-07 18:42:58 +0000
108@@ -18,21 +18,3 @@
109 )
110
111 add_subdirectory(demo-shell/)
112-
113-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
114-mir_add_wrapped_executable(mir_demo_client_prerendered_frames
115- mir_demo_client_prerendered_frames.c
116-)
117-
118-target_link_libraries(mir_demo_client_prerendered_frames
119- mirclient
120- m
121-)
122-
123-mir_add_wrapped_executable(mir_demo_client_chain_jumping_buffers
124- mir_demo_client_chain_jumping_buffers.c
125-)
126-
127-target_link_libraries(mir_demo_client_chain_jumping_buffers
128- mirclient
129-)
130
131=== modified file 'src/client/mir_connection.h'
132--- src/client/mir_connection.h 2016-06-28 12:18:18 +0000
133+++ src/client/mir_connection.h 2016-07-07 18:42:58 +0000
134@@ -29,7 +29,7 @@
135 #include "mir/frontend/surface_id.h"
136 #include "mir/client_context.h"
137 #include "mir_toolkit/mir_client_library.h"
138-#include "mir_toolkit/client_types_nbs.h"
139+#include "mir_toolkit/client_types.h"
140 #include "mir_surface.h"
141 #include "display_configuration.h"
142
143
144=== modified file 'src/client/symbols.map'
145--- src/client/symbols.map 2016-07-07 09:54:02 +0000
146+++ src/client/symbols.map 2016-07-07 18:42:58 +0000
147@@ -359,7 +359,36 @@
148 };
149 } MIR_CLIENT_DETAIL_9v19;
150
151-MIR_CLIENT_DETAIL_private_buffer_semantics {
152+MIR_CLIENT_DETAIL_0.24 {
153+ global:
154+ extern "C++" {
155+ mir::input::receiver::XKBMapper::XKBMapper*;
156+ mir::input::receiver::XKBMapper::?XKBMapper*;
157+ mir::input::receiver::XKBMapper::set_key_state*;
158+ mir::input::receiver::XKBMapper::set_keymap*;
159+ mir::input::receiver::XKBMapper::reset_keymap*;
160+ mir::input::receiver::XKBMapper::map_event*;
161+ };
162+} MIR_CLIENT_DETAIL_0.21;
163+
164+MIR_CLIENT_0.24 { # New functions in Mir 0.24
165+ global:
166+ mir_event_get_input_device_state_event;
167+ mir_input_device_state_event_device_count;
168+ mir_input_device_state_event_device_id;
169+ mir_input_device_state_event_device_pointer_buttons;
170+ mir_input_device_state_event_device_pointer_buttons;
171+ mir_input_device_state_event_device_pressed_keys_count;
172+ mir_input_device_state_event_device_pressed_keys;
173+ mir_input_device_state_event_modifiers;
174+ mir_input_device_state_event_pointer_axis;
175+ mir_input_device_state_event_pointer_buttons;
176+ mir_input_device_state_event_time;
177+ mir_input_device_state_event_device_pointer_buttons;
178+ mir_surface_spec_set_pointer_confinement;
179+} MIR_CLIENT_0.22;
180+
181+MIR_CLIENT_0.25 { # New functions in Mir 0.25
182 global:
183 mir_buffer_get_fence;
184 mir_buffer_associate_fence;
185@@ -383,35 +412,4 @@
186 mir_buffer_get_buffer_usage;
187 mir_buffer_is_valid;
188 mir_buffer_get_error_message;
189- local:
190- *;
191-} MIR_CLIENT_DETAIL_9v19;
192-
193-MIR_CLIENT_DETAIL_0.24 {
194- global:
195- extern "C++" {
196- mir::input::receiver::XKBMapper::XKBMapper*;
197- mir::input::receiver::XKBMapper::?XKBMapper*;
198- mir::input::receiver::XKBMapper::set_key_state*;
199- mir::input::receiver::XKBMapper::set_keymap*;
200- mir::input::receiver::XKBMapper::reset_keymap*;
201- mir::input::receiver::XKBMapper::map_event*;
202- };
203-} MIR_CLIENT_DETAIL_0.21;
204-
205-MIR_CLIENT_0.24 { # New functions in Mir 0.24
206- global:
207- mir_event_get_input_device_state_event;
208- mir_input_device_state_event_device_count;
209- mir_input_device_state_event_device_id;
210- mir_input_device_state_event_device_pointer_buttons;
211- mir_input_device_state_event_device_pointer_buttons;
212- mir_input_device_state_event_device_pressed_keys_count;
213- mir_input_device_state_event_device_pressed_keys;
214- mir_input_device_state_event_modifiers;
215- mir_input_device_state_event_pointer_axis;
216- mir_input_device_state_event_pointer_buttons;
217- mir_input_device_state_event_time;
218- mir_input_device_state_event_device_pointer_buttons;
219- mir_surface_spec_set_pointer_confinement;
220-} MIR_CLIENT_0.22;
221+} MIR_CLIENT_0.24;
222
223=== modified file 'src/include/client/mir/client_buffer.h'
224--- src/include/client/mir/client_buffer.h 2016-05-03 06:55:25 +0000
225+++ src/include/client/mir/client_buffer.h 2016-07-07 18:42:58 +0000
226@@ -20,7 +20,7 @@
227 #ifndef MIR_CLIENT_CLIENT_BUFFER_H_
228 #define MIR_CLIENT_CLIENT_BUFFER_H_
229
230-#include <mir_toolkit/client_types_nbs.h>
231+#include <mir_toolkit/client_types.h>
232 #include <mir_toolkit/mir_native_buffer.h>
233 #include "mir/graphics/native_buffer.h"
234 #include "mir_toolkit/common.h"
235
236=== removed file 'src/include/client/mir_toolkit/client_types_nbs.h'
237--- src/include/client/mir_toolkit/client_types_nbs.h 2016-06-02 05:33:50 +0000
238+++ src/include/client/mir_toolkit/client_types_nbs.h 1970-01-01 00:00:00 +0000
239@@ -1,50 +0,0 @@
240-/*
241- * Copyright © 2016 Canonical Ltd.
242- *
243- * This program is free software: you can redistribute it and/or modify it
244- * under the terms of the GNU Lesser General Public License version 3,
245- * as published by the Free Software Foundation.
246- *
247- * This program is distributed in the hope that it will be useful,
248- * but WITHOUT ANY WARRANTY; without even the implied warranty of
249- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
250- * GNU Lesser General Public License for more details.
251- *
252- * You should have received a copy of the GNU Lesser General Public License
253- * along with this program. If not, see <http://www.gnu.org/licenses/>.
254- *
255- */
256-
257-#ifndef MIR_TOOLKIT_CLIENT_TYPES_NBS_H_
258-#define MIR_TOOLKIT_CLIENT_TYPES_NBS_H_
259-
260-#include <mir_toolkit/client_types.h>
261-
262-#ifdef __cplusplus
263-/**
264- * \defgroup mir_toolkit MIR graphics tools API
265- * @{
266- */
267-extern "C" {
268-#endif
269-
270-/* NOTE: this file will be rolled into mir_toolkit/client_types.h when made public. */
271-typedef struct MirPresentationChain MirPresentationChain;
272-typedef struct MirBuffer MirBuffer;
273-typedef void* MirNativeFence;
274-
275-typedef void (*mir_buffer_callback)(MirBuffer*, void* context);
276-typedef void (*mir_presentation_chain_callback)(MirPresentationChain*, void* context);
277-typedef enum MirBufferAccess
278-{
279- mir_none,
280- mir_read,
281- mir_read_write,
282-} MirBufferAccess;
283-
284-#ifdef __cplusplus
285-}
286-/**@}*/
287-#endif
288-
289-#endif /* MIR_TOOLKIT_CLIENT_TYPES_NBS_H_ */
290
291=== modified file 'tests/acceptance-tests/CMakeLists.txt'
292--- tests/acceptance-tests/CMakeLists.txt 2016-06-27 15:03:55 +0000
293+++ tests/acceptance-tests/CMakeLists.txt 2016-07-07 18:42:58 +0000
294@@ -56,6 +56,7 @@
295 test_surface_raise.cpp
296 test_client_cookie.cpp
297 test_new_display_configuration.cpp
298+ test_presentation_chain.cpp
299 test_persistent_surface_store.cpp
300 )
301
302
303=== renamed file 'tests/acceptance-tests/throwback/test_presentation_chain.cpp' => 'tests/acceptance-tests/test_presentation_chain.cpp'
304=== modified file 'tests/acceptance-tests/throwback/CMakeLists.txt'
305--- tests/acceptance-tests/throwback/CMakeLists.txt 2016-05-03 06:55:25 +0000
306+++ tests/acceptance-tests/throwback/CMakeLists.txt 2016-07-07 18:42:58 +0000
307@@ -10,6 +10,4 @@
308 test_client_cursor_api.cpp # uses BasicWindowManager<>
309 test_client_library_errors.cpp # uses UsingClientPlatform
310 test_shell_control_of_surface_configuration.cpp # uses CanonicalWindowManager
311-
312- test_presentation_chain.cpp
313 )

Subscribers

People subscribed via source and target branches