Merge lp:~alan-griffiths/mir/reboot-0.26.3-release into lp:mir
- reboot-0.26.3-release
- Merge into development-branch
Proposed by
Alan Griffiths
Status: | Superseded |
---|---|
Proposed branch: | lp:~alan-griffiths/mir/reboot-0.26.3-release |
Merge into: | lp:mir |
Diff against target: |
1811 lines (+1205/-14) (has conflicts) 23 files modified
CMakeLists.txt (+5/-0) debian/changelog (+54/-0) debian/control (+69/-0) include/client/mir_toolkit/client_types.h (+10/-0) include/client/mir_toolkit/extensions/gbm_buffer.h (+82/-0) include/client/mir_toolkit/mir_buffer_stream.h (+8/-0) include/client/mir_toolkit/mir_cursor_configuration.h (+18/-1) include/client/mir_toolkit/mir_window.h (+29/-0) include/client/mir_toolkit/rs/mir_render_surface.h (+103/-0) include/core/mir_toolkit/deprecations.h (+39/-0) src/platforms/android/utils/CMakeLists.txt.OTHER (+46/-0) src/platforms/mesa/client/client_platform.cpp (+145/-0) src/platforms/mesa/server/kms/real_kms_display_configuration.cpp (+214/-0) src/server/compositor/multi_monitor_arbiter.cpp (+7/-0) src/server/input/default_device.cpp (+46/-0) src/server/input/default_device.h (+16/-0) src/server/input/default_input_device_hub.cpp (+18/-1) src/server/input/default_input_device_hub.h (+4/-0) tests/acceptance-tests/test_custom_window_management.cpp (+50/-0) tests/acceptance-tests/test_presentation_chain.cpp (+184/-12) tests/unit-tests/input/test_default_device.cpp (+26/-0) tests/unit-tests/input/test_default_input_device_hub.cpp (+24/-0) tests/unit-tests/platforms/nested/mir_display_configuration_builder.cpp (+8/-0) Text conflict in CMakeLists.txt Text conflict in debian/control Text conflict in include/client/mir_toolkit/client_types.h Text conflict in include/client/mir_toolkit/extensions/gbm_buffer.h Text conflict in include/client/mir_toolkit/mir_buffer_stream.h Text conflict in include/client/mir_toolkit/mir_cursor_configuration.h Text conflict in include/client/mir_toolkit/mir_window.h Text conflict in include/client/mir_toolkit/rs/mir_render_surface.h Text conflict in include/core/mir_toolkit/deprecations.h Conflict adding files to src/platforms/android. Created directory. Conflict because src/platforms/android is not versioned, but has versioned children. Versioned directory. Conflict adding files to src/platforms/android/utils. Created directory. Conflict because src/platforms/android/utils is not versioned, but has versioned children. Versioned directory. Contents conflict in src/platforms/android/utils/CMakeLists.txt Text conflict in src/platforms/mesa/client/client_platform.cpp Text conflict in src/platforms/mesa/server/kms/real_kms_display_configuration.cpp Text conflict in src/server/compositor/multi_monitor_arbiter.cpp Text conflict in src/server/input/default_device.cpp Text conflict in src/server/input/default_device.h Text conflict in src/server/input/default_input_device_hub.cpp Text conflict in src/server/input/default_input_device_hub.h Text conflict in tests/acceptance-tests/test_custom_window_management.cpp Text conflict in tests/acceptance-tests/test_presentation_chain.cpp Text conflict in tests/unit-tests/input/test_default_device.cpp Text conflict in tests/unit-tests/input/test_default_input_device_hub.cpp Text conflict in tests/unit-tests/platforms/nested/mir_display_configuration_builder.cpp |
To merge this branch: | bzr merge lp:~alan-griffiths/mir/reboot-0.26.3-release |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir development team | Pending | ||
Review via email: mp+324661@code.launchpad.net |
This proposal has been superseded by a proposal from 2017-05-26.
Commit message
Restore platforms that are unsupported in xenial, add support for building downstreams on, and re-sync deprecation macros with current development.
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2017-05-08 03:04:26 +0000 | |||
3 | +++ CMakeLists.txt 2017-05-26 09:20:21 +0000 | |||
4 | @@ -28,8 +28,13 @@ | |||
5 | 28 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | 28 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) |
6 | 29 | 29 | ||
7 | 30 | set(MIR_VERSION_MAJOR 0) | 30 | set(MIR_VERSION_MAJOR 0) |
8 | 31 | <<<<<<< TREE | ||
9 | 31 | set(MIR_VERSION_MINOR 27) | 32 | set(MIR_VERSION_MINOR 27) |
10 | 32 | set(MIR_VERSION_PATCH 0) | 33 | set(MIR_VERSION_PATCH 0) |
11 | 34 | ======= | ||
12 | 35 | set(MIR_VERSION_MINOR 26) | ||
13 | 36 | set(MIR_VERSION_PATCH 3) | ||
14 | 37 | >>>>>>> MERGE-SOURCE | ||
15 | 33 | 38 | ||
16 | 34 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) | 39 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) |
17 | 35 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) | 40 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) |
18 | 36 | 41 | ||
19 | === modified file 'debian/changelog' | |||
20 | --- debian/changelog 2017-05-08 03:04:26 +0000 | |||
21 | +++ debian/changelog 2017-05-26 09:20:21 +0000 | |||
22 | @@ -1,3 +1,57 @@ | |||
23 | 1 | mir (0.26.3-0ubuntu1) UNRELEASED; urgency=medium | ||
24 | 2 | |||
25 | 3 | * New upstream release 0.26.3 (https://launchpad.net/mir/+milestone/0.26.3) | ||
26 | 4 | - Enhancements: | ||
27 | 5 | . Make deprecations optional (and default to off for builds on 16.04 LTS) | ||
28 | 6 | . Added support for building on Ubuntu 17.10 artful. | ||
29 | 7 | - Bugs fixed: | ||
30 | 8 | . Mir needs to be updated to 0.26 in 16.04LTS (LP: #1685186) | ||
31 | 9 | . unity-system-compositor crashed with SIGSEGV in | ||
32 | 10 | libinput_device_config_accel_is_available() from | ||
33 | 11 | libinput_device_config_accel_set_speed() from | ||
34 | 12 | mir::input::evdev::LibInputDevice::apply_settings() (LP: #1672955) | ||
35 | 13 | . Please transition to Boost 1.62 (LP: #1675138) | ||
36 | 14 | . Mir sending key repeat events continually to nested shell after VT | ||
37 | 15 | switch (causes Unity8 lockup for a while) (LP: #1675357) | ||
38 | 16 | . mir_demo_standalone_render_overlays fails to link (LP: #1677239) | ||
39 | 17 | |||
40 | 18 | -- Daniel van Vugt <daniel.van.vugt@canonical.com> Thu, 30 Mar 2017 11:43:28 +0800 | ||
41 | 19 | |||
42 | 20 | mir (0.26.2+17.04.20170322.1-0ubuntu2) zesty; urgency=medium | ||
43 | 21 | |||
44 | 22 | [ Mattia Rizzolo ] | ||
45 | 23 | * Patch the code to use unversioned runtime boost libraries (LP: #1675138). | ||
46 | 24 | |||
47 | 25 | -- Gianfranco Costamagna <locutusofborg@debian.org> Fri, 24 Mar 2017 22:58:36 +0100 | ||
48 | 26 | |||
49 | 27 | mir (0.26.2+17.04.20170322.1-0ubuntu1) zesty; urgency=medium | ||
50 | 28 | |||
51 | 29 | [ Daniel van Vugt ] | ||
52 | 30 | * New upstream release 0.26.2 (https://launchpad.net/mir/+milestone/0.26.2) | ||
53 | 31 | - Bugs fixed: | ||
54 | 32 | . EDID does not change when hotplugging a monitor (LP: #1660017) | ||
55 | 33 | . [regression] mirout crashes when connecting to unity8 or any nested | ||
56 | 34 | server: [libprotobuf FATAL /usr/include/google/protobuf/repeated_field. | ||
57 | 35 | h:1408] CHECK failed: (index) < (current_size_) (LP: #1661163) | ||
58 | 36 | . Mir server crashed with SIGSEGV in | ||
59 | 37 | mir::compositor::TemporaryBuffer::size() called from | ||
60 | 38 | mir::gl::tessellate_renderable_into_rectangle() (LP: #1664760) | ||
61 | 39 | . Nested servers (Unity8) periodically stutter (half frame rate) with | ||
62 | 40 | Mir 0.26.1 (LP: #1666372) | ||
63 | 41 | . Don't dereference the end iterator in ms::ApplicationSession:: | ||
64 | 42 | surface_after() (LP: #1667645) | ||
65 | 43 | . [regression] OSK input shaping no longer works correctly (LP: #1669444) | ||
66 | 44 | . Setting MirWindowSpec parameters always causes window's input_region | ||
67 | 45 | to be reset (LP: #1670876) | ||
68 | 46 | . Subpixel order not included in Mir display information (LP: #1393578) | ||
69 | 47 | . Presentation chains should support various swap interval modes | ||
70 | 48 | (LP: #1673533) | ||
71 | 49 | . Need an extension for GBM buffers to replace | ||
72 | 50 | mir_buffer_get_buffer_package() (LP: #1673534) | ||
73 | 51 | . Seg fault on detect_fd_leaks (LP: #1661498) | ||
74 | 52 | |||
75 | 53 | -- Cemil Azizoglu <cemil.azizoglu@canonical.com> Wed, 22 Mar 2017 04:54:19 +0000 | ||
76 | 54 | |||
77 | 1 | mir (0.26.1+17.04.20170209.1-0ubuntu1) zesty; urgency=medium | 55 | mir (0.26.1+17.04.20170209.1-0ubuntu1) zesty; urgency=medium |
78 | 2 | 56 | ||
79 | 3 | * New upstream release 0.26.1 (https://launchpad.net/mir/+milestone/0.26.1) | 57 | * New upstream release 0.26.1 (https://launchpad.net/mir/+milestone/0.26.1) |
80 | 4 | 58 | ||
81 | === modified file 'debian/control' | |||
82 | --- debian/control 2017-05-08 03:04:26 +0000 | |||
83 | +++ debian/control 2017-05-26 09:20:21 +0000 | |||
84 | @@ -292,6 +292,21 @@ | |||
85 | 292 | . | 292 | . |
86 | 293 | Contains a tool for stress testing the Mir display server | 293 | Contains a tool for stress testing the Mir display server |
87 | 294 | 294 | ||
88 | 295 | <<<<<<< TREE | ||
89 | 296 | ======= | ||
90 | 297 | Package: mir-android-diagnostics | ||
91 | 298 | Architecture: i386 amd64 armhf | ||
92 | 299 | Pre-Depends: ${misc:Pre-Depends} | ||
93 | 300 | Depends: ${misc:Depends}, | ||
94 | 301 | ${shlibs:Depends}, | ||
95 | 302 | Recommends: mir-demos, | ||
96 | 303 | Description: Display Server for Ubuntu - android platform diagnostics utility | ||
97 | 304 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
98 | 305 | robust operation and a well-defined driver model. | ||
99 | 306 | . | ||
100 | 307 | Contains a tool for checking the graphics components of android devices. | ||
101 | 308 | |||
102 | 309 | >>>>>>> MERGE-SOURCE | ||
103 | 295 | Package: libmircore1 | 310 | Package: libmircore1 |
104 | 296 | Section: libs | 311 | Section: libs |
105 | 297 | Architecture: linux-any | 312 | Architecture: linux-any |
106 | @@ -347,7 +362,25 @@ | |||
107 | 347 | Contains the shared libraries required for the Mir server to interact with | 362 | Contains the shared libraries required for the Mir server to interact with |
108 | 348 | the hardware platform using the Mesa drivers. | 363 | the hardware platform using the Mesa drivers. |
109 | 349 | 364 | ||
110 | 365 | <<<<<<< TREE | ||
111 | 350 | Package: mir-platform-input-evdev7 | 366 | Package: mir-platform-input-evdev7 |
112 | 367 | ======= | ||
113 | 368 | Package: mir-platform-graphics-android12 | ||
114 | 369 | Section: libs | ||
115 | 370 | Architecture: i386 amd64 armhf | ||
116 | 371 | Multi-Arch: same | ||
117 | 372 | Pre-Depends: ${misc:Pre-Depends} | ||
118 | 373 | Depends: ${misc:Depends}, | ||
119 | 374 | ${shlibs:Depends}, | ||
120 | 375 | Description: Display server for Ubuntu - platform library for Android | ||
121 | 376 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
122 | 377 | robust operation and a well-defined driver model. | ||
123 | 378 | . | ||
124 | 379 | Contains the shared libraries required for the Mir server to interact with | ||
125 | 380 | the hardware platform using the Android drivers. | ||
126 | 381 | |||
127 | 382 | Package: mir-platform-input-evdev6 | ||
128 | 383 | >>>>>>> MERGE-SOURCE | ||
129 | 351 | Section: libs | 384 | Section: libs |
130 | 352 | Architecture: linux-any | 385 | Architecture: linux-any |
131 | 353 | Multi-Arch: same | 386 | Multi-Arch: same |
132 | @@ -389,6 +422,23 @@ | |||
133 | 389 | Contains header files required to use the platform specific capabilities of | 422 | Contains header files required to use the platform specific capabilities of |
134 | 390 | the Mir Mesa backend. | 423 | the Mir Mesa backend. |
135 | 391 | 424 | ||
136 | 425 | <<<<<<< TREE | ||
137 | 426 | ======= | ||
138 | 427 | Package: mir-client-platform-android5 | ||
139 | 428 | Section: libs | ||
140 | 429 | Architecture: i386 amd64 armhf | ||
141 | 430 | Multi-Arch: same | ||
142 | 431 | Pre-Depends: ${misc:Pre-Depends} | ||
143 | 432 | Depends: ${misc:Depends}, | ||
144 | 433 | ${shlibs:Depends} | ||
145 | 434 | Description: Display server for Ubuntu - client platform library for Android | ||
146 | 435 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
147 | 436 | robust operation and a well-defined driver model. | ||
148 | 437 | . | ||
149 | 438 | Contains the shared libraries required for the Mir clients to interact with | ||
150 | 439 | the underlying hardware platform using the Android drivers. | ||
151 | 440 | |||
152 | 441 | >>>>>>> MERGE-SOURCE | ||
153 | 392 | Package: mir-graphics-drivers-desktop | 442 | Package: mir-graphics-drivers-desktop |
154 | 393 | Section: libs | 443 | Section: libs |
155 | 394 | Architecture: linux-any | 444 | Architecture: linux-any |
156 | @@ -406,6 +456,25 @@ | |||
157 | 406 | This package depends on a full set of graphics drivers for traditional desktop | 456 | This package depends on a full set of graphics drivers for traditional desktop |
158 | 407 | systems. | 457 | systems. |
159 | 408 | 458 | ||
160 | 459 | <<<<<<< TREE | ||
161 | 460 | ======= | ||
162 | 461 | Package: mir-graphics-drivers-android | ||
163 | 462 | Section: libs | ||
164 | 463 | Architecture: i386 amd64 armhf | ||
165 | 464 | Multi-Arch: same | ||
166 | 465 | Pre-Depends: ${misc:Pre-Depends} | ||
167 | 466 | Depends: ${misc:Depends}, | ||
168 | 467 | mir-platform-graphics-android12, | ||
169 | 468 | mir-client-platform-android5, | ||
170 | 469 | mir-platform-input-evdev6, | ||
171 | 470 | Description: Display server for Ubuntu - android driver metapackage | ||
172 | 471 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
173 | 472 | robust operation and a well-defined driver model. | ||
174 | 473 | . | ||
175 | 474 | This package depends on a full set of graphics drivers for running Mir on top | ||
176 | 475 | of an existing Android driver stack. | ||
177 | 476 | |||
178 | 477 | >>>>>>> MERGE-SOURCE | ||
179 | 409 | Package: libmircookie2 | 478 | Package: libmircookie2 |
180 | 410 | Section: libs | 479 | Section: libs |
181 | 411 | Architecture: any | 480 | Architecture: any |
182 | 412 | 481 | ||
183 | === modified file 'include/client/mir/event_printer.h' | |||
184 | === modified file 'include/client/mir/events/event_builders.h' | |||
185 | === modified file 'include/client/mir_toolkit/client_types.h' | |||
186 | --- include/client/mir_toolkit/client_types.h 2017-05-23 00:22:04 +0000 | |||
187 | +++ include/client/mir_toolkit/client_types.h 2017-05-26 09:20:21 +0000 | |||
188 | @@ -54,6 +54,7 @@ | |||
189 | 54 | typedef struct MirError MirError; | 54 | typedef struct MirError MirError; |
190 | 55 | typedef struct MirPresentationChain MirPresentationChain; | 55 | typedef struct MirPresentationChain MirPresentationChain; |
191 | 56 | typedef struct MirBuffer MirBuffer; | 56 | typedef struct MirBuffer MirBuffer; |
192 | 57 | <<<<<<< TREE | ||
193 | 57 | typedef struct MirRenderSurface MirRenderSurface; | 58 | typedef struct MirRenderSurface MirRenderSurface; |
194 | 58 | 59 | ||
195 | 59 | /** | 60 | /** |
196 | @@ -62,6 +63,9 @@ | |||
197 | 62 | */ | 63 | */ |
198 | 63 | typedef struct MirCursorConfiguration MirCursorConfiguration | 64 | typedef struct MirCursorConfiguration MirCursorConfiguration |
199 | 64 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead"); | 65 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead"); |
200 | 66 | ======= | ||
201 | 67 | typedef struct MirRenderSurface MirRenderSurface; | ||
202 | 68 | >>>>>>> MERGE-SOURCE | ||
203 | 65 | 69 | ||
204 | 66 | /** | 70 | /** |
205 | 67 | * Descriptor for an output connection. | 71 | * Descriptor for an output connection. |
206 | @@ -576,10 +580,16 @@ | |||
207 | 576 | 580 | ||
208 | 577 | typedef void (*mir_surface_id_callback)( | 581 | typedef void (*mir_surface_id_callback)( |
209 | 578 | MirSurface* surface, MirPersistentId* id, void* context) | 582 | MirSurface* surface, MirPersistentId* id, void* context) |
210 | 583 | <<<<<<< TREE | ||
211 | 579 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead"); | 584 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead"); |
212 | 580 | 585 | ||
213 | 581 | typedef MirSurfaceParameters MirWindowParameters | 586 | typedef MirSurfaceParameters MirWindowParameters |
214 | 582 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_get_xxx apis or listen for attribute events instead"); | 587 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_get_xxx apis or listen for attribute events instead"); |
215 | 588 | ======= | ||
216 | 589 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead"); | ||
217 | 590 | |||
218 | 591 | typedef MirSurfaceParameters MirWindowParameters; | ||
219 | 592 | >>>>>>> MERGE-SOURCE | ||
220 | 583 | 593 | ||
221 | 584 | #pragma GCC diagnostic pop | 594 | #pragma GCC diagnostic pop |
222 | 585 | 595 | ||
223 | 586 | 596 | ||
224 | === modified file 'include/client/mir_toolkit/events/event.h' | |||
225 | === modified file 'include/client/mir_toolkit/extensions/gbm_buffer.h' | |||
226 | --- include/client/mir_toolkit/extensions/gbm_buffer.h 2017-05-08 03:04:26 +0000 | |||
227 | +++ include/client/mir_toolkit/extensions/gbm_buffer.h 2017-05-26 09:20:21 +0000 | |||
228 | @@ -76,6 +76,7 @@ | |||
229 | 76 | connection, "mir_extension_gbm_buffer", 1); | 76 | connection, "mir_extension_gbm_buffer", 1); |
230 | 77 | } | 77 | } |
231 | 78 | 78 | ||
232 | 79 | <<<<<<< TREE | ||
233 | 79 | /** Allocate a MirBuffer via gbm and wait for the allocation. | 80 | /** Allocate a MirBuffer via gbm and wait for the allocation. |
234 | 80 | * available in V2. | 81 | * available in V2. |
235 | 81 | * The buffer can be destroyed via mir_buffer_release(). | 82 | * The buffer can be destroyed via mir_buffer_release(). |
236 | @@ -155,6 +156,87 @@ | |||
237 | 155 | connection, "mir_extension_gbm_buffer", 2); | 156 | connection, "mir_extension_gbm_buffer", 2); |
238 | 156 | } | 157 | } |
239 | 157 | 158 | ||
240 | 159 | ======= | ||
241 | 160 | /** Allocate a MirBuffer via gbm and wait for the allocation. | ||
242 | 161 | * available in V2. | ||
243 | 162 | * The buffer can be destroyed via mir_buffer_release(). | ||
244 | 163 | * | ||
245 | 164 | * \param [in] connection The connection | ||
246 | 165 | * \param [in] width Requested buffer width | ||
247 | 166 | * \param [in] height Requested buffer height | ||
248 | 167 | * \param [in] gbm_pixel_format The pixel format, one of the GBM_FORMATs | ||
249 | 168 | * \param [in] gbm_bo_flags The gbm_bo_flags for the buffer. | ||
250 | 169 | * \return The buffer | ||
251 | 170 | **/ | ||
252 | 171 | typedef MirBuffer* (*MirConnectionAllocateBufferGbmSync)( | ||
253 | 172 | MirConnection* connection, | ||
254 | 173 | uint32_t width, uint32_t height, | ||
255 | 174 | uint32_t gbm_pixel_format, | ||
256 | 175 | uint32_t gbm_bo_flags); | ||
257 | 176 | |||
258 | 177 | /** Check if a MirBuffer is suitable for import via GBM_BO_IMPORT_FD | ||
259 | 178 | * | ||
260 | 179 | * \param [in] buffer The buffer | ||
261 | 180 | * \return True if suitable, false if unsuitable | ||
262 | 181 | */ | ||
263 | 182 | typedef bool (*MirBufferIsGbmImportable)(MirBuffer* buffer); | ||
264 | 183 | |||
265 | 184 | /** Access the fd a MirBuffer suitable for gbm import | ||
266 | 185 | * \pre The buffer is suitable for GBM_BO_IMPORT_FD | ||
267 | 186 | * \warning The fd is owned by the buffer. Do not close() it. | ||
268 | 187 | * \param [in] buffer The buffer | ||
269 | 188 | * \return The fd | ||
270 | 189 | */ | ||
271 | 190 | typedef int (*MirBufferGbmFd)(MirBuffer* buffer); | ||
272 | 191 | |||
273 | 192 | /** Get the stride of a MirBuffer | ||
274 | 193 | * \pre The buffer is suitable for GBM_BO_IMPORT_FD | ||
275 | 194 | * \param [in] buffer The buffer | ||
276 | 195 | * \return The stride of the buffer | ||
277 | 196 | */ | ||
278 | 197 | typedef uint32_t (*MirBufferGbmStride)(MirBuffer* buffer); | ||
279 | 198 | |||
280 | 199 | /** Get the GBM_FORMAT of a MirBuffer | ||
281 | 200 | * \pre The buffer is suitable for GBM_BO_IMPORT_FD | ||
282 | 201 | * \param [in] buffer The buffer | ||
283 | 202 | * \return The GBM_FORMAT of the buffer | ||
284 | 203 | */ | ||
285 | 204 | typedef uint32_t (*MirBufferGbmFormat)(MirBuffer* buffer); | ||
286 | 205 | |||
287 | 206 | /** Get the gbm_bo_flags of a MirBuffer | ||
288 | 207 | * \pre The buffer is suitable for GBM_BO_IMPORT_FD | ||
289 | 208 | * \param [in] buffer The buffer | ||
290 | 209 | * \return The gbm_bo_flags of the buffer | ||
291 | 210 | */ | ||
292 | 211 | typedef uint32_t (*MirBufferGbmFlags)(MirBuffer* buffer); | ||
293 | 212 | |||
294 | 213 | /** Get the age of a MirBuffer | ||
295 | 214 | * \pre The buffer is suitable for GBM_BO_IMPORT_FD | ||
296 | 215 | * \param [in] buffer The buffer | ||
297 | 216 | * \return The age of the buffer | ||
298 | 217 | */ | ||
299 | 218 | typedef unsigned int (*MirBufferGbmAge)(MirBuffer* buffer); | ||
300 | 219 | |||
301 | 220 | typedef struct MirExtensionGbmBufferV2 | ||
302 | 221 | { | ||
303 | 222 | MirConnectionAllocateBufferGbm allocate_buffer_gbm; | ||
304 | 223 | MirConnectionAllocateBufferGbmSync allocate_buffer_gbm_sync; | ||
305 | 224 | MirBufferIsGbmImportable is_gbm_importable; | ||
306 | 225 | MirBufferGbmFd fd; | ||
307 | 226 | MirBufferGbmStride stride; | ||
308 | 227 | MirBufferGbmFormat format; | ||
309 | 228 | MirBufferGbmFlags flags; | ||
310 | 229 | MirBufferGbmAge age; | ||
311 | 230 | } MirExtensionGbmBufferV2; | ||
312 | 231 | |||
313 | 232 | static inline MirExtensionGbmBufferV2 const* mir_extension_gbm_buffer_v2( | ||
314 | 233 | MirConnection* connection) | ||
315 | 234 | { | ||
316 | 235 | return (MirExtensionGbmBufferV2 const*) mir_connection_request_extension( | ||
317 | 236 | connection, "mir_extension_gbm_buffer", 2); | ||
318 | 237 | } | ||
319 | 238 | |||
320 | 239 | >>>>>>> MERGE-SOURCE | ||
321 | 158 | #ifdef __cplusplus | 240 | #ifdef __cplusplus |
322 | 159 | } | 241 | } |
323 | 160 | #endif | 242 | #endif |
324 | 161 | 243 | ||
325 | === modified file 'include/client/mir_toolkit/mir_buffer_stream.h' | |||
326 | --- include/client/mir_toolkit/mir_buffer_stream.h 2017-05-23 00:22:04 +0000 | |||
327 | +++ include/client/mir_toolkit/mir_buffer_stream.h 2017-05-26 09:20:21 +0000 | |||
328 | @@ -155,9 +155,17 @@ | |||
329 | 155 | * \return One of mir_platform_type_android or | 155 | * \return One of mir_platform_type_android or |
330 | 156 | * mir_platform_type_gbm | 156 | * mir_platform_type_gbm |
331 | 157 | */ | 157 | */ |
332 | 158 | <<<<<<< TREE | ||
333 | 158 | MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream) | 159 | MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream) |
334 | 159 | MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n" | 160 | MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n" |
335 | 160 | "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()"); | 161 | "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()"); |
336 | 162 | ======= | ||
337 | 163 | /// @cond | ||
338 | 164 | MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n" | ||
339 | 165 | "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()") | ||
340 | 166 | /// @endcond | ||
341 | 167 | MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream); | ||
342 | 168 | >>>>>>> MERGE-SOURCE | ||
343 | 161 | 169 | ||
344 | 162 | /** | 170 | /** |
345 | 163 | * Retrieve the current buffer in "raw" representation. | 171 | * Retrieve the current buffer in "raw" representation. |
346 | 164 | 172 | ||
347 | === modified file 'include/client/mir_toolkit/mir_connection.h' | |||
348 | === modified file 'include/client/mir_toolkit/mir_cursor_configuration.h' | |||
349 | --- include/client/mir_toolkit/mir_cursor_configuration.h 2017-05-23 00:22:04 +0000 | |||
350 | +++ include/client/mir_toolkit/mir_cursor_configuration.h 2017-05-26 09:20:21 +0000 | |||
351 | @@ -20,7 +20,17 @@ | |||
352 | 20 | 20 | ||
353 | 21 | #include <mir_toolkit/common.h> | 21 | #include <mir_toolkit/common.h> |
354 | 22 | #include <mir_toolkit/client_types.h> | 22 | #include <mir_toolkit/client_types.h> |
356 | 23 | #include <mir_toolkit/deprecations.h> | 23 | <<<<<<< TREE |
357 | 24 | #include <mir_toolkit/deprecations.h> | ||
358 | 25 | ======= | ||
359 | 26 | #include <mir_toolkit/deprecations.h> | ||
360 | 27 | |||
361 | 28 | /** | ||
362 | 29 | * Opaque structure containing cursor parameterization. Create with mir_cursor* family. | ||
363 | 30 | * Used with mir_window_configure_cursor. | ||
364 | 31 | */ | ||
365 | 32 | typedef struct MirCursorConfiguration MirCursorConfiguration; | ||
366 | 33 | >>>>>>> MERGE-SOURCE | ||
367 | 24 | 34 | ||
368 | 25 | #ifdef __cplusplus | 35 | #ifdef __cplusplus |
369 | 26 | /** | 36 | /** |
370 | @@ -51,8 +61,15 @@ | |||
371 | 51 | * \return A cursor parameters object which must be passed | 61 | * \return A cursor parameters object which must be passed |
372 | 52 | * to_mir_cursor_configuration_destroy | 62 | * to_mir_cursor_configuration_destroy |
373 | 53 | */ | 63 | */ |
374 | 64 | <<<<<<< TREE | ||
375 | 54 | MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name) | 65 | MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name) |
376 | 55 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name() instead"); | 66 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name() instead"); |
377 | 67 | ======= | ||
378 | 68 | /// @cond | ||
379 | 69 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_cursor_name()") | ||
380 | 70 | /// @endcond | ||
381 | 71 | MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name); | ||
382 | 72 | >>>>>>> MERGE-SOURCE | ||
383 | 56 | 73 | ||
384 | 57 | /** | 74 | /** |
385 | 58 | * Returns a new cursor configuration tied to a given buffer stream. | 75 | * Returns a new cursor configuration tied to a given buffer stream. |
386 | 59 | 76 | ||
387 | === modified file 'include/client/mir_toolkit/mir_display_configuration.h' | |||
388 | === modified file 'include/client/mir_toolkit/mir_window.h' | |||
389 | --- include/client/mir_toolkit/mir_window.h 2017-05-23 00:22:04 +0000 | |||
390 | +++ include/client/mir_toolkit/mir_window.h 2017-05-26 09:20:21 +0000 | |||
391 | @@ -585,8 +585,37 @@ | |||
392 | 585 | */ | 585 | */ |
393 | 586 | void mir_window_spec_set_streams(MirWindowSpec* spec, | 586 | void mir_window_spec_set_streams(MirWindowSpec* spec, |
394 | 587 | MirBufferStreamInfo* streams, | 587 | MirBufferStreamInfo* streams, |
395 | 588 | <<<<<<< TREE | ||
396 | 588 | unsigned int num_streams) | 589 | unsigned int num_streams) |
397 | 589 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_add_render_surface instead"); | 590 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_add_render_surface instead"); |
398 | 591 | ======= | ||
399 | 592 | unsigned int num_streams); | ||
400 | 593 | |||
401 | 594 | /** | ||
402 | 595 | * Set the MirWindowSpec to display content contained in a render surface | ||
403 | 596 | * | ||
404 | 597 | * \warning: The initial call to mir_window_spec_add_render_surface will set | ||
405 | 598 | * the bottom-most content, and subsequent calls will stack the | ||
406 | 599 | * content on top. | ||
407 | 600 | * | ||
408 | 601 | * \param spec The window_spec to be updated | ||
409 | 602 | * \param render_surface The render surface containing the content to be displayed | ||
410 | 603 | * \param logical_width The width that the content will be displayed at | ||
411 | 604 | * (Ignored for buffer streams) | ||
412 | 605 | * \param logical_height The height that the content will be displayed at | ||
413 | 606 | * (Ignored for buffer streams) | ||
414 | 607 | * \param displacement_x The x displacement from the top-left corner of the MirWindow | ||
415 | 608 | * \param displacement_y The y displacement from the top-left corner of the MirWindow | ||
416 | 609 | */ | ||
417 | 610 | #pragma GCC diagnostic push | ||
418 | 611 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
419 | 612 | void mir_window_spec_add_render_surface(MirWindowSpec* spec, | ||
420 | 613 | MirRenderSurface* render_surface, | ||
421 | 614 | int logical_width, int logical_height, | ||
422 | 615 | int displacement_x, int displacement_y) | ||
423 | 616 | MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition"); | ||
424 | 617 | #pragma GCC diagnostic pop | ||
425 | 618 | >>>>>>> MERGE-SOURCE | ||
426 | 590 | 619 | ||
427 | 591 | /** | 620 | /** |
428 | 592 | * Release the resources held by a MirWindowSpec. | 621 | * Release the resources held by a MirWindowSpec. |
429 | 593 | 622 | ||
430 | === modified file 'include/client/mir_toolkit/rs/mir_render_surface.h' | |||
431 | --- include/client/mir_toolkit/rs/mir_render_surface.h 2017-05-23 00:22:04 +0000 | |||
432 | +++ include/client/mir_toolkit/rs/mir_render_surface.h 2017-05-26 09:20:21 +0000 | |||
433 | @@ -21,6 +21,7 @@ | |||
434 | 21 | #define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_ | 21 | #define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_ |
435 | 22 | 22 | ||
436 | 23 | #include <mir_toolkit/client_types.h> | 23 | #include <mir_toolkit/client_types.h> |
437 | 24 | <<<<<<< TREE | ||
438 | 24 | #include <mir_toolkit/deprecations.h> | 25 | #include <mir_toolkit/deprecations.h> |
439 | 25 | 26 | ||
440 | 26 | #ifndef MIR_DEPRECATE_RENDERSURFACES | 27 | #ifndef MIR_DEPRECATE_RENDERSURFACES |
441 | @@ -33,6 +34,20 @@ | |||
442 | 33 | #else | 34 | #else |
443 | 34 | #define MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1 | 35 | #define MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1 |
444 | 35 | #endif | 36 | #endif |
445 | 37 | ======= | ||
446 | 38 | #include <mir_toolkit/deprecations.h> | ||
447 | 39 | |||
448 | 40 | #ifndef MIR_DEPRECATE_RENDERSURFACES | ||
449 | 41 | #define MIR_DEPRECATE_RENDERSURFACES 0 | ||
450 | 42 | #endif | ||
451 | 43 | |||
452 | 44 | #if MIR_ENABLE_DEPRECATIONS > 0 && MIR_DEPRECATE_RENDERSURFACES > 0 | ||
453 | 45 | #define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME\ | ||
454 | 46 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))) | ||
455 | 47 | #else | ||
456 | 48 | #define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME | ||
457 | 49 | #endif | ||
458 | 50 | >>>>>>> MERGE-SOURCE | ||
459 | 36 | 51 | ||
460 | 37 | #ifdef __cplusplus | 52 | #ifdef __cplusplus |
461 | 38 | /** | 53 | /** |
462 | @@ -42,9 +57,15 @@ | |||
463 | 42 | extern "C" { | 57 | extern "C" { |
464 | 43 | #endif | 58 | #endif |
465 | 44 | 59 | ||
466 | 60 | <<<<<<< TREE | ||
467 | 45 | typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context) | 61 | typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context) |
468 | 46 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 62 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
469 | 47 | 63 | ||
470 | 64 | ======= | ||
471 | 65 | typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context) | ||
472 | 66 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
473 | 67 | |||
474 | 68 | >>>>>>> MERGE-SOURCE | ||
475 | 48 | #pragma GCC diagnostic push | 69 | #pragma GCC diagnostic push |
476 | 49 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 70 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
477 | 50 | /** | 71 | /** |
478 | @@ -64,7 +85,11 @@ | |||
479 | 64 | int width, int height, | 85 | int width, int height, |
480 | 65 | MirRenderSurfaceCallback callback, | 86 | MirRenderSurfaceCallback callback, |
481 | 66 | void* context) | 87 | void* context) |
482 | 88 | <<<<<<< TREE | ||
483 | 67 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 89 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
484 | 90 | ======= | ||
485 | 91 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
486 | 92 | >>>>>>> MERGE-SOURCE | ||
487 | 68 | 93 | ||
488 | 69 | /** | 94 | /** |
489 | 70 | * Create a render surface and wait for the result | 95 | * Create a render surface and wait for the result |
490 | @@ -79,7 +104,11 @@ | |||
491 | 79 | MirRenderSurface* mir_connection_create_render_surface_sync( | 104 | MirRenderSurface* mir_connection_create_render_surface_sync( |
492 | 80 | MirConnection* connection, | 105 | MirConnection* connection, |
493 | 81 | int width, int height) | 106 | int width, int height) |
494 | 107 | <<<<<<< TREE | ||
495 | 82 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 108 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
496 | 109 | ======= | ||
497 | 110 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
498 | 111 | >>>>>>> MERGE-SOURCE | ||
499 | 83 | 112 | ||
500 | 84 | /** | 113 | /** |
501 | 85 | * Get the size of the MirRenderSurface | 114 | * Get the size of the MirRenderSurface |
502 | @@ -91,7 +120,11 @@ | |||
503 | 91 | void mir_render_surface_get_size( | 120 | void mir_render_surface_get_size( |
504 | 92 | MirRenderSurface* render_surface, | 121 | MirRenderSurface* render_surface, |
505 | 93 | int* width, int* height) | 122 | int* width, int* height) |
506 | 123 | <<<<<<< TREE | ||
507 | 94 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 124 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
508 | 125 | ======= | ||
509 | 126 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
510 | 127 | >>>>>>> MERGE-SOURCE | ||
511 | 95 | 128 | ||
512 | 96 | /** | 129 | /** |
513 | 97 | * Set the size of the MirRenderSurface | 130 | * Set the size of the MirRenderSurface |
514 | @@ -103,7 +136,11 @@ | |||
515 | 103 | void mir_render_surface_set_size( | 136 | void mir_render_surface_set_size( |
516 | 104 | MirRenderSurface* render_surface, | 137 | MirRenderSurface* render_surface, |
517 | 105 | int width, int height) | 138 | int width, int height) |
518 | 139 | <<<<<<< TREE | ||
519 | 106 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 140 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
520 | 141 | ======= | ||
521 | 142 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
522 | 143 | >>>>>>> MERGE-SOURCE | ||
523 | 107 | 144 | ||
524 | 108 | /** | 145 | /** |
525 | 109 | * Test for a valid render surface | 146 | * Test for a valid render surface |
526 | @@ -115,8 +152,12 @@ | |||
527 | 115 | */ | 152 | */ |
528 | 116 | bool mir_render_surface_is_valid( | 153 | bool mir_render_surface_is_valid( |
529 | 117 | MirRenderSurface* render_surface) | 154 | MirRenderSurface* render_surface) |
530 | 155 | <<<<<<< TREE | ||
531 | 118 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 156 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
532 | 119 | 157 | ||
533 | 158 | ======= | ||
534 | 159 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
535 | 160 | >>>>>>> MERGE-SOURCE | ||
536 | 120 | /** | 161 | /** |
537 | 121 | * Retrieve a text description of the error. The returned string is owned by | 162 | * Retrieve a text description of the error. The returned string is owned by |
538 | 122 | * the library and remains valid until the render surface or the associated | 163 | * the library and remains valid until the render surface or the associated |
539 | @@ -128,7 +169,11 @@ | |||
540 | 128 | */ | 169 | */ |
541 | 129 | char const *mir_render_surface_get_error_message( | 170 | char const *mir_render_surface_get_error_message( |
542 | 130 | MirRenderSurface* render_surface) | 171 | MirRenderSurface* render_surface) |
543 | 172 | <<<<<<< TREE | ||
544 | 131 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 173 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
545 | 174 | ======= | ||
546 | 175 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
547 | 176 | >>>>>>> MERGE-SOURCE | ||
548 | 132 | 177 | ||
549 | 133 | /** | 178 | /** |
550 | 134 | * Release the specified render surface | 179 | * Release the specified render surface |
551 | @@ -137,7 +182,11 @@ | |||
552 | 137 | */ | 182 | */ |
553 | 138 | void mir_render_surface_release( | 183 | void mir_render_surface_release( |
554 | 139 | MirRenderSurface* render_surface) | 184 | MirRenderSurface* render_surface) |
555 | 185 | <<<<<<< TREE | ||
556 | 140 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 186 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
557 | 187 | ======= | ||
558 | 188 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
559 | 189 | >>>>>>> MERGE-SOURCE | ||
560 | 141 | 190 | ||
561 | 142 | /** | 191 | /** |
562 | 143 | * Obtain the buffer stream backing a given render surface. | 192 | * Obtain the buffer stream backing a given render surface. |
563 | @@ -157,7 +206,11 @@ | |||
564 | 157 | MirRenderSurface* render_surface, | 206 | MirRenderSurface* render_surface, |
565 | 158 | int width, int height, | 207 | int width, int height, |
566 | 159 | MirPixelFormat format) | 208 | MirPixelFormat format) |
567 | 209 | <<<<<<< TREE | ||
568 | 160 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 210 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
569 | 211 | ======= | ||
570 | 212 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
571 | 213 | >>>>>>> MERGE-SOURCE | ||
572 | 161 | 214 | ||
573 | 162 | /** | 215 | /** |
574 | 163 | * Obtain the presentation chain backing a given render surface. | 216 | * Obtain the presentation chain backing a given render surface. |
575 | @@ -170,6 +223,7 @@ | |||
576 | 170 | */ | 223 | */ |
577 | 171 | MirPresentationChain* mir_render_surface_get_presentation_chain( | 224 | MirPresentationChain* mir_render_surface_get_presentation_chain( |
578 | 172 | MirRenderSurface* render_surface) | 225 | MirRenderSurface* render_surface) |
579 | 226 | <<<<<<< TREE | ||
580 | 173 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 227 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
581 | 174 | 228 | ||
582 | 175 | /** Query whether the server supports a given presentation mode. | 229 | /** Query whether the server supports a given presentation mode. |
583 | @@ -191,6 +245,29 @@ | |||
584 | 191 | */ | 245 | */ |
585 | 192 | void mir_presentation_chain_set_mode( | 246 | void mir_presentation_chain_set_mode( |
586 | 193 | MirPresentationChain* chain, MirPresentMode mode); | 247 | MirPresentationChain* chain, MirPresentMode mode); |
587 | 248 | ======= | ||
588 | 249 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
589 | 250 | |||
590 | 251 | /** Query whether the server supports a given presentation mode. | ||
591 | 252 | * | ||
592 | 253 | * \param [in] connection The connection | ||
593 | 254 | * \param [in] mode The MirPresentMode | ||
594 | 255 | * \return True if supported, false if not | ||
595 | 256 | */ | ||
596 | 257 | bool mir_connection_present_mode_supported( | ||
597 | 258 | MirConnection* connection, MirPresentMode mode); | ||
598 | 259 | |||
599 | 260 | /** Respecify the submission mode that the MirPresentationChain is operating with. | ||
600 | 261 | * The buffers currently queued will immediately be requeued according | ||
601 | 262 | * to the new mode. | ||
602 | 263 | * | ||
603 | 264 | * \pre mir_connection_present_mode_supported must indicate that the mode is supported | ||
604 | 265 | * \param [in] chain The chain | ||
605 | 266 | * \param [in] mode The mode to change to | ||
606 | 267 | */ | ||
607 | 268 | void mir_presentation_chain_set_mode( | ||
608 | 269 | MirPresentationChain* chain, MirPresentMode mode); | ||
609 | 270 | >>>>>>> MERGE-SOURCE | ||
610 | 194 | 271 | ||
611 | 195 | /** | 272 | /** |
612 | 196 | * Set the MirWindowSpec to contain a specific cursor. | 273 | * Set the MirWindowSpec to contain a specific cursor. |
613 | @@ -204,6 +281,7 @@ | |||
614 | 204 | MirWindowSpec* spec, | 281 | MirWindowSpec* spec, |
615 | 205 | MirRenderSurface* render_surface, | 282 | MirRenderSurface* render_surface, |
616 | 206 | int hotspot_x, int hotspot_y) | 283 | int hotspot_x, int hotspot_y) |
617 | 284 | <<<<<<< TREE | ||
618 | 207 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 285 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
619 | 208 | 286 | ||
620 | 209 | /** | 287 | /** |
621 | @@ -243,6 +321,31 @@ | |||
622 | 243 | int logical_width, int logical_height, | 321 | int logical_width, int logical_height, |
623 | 244 | int displacement_x, int displacement_y) | 322 | int displacement_x, int displacement_y) |
624 | 245 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; | 323 | MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1; |
625 | 324 | ======= | ||
626 | 325 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
627 | 326 | |||
628 | 327 | /** | ||
629 | 328 | * Set the MirWindowSpec to display content contained in a render surface | ||
630 | 329 | * | ||
631 | 330 | * \warning: The initial call to mir_window_spec_add_render_surface will set | ||
632 | 331 | * the bottom-most content, and subsequent calls will stack the | ||
633 | 332 | * content on top. | ||
634 | 333 | * | ||
635 | 334 | * \param spec The window_spec to be updated | ||
636 | 335 | * \param render_surface The render surface containing the content to be displayed | ||
637 | 336 | * \param logical_width The width that the content will be displayed at | ||
638 | 337 | * (Ignored for buffer streams) | ||
639 | 338 | * \param logical_height The height that the content will be displayed at | ||
640 | 339 | * (Ignored for buffer streams) | ||
641 | 340 | * \param displacement_x The x displacement from the top-left corner of the MirWindow | ||
642 | 341 | * \param displacement_y The y displacement from the top-left corner of the MirWindow | ||
643 | 342 | */ | ||
644 | 343 | void mir_window_spec_add_render_surface(MirWindowSpec* spec, | ||
645 | 344 | MirRenderSurface* render_surface, | ||
646 | 345 | int logical_width, int logical_height, | ||
647 | 346 | int displacement_x, int displacement_y) | ||
648 | 347 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
649 | 348 | >>>>>>> MERGE-SOURCE | ||
650 | 246 | 349 | ||
651 | 247 | #pragma GCC diagnostic pop | 350 | #pragma GCC diagnostic pop |
652 | 248 | 351 | ||
653 | 249 | 352 | ||
654 | === modified file 'include/core/mir_toolkit/deprecations.h' | |||
655 | --- include/core/mir_toolkit/deprecations.h 2017-05-16 16:10:46 +0000 | |||
656 | +++ include/core/mir_toolkit/deprecations.h 2017-05-26 09:20:21 +0000 | |||
657 | @@ -1,3 +1,4 @@ | |||
658 | 1 | <<<<<<< TREE | ||
659 | 1 | /* | 2 | /* |
660 | 2 | * Copyright © 2017 Canonical Ltd. | 3 | * Copyright © 2017 Canonical Ltd. |
661 | 3 | * | 4 | * |
662 | @@ -34,3 +35,41 @@ | |||
663 | 34 | #endif | 35 | #endif |
664 | 35 | 36 | ||
665 | 36 | #endif //MIR_DEPRECATIONS_H_ | 37 | #endif //MIR_DEPRECATIONS_H_ |
666 | 38 | ======= | ||
667 | 39 | /* | ||
668 | 40 | * Copyright © 2017 Canonical Ltd. | ||
669 | 41 | * | ||
670 | 42 | * This program is free software: you can redistribute it and/or modify it | ||
671 | 43 | * under the terms of the GNU Lesser General Public License version 3, | ||
672 | 44 | * as published by the Free Software Foundation. | ||
673 | 45 | * | ||
674 | 46 | * This program is distributed in the hope that it will be useful, | ||
675 | 47 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
676 | 48 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
677 | 49 | * GNU Lesser General Public License for more details. | ||
678 | 50 | * | ||
679 | 51 | * You should have received a copy of the GNU Lesser General Public License | ||
680 | 52 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
681 | 53 | */ | ||
682 | 54 | |||
683 | 55 | #ifndef MIR_DEPRECATIONS_H_ | ||
684 | 56 | #define MIR_DEPRECATIONS_H_ | ||
685 | 57 | |||
686 | 58 | #ifndef MIR_ENABLE_DEPRECATIONS | ||
687 | 59 | // use g++ version < 6.2 as a proxy for building on Ubunutu 16.04LTS ("Xenial") or 16.10 (Yakkety) | ||
688 | 60 | #if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ > 6) || ((__GNUC__ == 6) && (__GNUC_MINOR__ >= 2)) | ||
689 | 61 | #define MIR_ENABLE_DEPRECATIONS 1 | ||
690 | 62 | #else | ||
691 | 63 | #define MIR_ENABLE_DEPRECATIONS 0 | ||
692 | 64 | #endif | ||
693 | 65 | #endif | ||
694 | 66 | |||
695 | 67 | #if MIR_ENABLE_DEPRECATIONS > 0 | ||
696 | 68 | #define MIR_FOR_REMOVAL_IN_VERSION_1(message)\ | ||
697 | 69 | __attribute__((deprecated(message))) | ||
698 | 70 | #else | ||
699 | 71 | #define MIR_FOR_REMOVAL_IN_VERSION_1(message) | ||
700 | 72 | #endif | ||
701 | 73 | |||
702 | 74 | #endif //MIR_DEPRECATIONS_H_ | ||
703 | 75 | >>>>>>> MERGE-SOURCE | ||
704 | 37 | 76 | ||
705 | === modified file 'src/client/display_configuration_api.cpp' | |||
706 | === modified file 'src/client/mir_render_surface_api.cpp' | |||
707 | === modified file 'src/client/symbols.map' | |||
708 | === modified file 'src/platform/options/default_configuration.cpp' | |||
709 | === added directory 'src/platforms/android' | |||
710 | === added directory 'src/platforms/android/utils' | |||
711 | === added file 'src/platforms/android/utils/CMakeLists.txt.OTHER' | |||
712 | --- src/platforms/android/utils/CMakeLists.txt.OTHER 1970-01-01 00:00:00 +0000 | |||
713 | +++ src/platforms/android/utils/CMakeLists.txt.OTHER 2017-05-26 09:20:21 +0000 | |||
714 | @@ -0,0 +1,46 @@ | |||
715 | 1 | list( | ||
716 | 2 | APPEND ANDROID_DIAGNOSTICS_SRCS | ||
717 | 3 | ${CMAKE_CURRENT_SOURCE_DIR}/test_android_hardware_sanity.cpp | ||
718 | 4 | ${CMAKE_CURRENT_SOURCE_DIR}/patterns.cpp | ||
719 | 5 | ) | ||
720 | 6 | |||
721 | 7 | add_definitions(-DMIR_SERVER_GRAPHICS_PLATFORM_VERSION="${MIR_SERVER_GRAPHICS_PLATFORM_VERSION}") | ||
722 | 8 | |||
723 | 9 | include_directories( | ||
724 | 10 | ${PROJECT_SOURCE_DIR}/include/server | ||
725 | 11 | ${PROJECT_SOURCE_DIR}/include/client | ||
726 | 12 | ${PROJECT_SOURCE_DIR}/include/platform | ||
727 | 13 | ${PROJECT_SOURCE_DIR}/src/include/common | ||
728 | 14 | ${PROJECT_SOURCE_DIR}/include/test | ||
729 | 15 | ${PROJECT_SOURCE_DIR}/tests/include | ||
730 | 16 | ${PROJECT_SOURCE_DIR}/src/include/server | ||
731 | 17 | ${PROJECT_SOURCE_DIR}/examples | ||
732 | 18 | ${PROJECT_SOURCE_DIR}/src/platforms/android/include | ||
733 | 19 | ) | ||
734 | 20 | |||
735 | 21 | add_executable( | ||
736 | 22 | mir_android_diagnostics | ||
737 | 23 | ${ANDROID_DIAGNOSTICS_SRCS}) | ||
738 | 24 | |||
739 | 25 | target_link_libraries( | ||
740 | 26 | mir_android_diagnostics | ||
741 | 27 | mirserver | ||
742 | 28 | mirdraw | ||
743 | 29 | mir-test-static | ||
744 | 30 | mir-test-framework-static | ||
745 | 31 | ${LIBHARDWARE_LIBRARIES} | ||
746 | 32 | ) | ||
747 | 33 | |||
748 | 34 | mir_add_wrapped_executable(mir_demo_standalone_render_overlays | ||
749 | 35 | render_overlays.cpp | ||
750 | 36 | ) | ||
751 | 37 | |||
752 | 38 | target_link_libraries(mir_demo_standalone_render_overlays | ||
753 | 39 | mirclient | ||
754 | 40 | mircommon | ||
755 | 41 | mirplatform | ||
756 | 42 | ) | ||
757 | 43 | |||
758 | 44 | install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mir_android_diagnostics | ||
759 | 45 | DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
760 | 46 | ) | ||
761 | 0 | 47 | ||
762 | === modified file 'src/platforms/mesa/client/client_platform.cpp' | |||
763 | --- src/platforms/mesa/client/client_platform.cpp 2017-05-17 04:48:46 +0000 | |||
764 | +++ src/platforms/mesa/client/client_platform.cpp 2017-05-26 09:20:21 +0000 | |||
765 | @@ -21,9 +21,15 @@ | |||
766 | 21 | #include "client_buffer_factory.h" | 21 | #include "client_buffer_factory.h" |
767 | 22 | #include "mesa_native_display_container.h" | 22 | #include "mesa_native_display_container.h" |
768 | 23 | #include "native_surface.h" | 23 | #include "native_surface.h" |
769 | 24 | <<<<<<< TREE | ||
770 | 24 | #include "mir/client/client_buffer_factory.h" | 25 | #include "mir/client/client_buffer_factory.h" |
771 | 25 | #include "mir/client/client_context.h" | 26 | #include "mir/client/client_context.h" |
772 | 26 | #include "mir/client/client_buffer.h" | 27 | #include "mir/client/client_buffer.h" |
773 | 28 | ======= | ||
774 | 29 | #include "mir/client_buffer_factory.h" | ||
775 | 30 | #include "mir/client_context.h" | ||
776 | 31 | #include "mir/client_buffer.h" | ||
777 | 32 | >>>>>>> MERGE-SOURCE | ||
778 | 27 | #include "mir/mir_render_surface.h" | 33 | #include "mir/mir_render_surface.h" |
779 | 28 | #include "mir/mir_buffer.h" | 34 | #include "mir/mir_buffer.h" |
780 | 29 | #include "mir/weak_egl.h" | 35 | #include "mir/weak_egl.h" |
781 | @@ -138,6 +144,7 @@ | |||
782 | 138 | available_callback, available_context); | 144 | available_callback, available_context); |
783 | 139 | } | 145 | } |
784 | 140 | 146 | ||
785 | 147 | <<<<<<< TREE | ||
786 | 141 | void allocate_buffer_gbm_legacy( | 148 | void allocate_buffer_gbm_legacy( |
787 | 142 | MirConnection* connection, | 149 | MirConnection* connection, |
788 | 143 | int width, int height, | 150 | int width, int height, |
789 | @@ -283,6 +290,144 @@ | |||
790 | 283 | { | 290 | { |
791 | 284 | return 0; | 291 | return 0; |
792 | 285 | } | 292 | } |
793 | 293 | ======= | ||
794 | 294 | void allocate_buffer_gbm_legacy( | ||
795 | 295 | MirConnection* connection, | ||
796 | 296 | int width, int height, | ||
797 | 297 | unsigned int gbm_pixel_format, | ||
798 | 298 | unsigned int gbm_bo_flags, | ||
799 | 299 | MirBufferCallback available_callback, void* available_context) | ||
800 | 300 | { | ||
801 | 301 | allocate_buffer_gbm( | ||
802 | 302 | connection, static_cast<uint32_t>(width), static_cast<uint32_t>(height), | ||
803 | 303 | static_cast<uint32_t>(gbm_pixel_format), static_cast<uint32_t>(gbm_bo_flags), | ||
804 | 304 | available_callback, available_context); | ||
805 | 305 | } | ||
806 | 306 | |||
807 | 307 | MirBuffer* allocate_buffer_gbm_sync( | ||
808 | 308 | MirConnection* connection, | ||
809 | 309 | uint32_t width, uint32_t height, | ||
810 | 310 | uint32_t gbm_pixel_format, | ||
811 | 311 | uint32_t gbm_bo_flags) | ||
812 | 312 | try | ||
813 | 313 | { | ||
814 | 314 | struct BufferSync | ||
815 | 315 | { | ||
816 | 316 | void set_buffer(MirBuffer* b) | ||
817 | 317 | { | ||
818 | 318 | std::unique_lock<decltype(mutex)> lk(mutex); | ||
819 | 319 | buffer = b; | ||
820 | 320 | cv.notify_all(); | ||
821 | 321 | } | ||
822 | 322 | |||
823 | 323 | MirBuffer* wait_for_buffer() | ||
824 | 324 | { | ||
825 | 325 | std::unique_lock<decltype(mutex)> lk(mutex); | ||
826 | 326 | cv.wait(lk, [this]{ return buffer; }); | ||
827 | 327 | return buffer; | ||
828 | 328 | } | ||
829 | 329 | private: | ||
830 | 330 | std::mutex mutex; | ||
831 | 331 | std::condition_variable cv; | ||
832 | 332 | MirBuffer* buffer = nullptr; | ||
833 | 333 | } sync; | ||
834 | 334 | |||
835 | 335 | allocate_buffer_gbm( | ||
836 | 336 | connection, width, height, gbm_pixel_format, gbm_bo_flags, | ||
837 | 337 | [](auto* b, auto* context){ reinterpret_cast<BufferSync*>(context)->set_buffer(b); }, &sync); | ||
838 | 338 | return sync.wait_for_buffer(); | ||
839 | 339 | } | ||
840 | 340 | catch (...) | ||
841 | 341 | { | ||
842 | 342 | return nullptr; | ||
843 | 343 | } | ||
844 | 344 | |||
845 | 345 | bool is_gbm_importable(MirBuffer* b) | ||
846 | 346 | try | ||
847 | 347 | { | ||
848 | 348 | if (!b) | ||
849 | 349 | return false; | ||
850 | 350 | auto buffer = reinterpret_cast<mcl::MirBuffer*>(b); | ||
851 | 351 | auto native = dynamic_cast<mgm::NativeBuffer*>(buffer->client_buffer()->native_buffer_handle().get()); | ||
852 | 352 | if (!native) | ||
853 | 353 | return false; | ||
854 | 354 | return native->is_gbm_buffer; | ||
855 | 355 | } | ||
856 | 356 | catch (...) | ||
857 | 357 | { | ||
858 | 358 | return false; | ||
859 | 359 | } | ||
860 | 360 | |||
861 | 361 | int import_fd(MirBuffer* b) | ||
862 | 362 | try | ||
863 | 363 | { | ||
864 | 364 | if (!is_gbm_importable(b)) | ||
865 | 365 | return -1; | ||
866 | 366 | auto buffer = reinterpret_cast<mcl::MirBuffer*>(b); | ||
867 | 367 | auto native = dynamic_cast<mgm::NativeBuffer*>(buffer->client_buffer()->native_buffer_handle().get()); | ||
868 | 368 | return native->fd[0]; | ||
869 | 369 | } | ||
870 | 370 | catch (...) | ||
871 | 371 | { | ||
872 | 372 | return -1; | ||
873 | 373 | } | ||
874 | 374 | |||
875 | 375 | uint32_t buffer_stride(MirBuffer* b) | ||
876 | 376 | try | ||
877 | 377 | { | ||
878 | 378 | if (!is_gbm_importable(b)) | ||
879 | 379 | return 0; | ||
880 | 380 | auto buffer = reinterpret_cast<mcl::MirBuffer*>(b); | ||
881 | 381 | auto native = dynamic_cast<mgm::NativeBuffer*>(buffer->client_buffer()->native_buffer_handle().get()); | ||
882 | 382 | return native->stride; | ||
883 | 383 | } | ||
884 | 384 | catch (...) | ||
885 | 385 | { | ||
886 | 386 | return 0; | ||
887 | 387 | } | ||
888 | 388 | |||
889 | 389 | uint32_t buffer_format(MirBuffer* b) | ||
890 | 390 | try | ||
891 | 391 | { | ||
892 | 392 | if (!is_gbm_importable(b)) | ||
893 | 393 | return 0; | ||
894 | 394 | auto buffer = reinterpret_cast<mcl::MirBuffer*>(b); | ||
895 | 395 | auto native = dynamic_cast<mgm::NativeBuffer*>(buffer->client_buffer()->native_buffer_handle().get()); | ||
896 | 396 | return native->native_format; | ||
897 | 397 | } | ||
898 | 398 | catch (...) | ||
899 | 399 | { | ||
900 | 400 | return 0; | ||
901 | 401 | } | ||
902 | 402 | |||
903 | 403 | uint32_t buffer_flags(MirBuffer* b) | ||
904 | 404 | try | ||
905 | 405 | { | ||
906 | 406 | if (!is_gbm_importable(b)) | ||
907 | 407 | return 0; | ||
908 | 408 | auto buffer = reinterpret_cast<mcl::MirBuffer*>(b); | ||
909 | 409 | auto native = dynamic_cast<mgm::NativeBuffer*>(buffer->client_buffer()->native_buffer_handle().get()); | ||
910 | 410 | return native->native_flags; | ||
911 | 411 | } | ||
912 | 412 | catch (...) | ||
913 | 413 | { | ||
914 | 414 | return 0; | ||
915 | 415 | } | ||
916 | 416 | |||
917 | 417 | unsigned int buffer_age(MirBuffer* b) | ||
918 | 418 | try | ||
919 | 419 | { | ||
920 | 420 | if (!is_gbm_importable(b)) | ||
921 | 421 | return 0; | ||
922 | 422 | auto buffer = reinterpret_cast<mcl::MirBuffer*>(b); | ||
923 | 423 | auto native = dynamic_cast<mgm::NativeBuffer*>(buffer->client_buffer()->native_buffer_handle().get()); | ||
924 | 424 | return native->age; | ||
925 | 425 | } | ||
926 | 426 | catch (...) | ||
927 | 427 | { | ||
928 | 428 | return 0; | ||
929 | 429 | } | ||
930 | 430 | >>>>>>> MERGE-SOURCE | ||
931 | 286 | #pragma GCC diagnostic push | 431 | #pragma GCC diagnostic push |
932 | 287 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 432 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
933 | 288 | MirBufferStream* get_hw_stream( | 433 | MirBufferStream* get_hw_stream( |
934 | 289 | 434 | ||
935 | === modified file 'src/platforms/mesa/client/client_platform.h' | |||
936 | === modified file 'src/platforms/mesa/server/kms/real_kms_display_configuration.cpp' | |||
937 | --- src/platforms/mesa/server/kms/real_kms_display_configuration.cpp 2017-05-08 03:04:26 +0000 | |||
938 | +++ src/platforms/mesa/server/kms/real_kms_display_configuration.cpp 2017-05-26 09:20:21 +0000 | |||
939 | @@ -142,6 +142,7 @@ | |||
940 | 142 | 142 | ||
941 | 143 | void mgm::RealKMSDisplayConfiguration::update() | 143 | void mgm::RealKMSDisplayConfiguration::update() |
942 | 144 | { | 144 | { |
943 | 145 | <<<<<<< TREE | ||
944 | 145 | decltype(outputs) new_outputs; | 146 | decltype(outputs) new_outputs; |
945 | 146 | 147 | ||
946 | 147 | displays->update_from_hardware_state(); | 148 | displays->update_from_hardware_state(); |
947 | @@ -180,6 +181,219 @@ | |||
948 | 180 | * to provide a max_simultaneous_outputs value that is useful to clients. | 181 | * to provide a max_simultaneous_outputs value that is useful to clients. |
949 | 181 | */ | 182 | */ |
950 | 182 | card.max_simultaneous_outputs = outputs.size(); | 183 | card.max_simultaneous_outputs = outputs.size(); |
951 | 184 | ======= | ||
952 | 185 | kms::DRMModeResources resources{drm_fd}; | ||
953 | 186 | |||
954 | 187 | size_t max_outputs = std::min(resources.num_crtcs(), resources.num_connectors()); | ||
955 | 188 | card = {DisplayConfigurationCardId{0}, max_outputs}; | ||
956 | 189 | |||
957 | 190 | resources.for_each_connector([&](kms::DRMModeConnectorUPtr connector) | ||
958 | 191 | { | ||
959 | 192 | add_or_update_output(resources, *connector); | ||
960 | 193 | }); | ||
961 | 194 | } | ||
962 | 195 | |||
963 | 196 | namespace | ||
964 | 197 | { | ||
965 | 198 | std::vector<uint8_t> edid_for_connector(int drm_fd, uint32_t connector_id) | ||
966 | 199 | { | ||
967 | 200 | std::vector<uint8_t> edid; | ||
968 | 201 | |||
969 | 202 | mgk::ObjectProperties connector_props{ | ||
970 | 203 | drm_fd, connector_id, DRM_MODE_OBJECT_CONNECTOR}; | ||
971 | 204 | |||
972 | 205 | if (connector_props.has_property("EDID")) | ||
973 | 206 | { | ||
974 | 207 | /* | ||
975 | 208 | * We don't technically need the property information here, but query it | ||
976 | 209 | * anyway so we can detect if our assumptions about DRM behaviour | ||
977 | 210 | * become invalid. | ||
978 | 211 | */ | ||
979 | 212 | auto property = mgk::DRMModePropertyUPtr{ | ||
980 | 213 | drmModeGetProperty(drm_fd, connector_props.id_for("EDID")), | ||
981 | 214 | &drmModeFreeProperty}; | ||
982 | 215 | |||
983 | 216 | if (!property) | ||
984 | 217 | { | ||
985 | 218 | mir::log_warning( | ||
986 | 219 | "Failed to get EDID property for connector %u: %i (%s)", | ||
987 | 220 | connector_id, | ||
988 | 221 | errno, | ||
989 | 222 | ::strerror(errno)); | ||
990 | 223 | return edid; | ||
991 | 224 | } | ||
992 | 225 | |||
993 | 226 | if (!drm_property_type_is(property.get(), DRM_MODE_PROP_BLOB)) | ||
994 | 227 | { | ||
995 | 228 | mir::log_warning( | ||
996 | 229 | "EDID property on connector %u has unexpected type %u", | ||
997 | 230 | connector_id, | ||
998 | 231 | property->flags); | ||
999 | 232 | return edid; | ||
1000 | 233 | } | ||
1001 | 234 | |||
1002 | 235 | // A property ID of 0 means invalid. | ||
1003 | 236 | if (connector_props["EDID"] == 0) | ||
1004 | 237 | { | ||
1005 | 238 | /* | ||
1006 | 239 | * Log a debug message only. This will trigger for broken monitors which | ||
1007 | 240 | * don't provide an EDID, which is not as unusual as you might think... | ||
1008 | 241 | */ | ||
1009 | 242 | mir::log_debug("No EDID data available on connector %u", connector_id); | ||
1010 | 243 | return edid; | ||
1011 | 244 | } | ||
1012 | 245 | |||
1013 | 246 | auto blob = drmModeGetPropertyBlob(drm_fd, connector_props["EDID"]); | ||
1014 | 247 | |||
1015 | 248 | if (!blob) | ||
1016 | 249 | { | ||
1017 | 250 | mir::log_warning( | ||
1018 | 251 | "Failed to get EDID property blob for connector %u: %i (%s)", | ||
1019 | 252 | connector_id, | ||
1020 | 253 | errno, | ||
1021 | 254 | ::strerror(errno)); | ||
1022 | 255 | |||
1023 | 256 | return edid; | ||
1024 | 257 | } | ||
1025 | 258 | |||
1026 | 259 | edid.reserve(blob->length); | ||
1027 | 260 | edid.insert(edid.begin(), | ||
1028 | 261 | reinterpret_cast<uint8_t*>(blob->data), | ||
1029 | 262 | reinterpret_cast<uint8_t*>(blob->data) + blob->length); | ||
1030 | 263 | |||
1031 | 264 | drmModeFreePropertyBlob(blob); | ||
1032 | 265 | |||
1033 | 266 | edid.shrink_to_fit(); | ||
1034 | 267 | } | ||
1035 | 268 | |||
1036 | 269 | return edid; | ||
1037 | 270 | } | ||
1038 | 271 | } | ||
1039 | 272 | |||
1040 | 273 | void mgm::RealKMSDisplayConfiguration::add_or_update_output( | ||
1041 | 274 | kms::DRMModeResources const& resources, | ||
1042 | 275 | drmModeConnector const& connector) | ||
1043 | 276 | { | ||
1044 | 277 | DisplayConfigurationOutputId id{static_cast<int>(connector.connector_id)}; | ||
1045 | 278 | DisplayConfigurationCardId card_id{0}; | ||
1046 | 279 | DisplayConfigurationOutputType const type{ | ||
1047 | 280 | kms_connector_type_to_output_type(connector.connector_type)}; | ||
1048 | 281 | geom::Size physical_size{connector.mmWidth, connector.mmHeight}; | ||
1049 | 282 | bool connected{connector.connection == DRM_MODE_CONNECTED}; | ||
1050 | 283 | uint32_t const invalid_mode_index = std::numeric_limits<uint32_t>::max(); | ||
1051 | 284 | uint32_t current_mode_index{invalid_mode_index}; | ||
1052 | 285 | uint32_t preferred_mode_index{invalid_mode_index}; | ||
1053 | 286 | std::vector<DisplayConfigurationMode> modes; | ||
1054 | 287 | std::vector<MirPixelFormat> formats {mir_pixel_format_argb_8888, | ||
1055 | 288 | mir_pixel_format_xrgb_8888}; | ||
1056 | 289 | |||
1057 | 290 | std::vector<uint8_t> edid; | ||
1058 | 291 | if (connected) | ||
1059 | 292 | { | ||
1060 | 293 | /* Only ask for the EDID on connected outputs. There's obviously no monitor EDID | ||
1061 | 294 | * when there is no monitor connected! | ||
1062 | 295 | */ | ||
1063 | 296 | edid = edid_for_connector(drm_fd, connector.connector_id); | ||
1064 | 297 | } | ||
1065 | 298 | |||
1066 | 299 | drmModeModeInfo current_mode_info = drmModeModeInfo(); | ||
1067 | 300 | GammaCurves gamma; | ||
1068 | 301 | |||
1069 | 302 | /* Get information about the current mode */ | ||
1070 | 303 | if (connector.encoder_id) | ||
1071 | 304 | { | ||
1072 | 305 | auto encoder = resources.encoder(connector.encoder_id); | ||
1073 | 306 | if (encoder->crtc_id) | ||
1074 | 307 | { | ||
1075 | 308 | current_mode_info = resources.crtc(encoder->crtc_id)->mode; | ||
1076 | 309 | |||
1077 | 310 | auto crtc = resources.crtc(encoder->crtc_id); | ||
1078 | 311 | if (crtc->gamma_size > 0) | ||
1079 | 312 | gamma = mg::LinearGammaLUTs(crtc->gamma_size); | ||
1080 | 313 | } | ||
1081 | 314 | } | ||
1082 | 315 | |||
1083 | 316 | /* Add all the available modes and find the current and preferred one */ | ||
1084 | 317 | for (int m = 0; m < connector.count_modes; m++) | ||
1085 | 318 | { | ||
1086 | 319 | drmModeModeInfo& mode_info = connector.modes[m]; | ||
1087 | 320 | |||
1088 | 321 | geom::Size size{mode_info.hdisplay, mode_info.vdisplay}; | ||
1089 | 322 | |||
1090 | 323 | double vrefresh_hz = calculate_vrefresh_hz(mode_info); | ||
1091 | 324 | |||
1092 | 325 | modes.push_back({size, vrefresh_hz}); | ||
1093 | 326 | |||
1094 | 327 | if (kms_modes_are_equal(mode_info, current_mode_info)) | ||
1095 | 328 | current_mode_index = m; | ||
1096 | 329 | |||
1097 | 330 | if ((mode_info.type & DRM_MODE_TYPE_PREFERRED) == DRM_MODE_TYPE_PREFERRED) | ||
1098 | 331 | preferred_mode_index = m; | ||
1099 | 332 | } | ||
1100 | 333 | |||
1101 | 334 | /* Add or update the output */ | ||
1102 | 335 | auto iter = find_output_with_id(id); | ||
1103 | 336 | |||
1104 | 337 | if (iter == outputs.end()) | ||
1105 | 338 | { | ||
1106 | 339 | outputs.push_back({id, card_id, type, formats, modes, preferred_mode_index, | ||
1107 | 340 | physical_size, connected, false, geom::Point(), | ||
1108 | 341 | current_mode_index, mir_pixel_format_xrgb_8888, | ||
1109 | 342 | mir_power_mode_on, mir_orientation_normal, | ||
1110 | 343 | 1.0f, mir_form_factor_monitor, | ||
1111 | 344 | kms_subpixel_to_mir_subpixel(connector.subpixel), | ||
1112 | 345 | gamma, mir_output_gamma_supported, std::move(edid)}); | ||
1113 | 346 | } | ||
1114 | 347 | else | ||
1115 | 348 | { | ||
1116 | 349 | auto& output = *iter; | ||
1117 | 350 | |||
1118 | 351 | if (current_mode_index != invalid_mode_index) | ||
1119 | 352 | { | ||
1120 | 353 | output.current_mode_index = current_mode_index; | ||
1121 | 354 | } | ||
1122 | 355 | else if (!modes.empty() && // If empty retain old current_mode_index! | ||
1123 | 356 | ( output.current_mode_index >= modes.size() || | ||
1124 | 357 | output.modes[output.current_mode_index] != | ||
1125 | 358 | modes[output.current_mode_index])) | ||
1126 | 359 | { | ||
1127 | 360 | // current_mode_index is invalid and the definition of the old | ||
1128 | 361 | // current mode has also changed (different display plugged in) | ||
1129 | 362 | // so fall back to the preferred mode... | ||
1130 | 363 | output.current_mode_index = preferred_mode_index; | ||
1131 | 364 | } | ||
1132 | 365 | // else output.current_mode_index is correct and unchanged. | ||
1133 | 366 | |||
1134 | 367 | output.modes = modes; | ||
1135 | 368 | output.preferred_mode_index = preferred_mode_index; | ||
1136 | 369 | output.physical_size_mm = physical_size; | ||
1137 | 370 | output.connected = connected; | ||
1138 | 371 | output.current_format = mir_pixel_format_xrgb_8888; | ||
1139 | 372 | output.subpixel_arrangement = kms_subpixel_to_mir_subpixel(connector.subpixel); | ||
1140 | 373 | output.gamma = gamma; | ||
1141 | 374 | output.edid = edid; | ||
1142 | 375 | } | ||
1143 | 376 | } | ||
1144 | 377 | |||
1145 | 378 | std::vector<mg::DisplayConfigurationOutput>::iterator | ||
1146 | 379 | mgm::RealKMSDisplayConfiguration::find_output_with_id(mg::DisplayConfigurationOutputId id) | ||
1147 | 380 | { | ||
1148 | 381 | return std::find_if(outputs.begin(), outputs.end(), | ||
1149 | 382 | [id](DisplayConfigurationOutput const& output) | ||
1150 | 383 | { | ||
1151 | 384 | return output.id == id; | ||
1152 | 385 | }); | ||
1153 | 386 | } | ||
1154 | 387 | |||
1155 | 388 | std::vector<mg::DisplayConfigurationOutput>::const_iterator | ||
1156 | 389 | mgm::RealKMSDisplayConfiguration::find_output_with_id(mg::DisplayConfigurationOutputId id) const | ||
1157 | 390 | { | ||
1158 | 391 | return std::find_if(outputs.begin(), outputs.end(), | ||
1159 | 392 | [id](DisplayConfigurationOutput const& output) | ||
1160 | 393 | { | ||
1161 | 394 | return output.id == id; | ||
1162 | 395 | }); | ||
1163 | 396 | >>>>>>> MERGE-SOURCE | ||
1164 | 183 | } | 397 | } |
1165 | 184 | 398 | ||
1166 | 185 | // Compatibility means conf1 can be attained from conf2 (and vice versa) | 399 | // Compatibility means conf1 can be attained from conf2 (and vice versa) |
1167 | 186 | 400 | ||
1168 | === modified file 'src/server/compositor/multi_monitor_arbiter.cpp' | |||
1169 | --- src/server/compositor/multi_monitor_arbiter.cpp 2017-05-25 05:49:36 +0000 | |||
1170 | +++ src/server/compositor/multi_monitor_arbiter.cpp 2017-05-26 09:20:21 +0000 | |||
1171 | @@ -65,9 +65,16 @@ | |||
1172 | 65 | 65 | ||
1173 | 66 | auto& last_entry = onscreen_buffers.front(); | 66 | auto& last_entry = onscreen_buffers.front(); |
1174 | 67 | last_entry.use_count++; | 67 | last_entry.use_count++; |
1175 | 68 | <<<<<<< TREE | ||
1176 | 68 | auto last_entry_buffer = last_entry.buffer; | 69 | auto last_entry_buffer = last_entry.buffer; |
1177 | 69 | clean_onscreen_buffers(lk); | 70 | clean_onscreen_buffers(lk); |
1178 | 70 | return last_entry_buffer; | 71 | return last_entry_buffer; |
1179 | 72 | ======= | ||
1180 | 73 | auto last_entry_buffer = last_entry.buffer; | ||
1181 | 74 | if (mode == mc::MultiMonitorMode::multi_monitor_sync) | ||
1182 | 75 | clean_onscreen_buffers(lk); | ||
1183 | 76 | return last_entry_buffer; | ||
1184 | 77 | >>>>>>> MERGE-SOURCE | ||
1185 | 71 | } | 78 | } |
1186 | 72 | 79 | ||
1187 | 73 | void mc::MultiMonitorArbiter::compositor_release(std::shared_ptr<mg::Buffer> const& buffer) | 80 | void mc::MultiMonitorArbiter::compositor_release(std::shared_ptr<mg::Buffer> const& buffer) |
1188 | 74 | 81 | ||
1189 | === modified file 'src/server/frontend/session_mediator.cpp' | |||
1190 | === modified file 'src/server/graphics/nested/nested_display_configuration.cpp' | |||
1191 | === modified file 'src/server/input/default_configuration.cpp' | |||
1192 | === modified file 'src/server/input/default_device.cpp' | |||
1193 | --- src/server/input/default_device.cpp 2017-05-08 03:04:26 +0000 | |||
1194 | +++ src/server/input/default_device.cpp 2017-05-26 09:20:21 +0000 | |||
1195 | @@ -32,6 +32,7 @@ | |||
1196 | 32 | 32 | ||
1197 | 33 | namespace mi = mir::input; | 33 | namespace mi = mir::input; |
1198 | 34 | 34 | ||
1199 | 35 | <<<<<<< TREE | ||
1200 | 35 | mi::DefaultDevice::DefaultDevice(MirInputDeviceId id, | 36 | mi::DefaultDevice::DefaultDevice(MirInputDeviceId id, |
1201 | 36 | std::shared_ptr<dispatch::ActionQueue> const& actions, | 37 | std::shared_ptr<dispatch::ActionQueue> const& actions, |
1202 | 37 | InputDevice& device, | 38 | InputDevice& device, |
1203 | @@ -46,6 +47,19 @@ | |||
1204 | 46 | actions{actions}, | 47 | actions{actions}, |
1205 | 47 | key_mapper{key_mapper}, | 48 | key_mapper{key_mapper}, |
1206 | 48 | device_changed_callback{callback} | 49 | device_changed_callback{callback} |
1207 | 50 | ======= | ||
1208 | 51 | mi::DefaultDevice::DefaultDevice(MirInputDeviceId id, | ||
1209 | 52 | std::shared_ptr<dispatch::ActionQueue> const& actions, | ||
1210 | 53 | InputDevice& device, | ||
1211 | 54 | std::shared_ptr<KeyMapper> const& key_mapper) | ||
1212 | 55 | : device_id{id}, | ||
1213 | 56 | device{device}, | ||
1214 | 57 | info(device.get_device_info()), | ||
1215 | 58 | pointer{device.get_pointer_settings()}, | ||
1216 | 59 | touchpad{device.get_touchpad_settings()}, | ||
1217 | 60 | actions{actions}, | ||
1218 | 61 | key_mapper{key_mapper} | ||
1219 | 62 | >>>>>>> MERGE-SOURCE | ||
1220 | 49 | { | 63 | { |
1221 | 50 | if (contains(info.capabilities, mi::DeviceCapability::keyboard)) | 64 | if (contains(info.capabilities, mi::DeviceCapability::keyboard)) |
1222 | 51 | { | 65 | { |
1223 | @@ -188,6 +202,7 @@ | |||
1224 | 188 | settings.tap_to_click = conf.tap_to_click(); | 202 | settings.tap_to_click = conf.tap_to_click(); |
1225 | 189 | settings.middle_mouse_button_emulation = conf.middle_mouse_button_emulation(); | 203 | settings.middle_mouse_button_emulation = conf.middle_mouse_button_emulation(); |
1226 | 190 | 204 | ||
1227 | 205 | <<<<<<< TREE | ||
1228 | 191 | { | 206 | { |
1229 | 192 | std::lock_guard<std::mutex> lock(config_mutex); | 207 | std::lock_guard<std::mutex> lock(config_mutex); |
1230 | 193 | touchpad = settings; | 208 | touchpad = settings; |
1231 | @@ -198,6 +213,19 @@ | |||
1232 | 198 | dev->apply_settings(settings); | 213 | dev->apply_settings(settings); |
1233 | 199 | }); | 214 | }); |
1234 | 200 | } | 215 | } |
1235 | 216 | ======= | ||
1236 | 217 | { | ||
1237 | 218 | std::lock_guard<std::mutex> lock(config_mutex); | ||
1238 | 219 | touchpad = settings; | ||
1239 | 220 | |||
1240 | 221 | if (!actions) // device is disabled | ||
1241 | 222 | return; | ||
1242 | 223 | actions->enqueue([settings = std::move(settings), dev=&device] | ||
1243 | 224 | { | ||
1244 | 225 | dev->apply_settings(settings); | ||
1245 | 226 | }); | ||
1246 | 227 | } | ||
1247 | 228 | >>>>>>> MERGE-SOURCE | ||
1248 | 201 | } | 229 | } |
1249 | 202 | 230 | ||
1250 | 203 | mir::optional_value<MirKeyboardConfig> mi::DefaultDevice::keyboard_configuration() const | 231 | mir::optional_value<MirKeyboardConfig> mi::DefaultDevice::keyboard_configuration() const |
1251 | @@ -211,6 +239,7 @@ | |||
1252 | 211 | if (!contains(info.capabilities, mi::DeviceCapability::keyboard)) | 239 | if (!contains(info.capabilities, mi::DeviceCapability::keyboard)) |
1253 | 212 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a keyboard configuration")); | 240 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a keyboard configuration")); |
1254 | 213 | 241 | ||
1255 | 242 | <<<<<<< TREE | ||
1256 | 214 | set_keyboard_configuration(conf); | 243 | set_keyboard_configuration(conf); |
1257 | 215 | device_changed_callback(this); | 244 | device_changed_callback(this); |
1258 | 216 | } | 245 | } |
1259 | @@ -220,8 +249,14 @@ | |||
1260 | 220 | std::lock_guard<std::mutex> lock(config_mutex); | 249 | std::lock_guard<std::mutex> lock(config_mutex); |
1261 | 221 | if (!actions) // device is disabled | 250 | if (!actions) // device is disabled |
1262 | 222 | return; | 251 | return; |
1263 | 252 | ======= | ||
1264 | 253 | std::lock_guard<std::mutex> lock(config_mutex); | ||
1265 | 254 | if (!actions) // device is disabled | ||
1266 | 255 | return; | ||
1267 | 256 | >>>>>>> MERGE-SOURCE | ||
1268 | 223 | if (keyboard.value().device_keymap() != conf.device_keymap()) | 257 | if (keyboard.value().device_keymap() != conf.device_keymap()) |
1269 | 224 | keyboard = conf; | 258 | keyboard = conf; |
1270 | 259 | <<<<<<< TREE | ||
1271 | 225 | else | 260 | else |
1272 | 226 | return; | 261 | return; |
1273 | 227 | key_mapper->set_keymap_for_device(device_id, conf.device_keymap()); | 262 | key_mapper->set_keymap_for_device(device_id, conf.device_keymap()); |
1274 | @@ -263,6 +298,17 @@ | |||
1275 | 263 | dev->apply_settings(settings); | 298 | dev->apply_settings(settings); |
1276 | 264 | }); | 299 | }); |
1277 | 265 | } | 300 | } |
1278 | 301 | ======= | ||
1279 | 302 | else | ||
1280 | 303 | return; | ||
1281 | 304 | key_mapper->set_keymap_for_device(device_id, conf.device_keymap()); | ||
1282 | 305 | } | ||
1283 | 306 | |||
1284 | 307 | void mi::DefaultDevice::disable_queue() | ||
1285 | 308 | { | ||
1286 | 309 | std::lock_guard<std::mutex> lock(config_mutex); | ||
1287 | 310 | actions.reset(); | ||
1288 | 311 | >>>>>>> MERGE-SOURCE | ||
1289 | 266 | } | 312 | } |
1290 | 267 | 313 | ||
1291 | 268 | MirInputDevice mi::DefaultDevice::config() const | 314 | MirInputDevice mi::DefaultDevice::config() const |
1292 | 269 | 315 | ||
1293 | === modified file 'src/server/input/default_device.h' | |||
1294 | --- src/server/input/default_device.h 2017-05-08 03:04:26 +0000 | |||
1295 | +++ src/server/input/default_device.h 2017-05-26 09:20:21 +0000 | |||
1296 | @@ -30,8 +30,12 @@ | |||
1297 | 30 | #include "mir/optional_value.h" | 30 | #include "mir/optional_value.h" |
1298 | 31 | 31 | ||
1299 | 32 | #include <memory> | 32 | #include <memory> |
1300 | 33 | <<<<<<< TREE | ||
1301 | 33 | #include <functional> | 34 | #include <functional> |
1302 | 34 | #include <mutex> | 35 | #include <mutex> |
1303 | 36 | ======= | ||
1304 | 37 | #include <mutex> | ||
1305 | 38 | >>>>>>> MERGE-SOURCE | ||
1306 | 35 | 39 | ||
1307 | 36 | namespace mir | 40 | namespace mir |
1308 | 37 | { | 41 | { |
1309 | @@ -74,11 +78,15 @@ | |||
1310 | 74 | void apply_touchpad_configuration(MirTouchpadConfig const&) override; | 78 | void apply_touchpad_configuration(MirTouchpadConfig const&) override; |
1311 | 75 | optional_value<MirKeyboardConfig> keyboard_configuration() const override; | 79 | optional_value<MirKeyboardConfig> keyboard_configuration() const override; |
1312 | 76 | void apply_keyboard_configuration(MirKeyboardConfig const&) override; | 80 | void apply_keyboard_configuration(MirKeyboardConfig const&) override; |
1313 | 81 | <<<<<<< TREE | ||
1314 | 77 | optional_value<MirTouchscreenConfig> touchscreen_configuration() const override; | 82 | optional_value<MirTouchscreenConfig> touchscreen_configuration() const override; |
1315 | 78 | void apply_touchscreen_configuration(MirTouchscreenConfig const&) override; | 83 | void apply_touchscreen_configuration(MirTouchscreenConfig const&) override; |
1316 | 79 | 84 | ||
1317 | 80 | MirInputDevice config() const; | 85 | MirInputDevice config() const; |
1318 | 81 | void disable_queue(); | 86 | void disable_queue(); |
1319 | 87 | ======= | ||
1320 | 88 | void disable_queue(); | ||
1321 | 89 | >>>>>>> MERGE-SOURCE | ||
1322 | 82 | private: | 90 | private: |
1323 | 83 | void set_pointer_configuration(MirPointerConfig const&); | 91 | void set_pointer_configuration(MirPointerConfig const&); |
1324 | 84 | void set_touchpad_configuration(MirTouchpadConfig const&); | 92 | void set_touchpad_configuration(MirTouchpadConfig const&); |
1325 | @@ -92,11 +100,19 @@ | |||
1326 | 92 | optional_value<PointerSettings> pointer; | 100 | optional_value<PointerSettings> pointer; |
1327 | 93 | optional_value<TouchpadSettings> touchpad; | 101 | optional_value<TouchpadSettings> touchpad; |
1328 | 94 | optional_value<MirKeyboardConfig> keyboard; | 102 | optional_value<MirKeyboardConfig> keyboard; |
1329 | 103 | <<<<<<< TREE | ||
1330 | 95 | optional_value<TouchscreenSettings> touchscreen; | 104 | optional_value<TouchscreenSettings> touchscreen; |
1331 | 96 | std::shared_ptr<dispatch::ActionQueue> actions; | 105 | std::shared_ptr<dispatch::ActionQueue> actions; |
1332 | 106 | ======= | ||
1333 | 107 | std::shared_ptr<dispatch::ActionQueue> actions; | ||
1334 | 108 | >>>>>>> MERGE-SOURCE | ||
1335 | 97 | std::shared_ptr<KeyMapper> const key_mapper; | 109 | std::shared_ptr<KeyMapper> const key_mapper; |
1336 | 110 | <<<<<<< TREE | ||
1337 | 98 | std::function<void(Device*)> device_changed_callback; | 111 | std::function<void(Device*)> device_changed_callback; |
1338 | 99 | std::mutex mutable config_mutex; | 112 | std::mutex mutable config_mutex; |
1339 | 113 | ======= | ||
1340 | 114 | std::mutex mutable config_mutex; | ||
1341 | 115 | >>>>>>> MERGE-SOURCE | ||
1342 | 100 | }; | 116 | }; |
1343 | 101 | 117 | ||
1344 | 102 | } | 118 | } |
1345 | 103 | 119 | ||
1346 | === modified file 'src/server/input/default_input_device_hub.cpp' | |||
1347 | --- src/server/input/default_input_device_hub.cpp 2017-05-08 03:04:26 +0000 | |||
1348 | +++ src/server/input/default_input_device_hub.cpp 2017-05-26 09:20:21 +0000 | |||
1349 | @@ -200,8 +200,14 @@ | |||
1350 | 200 | 200 | ||
1351 | 201 | if (it == end(devices)) | 201 | if (it == end(devices)) |
1352 | 202 | { | 202 | { |
1353 | 203 | <<<<<<< TREE | ||
1354 | 203 | auto queue = std::make_shared<dispatch::ActionQueue>(); | 204 | auto queue = std::make_shared<dispatch::ActionQueue>(); |
1355 | 204 | auto handle = restore_or_create_device(*device, queue); | 205 | auto handle = restore_or_create_device(*device, queue); |
1356 | 206 | ======= | ||
1357 | 207 | auto id = create_new_device_id(); | ||
1358 | 208 | auto queue = std::make_shared<dispatch::ActionQueue>(); | ||
1359 | 209 | auto handle = std::make_shared<DefaultDevice>(id, queue, *device, key_mapper); | ||
1360 | 210 | >>>>>>> MERGE-SOURCE | ||
1361 | 205 | // send input device info to observer loop.. | 211 | // send input device info to observer loop.. |
1362 | 206 | devices.push_back(std::make_unique<RegisteredDevice>( | 212 | devices.push_back(std::make_unique<RegisteredDevice>( |
1363 | 207 | device, handle->id(), queue, cookie_authority, handle)); | 213 | device, handle->id(), queue, cookie_authority, handle)); |
1364 | @@ -210,7 +216,18 @@ | |||
1365 | 210 | add_device_handle(handle); | 216 | add_device_handle(handle); |
1366 | 211 | 217 | ||
1367 | 212 | seat->add_device(*handle); | 218 | seat->add_device(*handle); |
1369 | 213 | dev->start(seat, input_dispatchable); | 219 | <<<<<<< TREE |
1370 | 220 | dev->start(seat, input_dispatchable); | ||
1371 | 221 | ======= | ||
1372 | 222 | dev->start(seat, input_dispatchable); | ||
1373 | 223 | |||
1374 | 224 | // pass input device handle to observer loop.. | ||
1375 | 225 | observer_queue->enqueue(this, | ||
1376 | 226 | [this, handle]() | ||
1377 | 227 | { | ||
1378 | 228 | add_device_handle(handle); | ||
1379 | 229 | }); | ||
1380 | 230 | >>>>>>> MERGE-SOURCE | ||
1381 | 214 | } | 231 | } |
1382 | 215 | else | 232 | else |
1383 | 216 | { | 233 | { |
1384 | 217 | 234 | ||
1385 | === modified file 'src/server/input/default_input_device_hub.h' | |||
1386 | --- src/server/input/default_input_device_hub.h 2017-05-08 03:04:26 +0000 | |||
1387 | +++ src/server/input/default_input_device_hub.h 2017-05-26 09:20:21 +0000 | |||
1388 | @@ -104,11 +104,15 @@ | |||
1389 | 104 | void device_changed(Device* dev); | 104 | void device_changed(Device* dev); |
1390 | 105 | void emit_changed_devices(); | 105 | void emit_changed_devices(); |
1391 | 106 | MirInputDeviceId create_new_device_id(); | 106 | MirInputDeviceId create_new_device_id(); |
1392 | 107 | <<<<<<< TREE | ||
1393 | 107 | void store_device_config(DefaultDevice const& dev); | 108 | void store_device_config(DefaultDevice const& dev); |
1394 | 108 | std::shared_ptr<DefaultDevice> restore_or_create_device(InputDevice& dev, | 109 | std::shared_ptr<DefaultDevice> restore_or_create_device(InputDevice& dev, |
1395 | 109 | std::shared_ptr<dispatch::ActionQueue> const& queue); | 110 | std::shared_ptr<dispatch::ActionQueue> const& queue); |
1396 | 110 | mir::optional_value<MirInputDevice> get_stored_device_config(std::string const& id); | 111 | mir::optional_value<MirInputDevice> get_stored_device_config(std::string const& id); |
1397 | 111 | 112 | ||
1398 | 113 | ======= | ||
1399 | 114 | |||
1400 | 115 | >>>>>>> MERGE-SOURCE | ||
1401 | 112 | std::shared_ptr<Seat> const seat; | 116 | std::shared_ptr<Seat> const seat; |
1402 | 113 | std::shared_ptr<dispatch::MultiplexingDispatchable> const input_dispatchable; | 117 | std::shared_ptr<dispatch::MultiplexingDispatchable> const input_dispatchable; |
1403 | 114 | std::mutex mutable handles_guard; | 118 | std::mutex mutable handles_guard; |
1404 | 115 | 119 | ||
1405 | === modified file 'src/server/scene/application_session.cpp' | |||
1406 | === modified file 'src/utils/out.c' | |||
1407 | === modified file 'tests/acceptance-tests/test_custom_window_management.cpp' | |||
1408 | --- tests/acceptance-tests/test_custom_window_management.cpp 2017-05-25 04:43:29 +0000 | |||
1409 | +++ tests/acceptance-tests/test_custom_window_management.cpp 2017-05-26 09:20:21 +0000 | |||
1410 | @@ -371,6 +371,7 @@ | |||
1411 | 371 | mir_connection_release(connection); | 371 | mir_connection_release(connection); |
1412 | 372 | } | 372 | } |
1413 | 373 | 373 | ||
1414 | 374 | <<<<<<< TREE | ||
1415 | 374 | TEST_F(CustomWindowManagement, apply_input_shape_to_surface) | 375 | TEST_F(CustomWindowManagement, apply_input_shape_to_surface) |
1416 | 375 | { | 376 | { |
1417 | 376 | start_server(); | 377 | start_server(); |
1418 | @@ -420,6 +421,55 @@ | |||
1419 | 420 | mir_connection_release(connection); | 421 | mir_connection_release(connection); |
1420 | 421 | } | 422 | } |
1421 | 422 | 423 | ||
1422 | 424 | ======= | ||
1423 | 425 | TEST_F(CustomWindowManagement, apply_input_shape_to_surface) | ||
1424 | 426 | { | ||
1425 | 427 | start_server(); | ||
1426 | 428 | |||
1427 | 429 | auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__); | ||
1428 | 430 | |||
1429 | 431 | int const width{800}, height{600}; | ||
1430 | 432 | MirPixelFormat const format{mir_pixel_format_bgr_888}; | ||
1431 | 433 | auto surface_spec = mir_create_normal_window_spec(connection, width, height); | ||
1432 | 434 | mir_window_spec_set_pixel_format(surface_spec, format); | ||
1433 | 435 | |||
1434 | 436 | auto window = mir_create_window_sync(surface_spec); | ||
1435 | 437 | mir_window_spec_release(surface_spec); | ||
1436 | 438 | |||
1437 | 439 | surface_spec = mir_create_window_spec(connection); | ||
1438 | 440 | |||
1439 | 441 | mt::Signal received; | ||
1440 | 442 | |||
1441 | 443 | MirRectangle rect{ 0, 0, 100, 101 }; | ||
1442 | 444 | mir_window_spec_set_input_shape(surface_spec, &rect, 1); | ||
1443 | 445 | |||
1444 | 446 | auto const check_apply_surface = [&received]( | ||
1445 | 447 | std::shared_ptr<ms::Session> const&, | ||
1446 | 448 | std::shared_ptr<ms::Surface> const&, | ||
1447 | 449 | msh::SurfaceSpecification const& spec) | ||
1448 | 450 | { | ||
1449 | 451 | EXPECT_TRUE(spec.input_shape.is_set()); | ||
1450 | 452 | received.raise(); | ||
1451 | 453 | }; | ||
1452 | 454 | EXPECT_CALL(window_manager, modify_surface(_,_,_)).WillOnce(Invoke(check_apply_surface)); | ||
1453 | 455 | |||
1454 | 456 | mir_window_apply_spec(window, surface_spec); | ||
1455 | 457 | mir_window_spec_release(surface_spec); | ||
1456 | 458 | |||
1457 | 459 | EXPECT_TRUE(received.wait_for(400ms)); | ||
1458 | 460 | |||
1459 | 461 | surface_spec = mir_create_window_spec(connection); | ||
1460 | 462 | mir_window_spec_set_input_shape(surface_spec, nullptr, 0); | ||
1461 | 463 | |||
1462 | 464 | mir_window_apply_spec(window, surface_spec); | ||
1463 | 465 | mir_window_spec_release(surface_spec); | ||
1464 | 466 | EXPECT_TRUE(received.wait_for(400ms)); | ||
1465 | 467 | |||
1466 | 468 | mir_window_release_sync(window); | ||
1467 | 469 | mir_connection_release(connection); | ||
1468 | 470 | } | ||
1469 | 471 | |||
1470 | 472 | >>>>>>> MERGE-SOURCE | ||
1471 | 423 | TEST_F(CustomWindowManagement, when_the_client_places_a_new_surface_the_request_reaches_the_window_manager) | 473 | TEST_F(CustomWindowManagement, when_the_client_places_a_new_surface_the_request_reaches_the_window_manager) |
1472 | 424 | { | 474 | { |
1473 | 425 | int const width{800}; | 475 | int const width{800}; |
1474 | 426 | 476 | ||
1475 | === modified file 'tests/acceptance-tests/test_new_display_configuration.cpp' | |||
1476 | === modified file 'tests/acceptance-tests/test_presentation_chain.cpp' | |||
1477 | --- tests/acceptance-tests/test_presentation_chain.cpp 2017-05-25 04:43:29 +0000 | |||
1478 | +++ tests/acceptance-tests/test_presentation_chain.cpp 2017-05-26 09:20:21 +0000 | |||
1479 | @@ -133,18 +133,33 @@ | |||
1480 | 133 | { | 133 | { |
1481 | 134 | auto spec = mir_create_normal_window_spec( | 134 | auto spec = mir_create_normal_window_spec( |
1482 | 135 | connection, size.width.as_int(), size.height.as_int()); | 135 | connection, size.width.as_int(), size.height.as_int()); |
1495 | 136 | #pragma GCC diagnostic push | 136 | <<<<<<< TREE |
1496 | 137 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 137 | #pragma GCC diagnostic push |
1497 | 138 | mir_window_spec_set_pixel_format(spec, pf); | 138 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1498 | 139 | mir_window_spec_add_render_surface( | 139 | mir_window_spec_set_pixel_format(spec, pf); |
1499 | 140 | spec, chain.content(), size.width.as_int(), size.height.as_int(), 0, 0); | 140 | mir_window_spec_add_render_surface( |
1500 | 141 | #pragma GCC diagnostic pop | 141 | spec, chain.content(), size.width.as_int(), size.height.as_int(), 0, 0); |
1501 | 142 | auto window = mir_create_window_sync(spec); | 142 | #pragma GCC diagnostic pop |
1502 | 143 | mir_window_spec_release(spec); | 143 | auto window = mir_create_window_sync(spec); |
1503 | 144 | return window; | 144 | mir_window_spec_release(spec); |
1504 | 145 | } | 145 | return window; |
1505 | 146 | }; | 146 | } |
1506 | 147 | 147 | }; | |
1507 | 148 | |||
1508 | 149 | ======= | ||
1509 | 150 | mir_window_spec_set_pixel_format(spec, pf); | ||
1510 | 151 | #pragma GCC diagnostic push | ||
1511 | 152 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
1512 | 153 | mir_window_spec_add_render_surface( | ||
1513 | 154 | spec, chain.content(), size.width.as_int(), size.height.as_int(), 0, 0); | ||
1514 | 155 | #pragma GCC diagnostic pop | ||
1515 | 156 | auto window = mir_create_window_sync(spec); | ||
1516 | 157 | mir_window_spec_release(spec); | ||
1517 | 158 | return window; | ||
1518 | 159 | } | ||
1519 | 160 | }; | ||
1520 | 161 | |||
1521 | 162 | >>>>>>> MERGE-SOURCE | ||
1522 | 148 | struct PresentationChain : mtf::ConnectedClientHeadlessServer | 163 | struct PresentationChain : mtf::ConnectedClientHeadlessServer |
1523 | 149 | { | 164 | { |
1524 | 150 | bool stall_compositor = false; | 165 | bool stall_compositor = false; |
1525 | @@ -467,6 +482,7 @@ | |||
1526 | 467 | EXPECT_THAT(mir_buffer_get_error_message(buffer), Not(StrEq(""))); | 482 | EXPECT_THAT(mir_buffer_get_error_message(buffer), Not(StrEq(""))); |
1527 | 468 | mir_buffer_release(buffer); | 483 | mir_buffer_release(buffer); |
1528 | 469 | } | 484 | } |
1529 | 485 | <<<<<<< TREE | ||
1530 | 470 | 486 | ||
1531 | 471 | namespace | 487 | namespace |
1532 | 472 | { | 488 | { |
1533 | @@ -623,3 +639,159 @@ | |||
1534 | 623 | for (auto i = 0u; i < buffers.size() - 1; i++) | 639 | for (auto i = 0u; i < buffers.size() - 1; i++) |
1535 | 624 | EXPECT_TRUE(buffers[i]->wait_ready(5s)); | 640 | EXPECT_TRUE(buffers[i]->wait_ready(5s)); |
1536 | 625 | } | 641 | } |
1537 | 642 | ======= | ||
1538 | 643 | |||
1539 | 644 | namespace | ||
1540 | 645 | { | ||
1541 | 646 | struct TrackedBuffer | ||
1542 | 647 | { | ||
1543 | 648 | TrackedBuffer(MirConnection* connection, std::atomic<unsigned int>& counter) : | ||
1544 | 649 | buffer(mir_connection_allocate_buffer_sync(connection, 100, 100, pf)), | ||
1545 | 650 | counter(counter) | ||
1546 | 651 | { | ||
1547 | 652 | } | ||
1548 | 653 | ~TrackedBuffer() | ||
1549 | 654 | { | ||
1550 | 655 | mir_buffer_release(buffer); | ||
1551 | 656 | } | ||
1552 | 657 | |||
1553 | 658 | void submit_to(MirPresentationChain* chain) | ||
1554 | 659 | { | ||
1555 | 660 | std::unique_lock<std::mutex> lk(mutex); | ||
1556 | 661 | if (!avail) | ||
1557 | 662 | throw std::runtime_error("test problem"); | ||
1558 | 663 | avail = false; | ||
1559 | 664 | mir_presentation_chain_submit_buffer(chain, buffer, tavailable, this); | ||
1560 | 665 | } | ||
1561 | 666 | |||
1562 | 667 | static void tavailable(MirBuffer*, void* ctxt) | ||
1563 | 668 | { | ||
1564 | 669 | TrackedBuffer* buf = reinterpret_cast<TrackedBuffer*>(ctxt); | ||
1565 | 670 | buf->ready(); | ||
1566 | 671 | } | ||
1567 | 672 | |||
1568 | 673 | void ready() | ||
1569 | 674 | { | ||
1570 | 675 | last_count_ = counter.fetch_add(1); | ||
1571 | 676 | std::unique_lock<std::mutex> lk(mutex); | ||
1572 | 677 | avail = true; | ||
1573 | 678 | cv.notify_all(); | ||
1574 | 679 | } | ||
1575 | 680 | |||
1576 | 681 | bool wait_ready(std::chrono::milliseconds ms) | ||
1577 | 682 | { | ||
1578 | 683 | std::unique_lock<std::mutex> lk(mutex); | ||
1579 | 684 | return cv.wait_for(lk, ms, [this] { return avail; }); | ||
1580 | 685 | } | ||
1581 | 686 | |||
1582 | 687 | bool is_ready() { return avail; } | ||
1583 | 688 | unsigned int last_count() const | ||
1584 | 689 | { | ||
1585 | 690 | return last_count_; | ||
1586 | 691 | } | ||
1587 | 692 | |||
1588 | 693 | MirPixelFormat pf = mir_pixel_format_abgr_8888; | ||
1589 | 694 | MirBuffer* buffer; | ||
1590 | 695 | std::atomic<unsigned int>& counter; | ||
1591 | 696 | unsigned int last_count_ = 0u; | ||
1592 | 697 | bool avail = true; | ||
1593 | 698 | std::condition_variable cv; | ||
1594 | 699 | std::mutex mutex; | ||
1595 | 700 | }; | ||
1596 | 701 | } | ||
1597 | 702 | |||
1598 | 703 | TEST_F(PresentationChain, fifo_looks_correct_from_client_perspective) | ||
1599 | 704 | { | ||
1600 | 705 | SurfaceWithChainFromStart window( | ||
1601 | 706 | connection, mir_present_mode_fifo, size, pf); | ||
1602 | 707 | |||
1603 | 708 | int const num_buffers = 5; | ||
1604 | 709 | |||
1605 | 710 | std::atomic<unsigned int> counter{ 0u }; | ||
1606 | 711 | std::array<std::unique_ptr<TrackedBuffer>, num_buffers> buffers; | ||
1607 | 712 | for (auto& buffer : buffers) | ||
1608 | 713 | buffer = std::make_unique<TrackedBuffer>(connection, counter); | ||
1609 | 714 | for(auto& b : buffers) | ||
1610 | 715 | b->submit_to(window.chain()); | ||
1611 | 716 | |||
1612 | 717 | //the last one that will return; | ||
1613 | 718 | EXPECT_TRUE(buffers[3]->wait_ready(5s)); | ||
1614 | 719 | EXPECT_THAT(buffers[0]->last_count(), Lt(buffers[1]->last_count())); | ||
1615 | 720 | EXPECT_THAT(buffers[1]->last_count(), Lt(buffers[2]->last_count())); | ||
1616 | 721 | EXPECT_THAT(buffers[2]->last_count(), Lt(buffers[3]->last_count())); | ||
1617 | 722 | EXPECT_FALSE(buffers[4]->is_ready()); | ||
1618 | 723 | } | ||
1619 | 724 | |||
1620 | 725 | TEST_F(PresentationChain, fifo_queues_when_compositor_isnt_consuming) | ||
1621 | 726 | { | ||
1622 | 727 | SurfaceWithChainFromStart window( | ||
1623 | 728 | connection, mir_present_mode_fifo, size, pf); | ||
1624 | 729 | int const num_buffers = 5; | ||
1625 | 730 | std::atomic<unsigned int> counter{ 0u }; | ||
1626 | 731 | std::array<std::unique_ptr<TrackedBuffer>, num_buffers> buffers; | ||
1627 | 732 | for (auto& buffer : buffers) | ||
1628 | 733 | buffer = std::make_unique<TrackedBuffer>(connection, counter); | ||
1629 | 734 | { | ||
1630 | 735 | auto const stall = mir::raii::paired_calls( | ||
1631 | 736 | [this] { stall_compositor = true; }, | ||
1632 | 737 | [this] { stall_compositor = false; }); | ||
1633 | 738 | for (auto& b : buffers) | ||
1634 | 739 | b->submit_to(window.chain()); | ||
1635 | 740 | for (auto &b : buffers) | ||
1636 | 741 | EXPECT_FALSE(b->is_ready()); | ||
1637 | 742 | } | ||
1638 | 743 | for (auto i = 0u; i < buffers.size() - 1; i++) | ||
1639 | 744 | EXPECT_TRUE(buffers[i]->wait_ready(5s)); | ||
1640 | 745 | } | ||
1641 | 746 | |||
1642 | 747 | TEST_F(PresentationChain, mailbox_looks_correct_from_client_perspective) | ||
1643 | 748 | { | ||
1644 | 749 | auto const stall = mir::raii::paired_calls( | ||
1645 | 750 | [this] { stall_compositor = true; }, | ||
1646 | 751 | [this] { stall_compositor = false; }); | ||
1647 | 752 | SurfaceWithChainFromStart window( | ||
1648 | 753 | connection, mir_present_mode_mailbox, size, pf); | ||
1649 | 754 | |||
1650 | 755 | int const num_buffers = 5; | ||
1651 | 756 | |||
1652 | 757 | std::atomic<unsigned int> counter{ 0u }; | ||
1653 | 758 | std::array<std::unique_ptr<TrackedBuffer>, num_buffers> buffers; | ||
1654 | 759 | for (auto& buffer : buffers) | ||
1655 | 760 | buffer = std::make_unique<TrackedBuffer>(connection, counter); | ||
1656 | 761 | |||
1657 | 762 | for(auto i = 0u; i < buffers.size(); i++) | ||
1658 | 763 | { | ||
1659 | 764 | buffers[i]->submit_to(window.chain()); | ||
1660 | 765 | if (i > 0) | ||
1661 | 766 | EXPECT_TRUE(buffers[i-1]->wait_ready(5s)); | ||
1662 | 767 | } | ||
1663 | 768 | |||
1664 | 769 | for(auto i = 0u; i < num_buffers - 1; i++) | ||
1665 | 770 | EXPECT_TRUE(buffers[i]->is_ready()); | ||
1666 | 771 | EXPECT_FALSE(buffers[4]->is_ready()); | ||
1667 | 772 | } | ||
1668 | 773 | |||
1669 | 774 | TEST_F(PresentationChain, fifo_queues_clears_out_on_transition_to_mailbox) | ||
1670 | 775 | { | ||
1671 | 776 | SurfaceWithChainFromStart window( | ||
1672 | 777 | connection, mir_present_mode_fifo, size, pf); | ||
1673 | 778 | int const num_buffers = 5; | ||
1674 | 779 | std::atomic<unsigned int> counter{ 0u }; | ||
1675 | 780 | std::array<std::unique_ptr<TrackedBuffer>, num_buffers> buffers; | ||
1676 | 781 | for (auto& buffer : buffers) | ||
1677 | 782 | buffer = std::make_unique<TrackedBuffer>(connection, counter); | ||
1678 | 783 | |||
1679 | 784 | auto const stall = mir::raii::paired_calls( | ||
1680 | 785 | [this] { stall_compositor = true; }, | ||
1681 | 786 | [this] { stall_compositor = false; }); | ||
1682 | 787 | for (auto& b : buffers) | ||
1683 | 788 | b->submit_to(window.chain()); | ||
1684 | 789 | for (auto &b : buffers) | ||
1685 | 790 | EXPECT_FALSE(b->is_ready()); | ||
1686 | 791 | |||
1687 | 792 | mir_presentation_chain_set_mode(window.chain(), mir_present_mode_mailbox); | ||
1688 | 793 | |||
1689 | 794 | for (auto i = 0u; i < buffers.size() - 1; i++) | ||
1690 | 795 | EXPECT_TRUE(buffers[i]->wait_ready(5s)); | ||
1691 | 796 | } | ||
1692 | 797 | >>>>>>> MERGE-SOURCE | ||
1693 | 626 | 798 | ||
1694 | === modified file 'tests/unit-tests/compositor/test_multi_monitor_arbiter.cpp' | |||
1695 | === modified file 'tests/unit-tests/frontend/test_session_mediator.cpp' | |||
1696 | === modified file 'tests/unit-tests/input/test_default_device.cpp' | |||
1697 | --- tests/unit-tests/input/test_default_device.cpp 2017-05-08 03:04:26 +0000 | |||
1698 | +++ tests/unit-tests/input/test_default_device.cpp 2017-05-26 09:20:21 +0000 | |||
1699 | @@ -183,6 +183,7 @@ | |||
1700 | 183 | 183 | ||
1701 | 184 | queue->dispatch(md::FdEvent::readable); | 184 | queue->dispatch(md::FdEvent::readable); |
1702 | 185 | } | 185 | } |
1703 | 186 | <<<<<<< TREE | ||
1704 | 186 | 187 | ||
1705 | 187 | TEST_F(DefaultDevice, touchpad_device_can_be_constructed_from_input_config) | 188 | TEST_F(DefaultDevice, touchpad_device_can_be_constructed_from_input_config) |
1706 | 188 | { | 189 | { |
1707 | @@ -339,3 +340,28 @@ | |||
1708 | 339 | conf.set_keyboard_config(kbd_config); | 340 | conf.set_keyboard_config(kbd_config); |
1709 | 340 | EXPECT_NO_THROW(mi::DefaultDevice dev(conf, queue, keyboard, mt::fake_shared(key_mapper), change_callback)); | 341 | EXPECT_NO_THROW(mi::DefaultDevice dev(conf, queue, keyboard, mt::fake_shared(key_mapper), change_callback)); |
1710 | 341 | } | 342 | } |
1711 | 343 | ======= | ||
1712 | 344 | |||
1713 | 345 | TEST_F(DefaultDevice, disable_queue_ends_config_processing) | ||
1714 | 346 | { | ||
1715 | 347 | mi::DefaultDevice dev(MirInputDeviceId{17}, queue, touchpad, mt::fake_shared(key_mapper)); | ||
1716 | 348 | |||
1717 | 349 | dev.disable_queue(); | ||
1718 | 350 | MirPointerConfig pointer_conf; | ||
1719 | 351 | pointer_conf.cursor_acceleration_bias(1.0); | ||
1720 | 352 | |||
1721 | 353 | EXPECT_CALL(touchpad, apply_settings(Matcher<mi::TouchpadSettings const&>(_))).Times(0); | ||
1722 | 354 | dev.apply_pointer_configuration(pointer_conf); | ||
1723 | 355 | } | ||
1724 | 356 | |||
1725 | 357 | TEST_F(DefaultDevice, disable_queue_removes_reference_to_queue) | ||
1726 | 358 | { | ||
1727 | 359 | std::weak_ptr<md::ActionQueue> ref = queue; | ||
1728 | 360 | mi::DefaultDevice dev(MirInputDeviceId{17}, queue, touchpad, mt::fake_shared(key_mapper)); | ||
1729 | 361 | queue.reset(); | ||
1730 | 362 | |||
1731 | 363 | EXPECT_THAT(ref.lock(), Ne(nullptr)); | ||
1732 | 364 | dev.disable_queue(); | ||
1733 | 365 | EXPECT_THAT(ref.lock(), Eq(nullptr)); | ||
1734 | 366 | } | ||
1735 | 367 | >>>>>>> MERGE-SOURCE | ||
1736 | 342 | 368 | ||
1737 | === modified file 'tests/unit-tests/input/test_default_input_device_hub.cpp' | |||
1738 | --- tests/unit-tests/input/test_default_input_device_hub.cpp 2017-05-08 03:04:26 +0000 | |||
1739 | +++ tests/unit-tests/input/test_default_input_device_hub.cpp 2017-05-26 09:20:21 +0000 | |||
1740 | @@ -238,6 +238,7 @@ | |||
1741 | 238 | 238 | ||
1742 | 239 | hub.remove_device(mt::fake_shared(device)); | 239 | hub.remove_device(mt::fake_shared(device)); |
1743 | 240 | hub.remove_device(mt::fake_shared(another_device)); | 240 | hub.remove_device(mt::fake_shared(another_device)); |
1744 | 241 | <<<<<<< TREE | ||
1745 | 241 | } | 242 | } |
1746 | 242 | 243 | ||
1747 | 243 | TEST_F(InputDeviceHubTest, when_pointer_configuration_is_applied_successfully_observer_is_triggerd) | 244 | TEST_F(InputDeviceHubTest, when_pointer_configuration_is_applied_successfully_observer_is_triggerd) |
1748 | @@ -359,3 +360,26 @@ | |||
1749 | 359 | hub.remove_device(mt::fake_shared(mouse)); | 360 | hub.remove_device(mt::fake_shared(mouse)); |
1750 | 360 | expect_and_execute_multiplexer(); | 361 | expect_and_execute_multiplexer(); |
1751 | 361 | } | 362 | } |
1752 | 363 | ======= | ||
1753 | 364 | observer_loop.trigger_server_actions(); | ||
1754 | 365 | } | ||
1755 | 366 | |||
1756 | 367 | TEST_F(InputDeviceHubTest, no_device_config_action_after_device_removal) | ||
1757 | 368 | { | ||
1758 | 369 | std::shared_ptr<mi::Device> dev_ptr; | ||
1759 | 370 | MirPointerConfig ptr_config; | ||
1760 | 371 | ptr_config.cursor_acceleration_bias(0.5); | ||
1761 | 372 | |||
1762 | 373 | ON_CALL(mock_observer, device_added(WithName("mouse"))).WillByDefault(SaveArg<0>(&dev_ptr)); | ||
1763 | 374 | |||
1764 | 375 | hub.add_device(mt::fake_shared(mouse)); | ||
1765 | 376 | hub.add_observer(mt::fake_shared(mock_observer)); | ||
1766 | 377 | observer_loop.trigger_server_actions(); | ||
1767 | 378 | |||
1768 | 379 | EXPECT_CALL(mouse, apply_settings(Matcher<mi::PointerSettings const&>(_))).Times(0); | ||
1769 | 380 | |||
1770 | 381 | dev_ptr->apply_pointer_configuration(ptr_config); | ||
1771 | 382 | hub.remove_device(mt::fake_shared(mouse)); | ||
1772 | 383 | observer_loop.trigger_server_actions(); | ||
1773 | 384 | } | ||
1774 | 385 | >>>>>>> MERGE-SOURCE | ||
1775 | 362 | 386 | ||
1776 | === modified file 'tests/unit-tests/platforms/mesa/client/test_client_platform.cpp' | |||
1777 | === modified file 'tests/unit-tests/platforms/nested/mir_display_configuration_builder.cpp' | |||
1778 | --- tests/unit-tests/platforms/nested/mir_display_configuration_builder.cpp 2017-05-08 03:04:26 +0000 | |||
1779 | +++ tests/unit-tests/platforms/nested/mir_display_configuration_builder.cpp 2017-05-26 09:20:21 +0000 | |||
1780 | @@ -81,11 +81,15 @@ | |||
1781 | 81 | output->set_power_mode(mir_power_mode_on); | 81 | output->set_power_mode(mir_power_mode_on); |
1782 | 82 | output->set_orientation(mir_orientation_normal); | 82 | output->set_orientation(mir_orientation_normal); |
1783 | 83 | output->set_edid(valid_edid, sizeof(valid_edid)); | 83 | output->set_edid(valid_edid, sizeof(valid_edid)); |
1784 | 84 | <<<<<<< TREE | ||
1785 | 84 | output->set_subpixel_arrangement(mir_subpixel_arrangement_horizontal_rgb); | 85 | output->set_subpixel_arrangement(mir_subpixel_arrangement_horizontal_rgb); |
1786 | 85 | 86 | ||
1787 | 86 | auto const& current_mode = output->mode(output->current_mode()); | 87 | auto const& current_mode = output->mode(output->current_mode()); |
1788 | 87 | output->set_logical_width(current_mode.horizontal_resolution()); | 88 | output->set_logical_width(current_mode.horizontal_resolution()); |
1789 | 88 | output->set_logical_height(current_mode.vertical_resolution()); | 89 | output->set_logical_height(current_mode.vertical_resolution()); |
1790 | 90 | ======= | ||
1791 | 91 | output->set_subpixel_arrangement(mir_subpixel_arrangement_horizontal_rgb); | ||
1792 | 92 | >>>>>>> MERGE-SOURCE | ||
1793 | 89 | 93 | ||
1794 | 90 | return std::make_shared<MirDisplayConfig>(conf); | 94 | return std::make_shared<MirDisplayConfig>(conf); |
1795 | 91 | } | 95 | } |
1796 | @@ -126,11 +130,15 @@ | |||
1797 | 126 | output->set_power_mode(mir_power_mode_on); | 130 | output->set_power_mode(mir_power_mode_on); |
1798 | 127 | output->set_orientation(mir_orientation_normal); | 131 | output->set_orientation(mir_orientation_normal); |
1799 | 128 | output->set_edid(valid_edid, sizeof(valid_edid)); | 132 | output->set_edid(valid_edid, sizeof(valid_edid)); |
1800 | 133 | <<<<<<< TREE | ||
1801 | 129 | output->set_subpixel_arrangement(mir_subpixel_arrangement_horizontal_rgb); | 134 | output->set_subpixel_arrangement(mir_subpixel_arrangement_horizontal_rgb); |
1802 | 130 | 135 | ||
1803 | 131 | auto const& current_mode = output->mode(output->current_mode()); | 136 | auto const& current_mode = output->mode(output->current_mode()); |
1804 | 132 | output->set_logical_width(current_mode.horizontal_resolution()); | 137 | output->set_logical_width(current_mode.horizontal_resolution()); |
1805 | 133 | output->set_logical_height(current_mode.vertical_resolution()); | 138 | output->set_logical_height(current_mode.vertical_resolution()); |
1806 | 139 | ======= | ||
1807 | 140 | output->set_subpixel_arrangement(mir_subpixel_arrangement_horizontal_rgb); | ||
1808 | 141 | >>>>>>> MERGE-SOURCE | ||
1809 | 134 | } | 142 | } |
1810 | 135 | 143 | ||
1811 | 136 | return std::make_shared<MirDisplayConfig>(conf); | 144 | return std::make_shared<MirDisplayConfig>(conf); |