Merge lp:~alan-griffiths/mir/fix-1199756 into lp:~mir-team/mir/trunk
- fix-1199756
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Alan Griffiths | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 849 | ||||
Proposed branch: | lp:~alan-griffiths/mir/fix-1199756 | ||||
Merge into: | lp:~mir-team/mir/trunk | ||||
Diff against target: |
1361 lines (+137/-169) 69 files modified
examples/demo-inprocess-surface-client/inprocess_egl_client.cpp (+1/-2) examples/render_surfaces.cpp (+3/-7) include/shared/mir/geometry/size.h (+4/-3) include/test/mir_test_doubles/mock_input_info.h (+1/-1) include/test/mir_test_doubles/mock_surface_info.h (+1/-1) include/test/mir_test_doubles/stub_buffer.h (+1/-1) src/client/android/android_client_buffer.cpp (+1/-2) src/server/graphics/android/buffer.cpp (+1/-2) src/server/graphics/android/fb_device.cpp (+1/-2) src/server/graphics/android/hwc11_device.cpp (+1/-1) src/server/graphics/gbm/gbm_buffer.cpp (+1/-2) src/server/graphics/gbm/gbm_cursor.cpp (+2/-3) src/server/graphics/gbm/kms_display_configuration.cpp (+2/-4) src/server/graphics/gbm/kms_output.cpp (+1/-1) src/server/shell/surface_creation_parameters.cpp (+1/-1) tests/acceptance-tests/test_client_input.cpp (+7/-8) tests/acceptance-tests/test_surfaceloop.cpp (+1/-1) tests/integration-tests/client/test_client_render.cpp (+1/-1) tests/integration-tests/compositor/test_buffer_stream.cpp (+2/-2) tests/integration-tests/compositor/test_swapping_swappers.cpp (+1/-1) tests/integration-tests/graphics/android/test_buffer_integration.cpp (+1/-2) tests/integration-tests/graphics/android/test_internal_client.cpp (+1/-2) tests/integration-tests/graphics/gbm/test_buffer_integration.cpp (+1/-1) tests/integration-tests/input/android/test_android_cursor_listener.cpp (+1/-1) tests/integration-tests/input/android/test_android_input_manager.cpp (+1/-3) tests/integration-tests/test_display_info.cpp (+1/-1) tests/integration-tests/test_surface_first_frame_sync.cpp (+1/-2) tests/integration-tests/test_surfaceloop.cpp (+2/-3) tests/mir_test_doubles/mock_drm.cpp (+1/-1) tests/mir_test_framework/input_testing_server_options.cpp (+1/-2) tests/mir_test_framework/testing_server_options.cpp (+1/-3) tests/unit-tests/client/android/test_client_android_registrar.cpp (+2/-2) tests/unit-tests/compositor/test_buffer_properties.cpp (+2/-2) tests/unit-tests/compositor/test_buffer_stream.cpp (+2/-3) tests/unit-tests/compositor/test_swapper_factory.cpp (+2/-2) tests/unit-tests/compositor/test_switching_bundle.cpp (+2/-2) tests/unit-tests/compositor/test_temporary_buffers.cpp (+1/-1) tests/unit-tests/geometry/test-rectangle.cpp (+1/-1) tests/unit-tests/geometry/test-size.cpp (+1/-1) tests/unit-tests/graphics/android/test_android_alloc_adaptor.cpp (+1/-1) tests/unit-tests/graphics/android/test_android_buffer_allocator.cpp (+2/-2) tests/unit-tests/graphics/android/test_buffer.cpp (+2/-3) tests/unit-tests/graphics/android/test_buffer_tex_bind.cpp (+1/-1) tests/unit-tests/graphics/android/test_framebuffer_factory.cpp (+1/-1) tests/unit-tests/graphics/android/test_hwc10_device.cpp (+1/-1) tests/unit-tests/graphics/android/test_hwc_display.cpp (+1/-1) tests/unit-tests/graphics/android/test_hwc_layerlist.cpp (+4/-5) tests/unit-tests/graphics/android/test_internal_client.cpp (+1/-1) tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp (+1/-1) tests/unit-tests/graphics/android/test_server_interpreter.cpp (+1/-1) tests/unit-tests/graphics/gbm/test_gbm_buffer.cpp (+1/-1) tests/unit-tests/graphics/gbm/test_gbm_buffer_allocator.cpp (+1/-1) tests/unit-tests/graphics/gbm/test_gbm_display_configuration.cpp (+4/-4) tests/unit-tests/graphics/gbm/test_gbm_display_multi_monitor.cpp (+1/-1) tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp (+1/-2) tests/unit-tests/graphics/test_default_display_configuration_policy.cpp (+8/-8) tests/unit-tests/graphics/test_display_configuration.cpp (+13/-13) tests/unit-tests/graphics/test_gl_pixel_buffer.cpp (+1/-2) tests/unit-tests/graphics/test_graphics_platform.cpp (+1/-1) tests/unit-tests/input/android/test_android_input_manager.cpp (+1/-2) tests/unit-tests/input/android/test_android_input_reader_policy.cpp (+1/-2) tests/unit-tests/input/android/test_android_input_window_handle.cpp (+1/-2) tests/unit-tests/input/android/test_android_pointer_controller.cpp (+1/-2) tests/unit-tests/input/test_input_surface_info.cpp (+3/-3) tests/unit-tests/shell/test_consuming_placement_strategy.cpp (+2/-3) tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp (+1/-1) tests/unit-tests/surfaces/test_surface.cpp (+7/-7) tests/unit-tests/surfaces/test_surface_info.cpp (+1/-1) tests/unit-tests/surfaces/test_surface_stack.cpp (+13/-14) |
||||
To merge this branch: | bzr merge lp:~alan-griffiths/mir/fix-1199756 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Alexandros Frantzis (community) | Approve | ||
Review via email:
|
Commit message
geometry: make geometry compound types easier to construct
Description of the change
geometry: make geometry compound types easier to construct
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:846
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:847
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'examples/demo-inprocess-surface-client/inprocess_egl_client.cpp' |
2 | --- examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2013-07-08 10:32:48 +0000 |
3 | +++ examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2013-07-12 11:57:23 +0000 |
4 | @@ -72,8 +72,7 @@ |
5 | |
6 | void me::InprocessEGLClient::thread_loop() |
7 | { |
8 | - geom::Size const surface_size = geom::Size{geom::Width{512}, |
9 | - geom::Height{512}}; |
10 | + geom::Size const surface_size{512, 512}; |
11 | |
12 | ///\internal [setup_tag] |
13 | auto params = msh::a_surface().of_name("Inprocess EGL Demo") |
14 | |
15 | === modified file 'examples/render_surfaces.cpp' |
16 | --- examples/render_surfaces.cpp 2013-07-10 17:06:37 +0000 |
17 | +++ examples/render_surfaces.cpp 2013-07-12 11:57:23 +0000 |
18 | @@ -102,9 +102,7 @@ |
19 | image[(i+1) * height + i] = fg_color; |
20 | image[i * height + i + 1] = fg_color; |
21 | } |
22 | - cursor->set_image( |
23 | - image.data(), |
24 | - geom::Size{ geom::Width(width), geom::Height(height) }); |
25 | + cursor->set_image(image.data(), geom::Size{width, height}); |
26 | } |
27 | } |
28 | |
29 | @@ -286,8 +284,7 @@ |
30 | public: |
31 | RenderResourcesBufferInitializer() |
32 | : img_renderer{mir_image.pixel_data, |
33 | - geom::Size{geom::Width{mir_image.width}, |
34 | - geom::Height{mir_image.height}}, |
35 | + geom::Size{mir_image.width, mir_image.height}, |
36 | mir_image.bytes_per_pixel} |
37 | { |
38 | } |
39 | @@ -368,8 +365,7 @@ |
40 | auto const surface_builder = the_surface_builder(); |
41 | geom::Size const display_size{display->view_area().size}; |
42 | uint32_t const surface_side{300}; |
43 | - geom::Size const surface_size{geom::Width{surface_side}, |
44 | - geom::Height{surface_side}}; |
45 | + geom::Size const surface_size{surface_side, surface_side}; |
46 | |
47 | float const angular_step = 2.0 * M_PI / moveables.size(); |
48 | float const w = display_size.width.as_uint32_t(); |
49 | |
50 | === modified file 'include/shared/mir/geometry/size.h' |
51 | --- include/shared/mir/geometry/size.h 2013-04-24 05:22:20 +0000 |
52 | +++ include/shared/mir/geometry/size.h 2013-07-12 11:57:23 +0000 |
53 | @@ -30,10 +30,11 @@ |
54 | struct Size |
55 | { |
56 | Size() {} |
57 | + Size(Size const&) = default; |
58 | + Size& operator=(Size const&) = default; |
59 | |
60 | - Size(const Width& w, const Height& h) : width {w}, height {h} |
61 | - { |
62 | - } |
63 | + template<typename WidthType, typename HeightType> |
64 | + Size(WidthType&& width, HeightType&& height) : width(width), height(height) {} |
65 | |
66 | Width width; |
67 | Height height; |
68 | |
69 | === modified file 'include/test/mir_test_doubles/mock_input_info.h' |
70 | --- include/test/mir_test_doubles/mock_input_info.h 2013-07-10 17:06:37 +0000 |
71 | +++ include/test/mir_test_doubles/mock_input_info.h 2013-07-12 11:57:23 +0000 |
72 | @@ -39,7 +39,7 @@ |
73 | .WillByDefault( |
74 | Return(geometry::Rectangle{ |
75 | geometry::Point{}, |
76 | - geometry::Size{geometry::Width{}, geometry::Height{}}})); |
77 | + geometry::Size{}})); |
78 | static std::string n; |
79 | ON_CALL(*this, name()) |
80 | .WillByDefault(testing::ReturnRef(n)); |
81 | |
82 | === modified file 'include/test/mir_test_doubles/mock_surface_info.h' |
83 | --- include/test/mir_test_doubles/mock_surface_info.h 2013-07-10 17:06:37 +0000 |
84 | +++ include/test/mir_test_doubles/mock_surface_info.h 2013-07-12 11:57:23 +0000 |
85 | @@ -39,7 +39,7 @@ |
86 | .WillByDefault( |
87 | Return(geometry::Rectangle{ |
88 | geometry::Point{}, |
89 | - geometry::Size{geometry::Width{}, geometry::Height{}}})); |
90 | + geometry::Size{}})); |
91 | static std::string n; |
92 | ON_CALL(*this, name()) |
93 | .WillByDefault(testing::ReturnRef(n)); |
94 | |
95 | === modified file 'include/test/mir_test_doubles/stub_buffer.h' |
96 | --- include/test/mir_test_doubles/stub_buffer.h 2013-05-14 21:39:52 +0000 |
97 | +++ include/test/mir_test_doubles/stub_buffer.h 2013-07-12 11:57:23 +0000 |
98 | @@ -35,7 +35,7 @@ |
99 | { |
100 | public: |
101 | StubBuffer() |
102 | - : buf_size{geometry::Size{geometry::Width{0}, geometry::Height{0}}}, |
103 | + : buf_size{0, 0}, |
104 | buf_pixel_format{geometry::PixelFormat::abgr_8888} |
105 | { |
106 | } |
107 | |
108 | === modified file 'src/client/android/android_client_buffer.cpp' |
109 | --- src/client/android/android_client_buffer.cpp 2013-07-10 17:06:37 +0000 |
110 | +++ src/client/android/android_client_buffer.cpp 2013-07-12 11:57:23 +0000 |
111 | @@ -66,8 +66,7 @@ |
112 | |
113 | geom::Size mcla::AndroidClientBuffer::size() const |
114 | { |
115 | - return geom::Size{geom::Width{native_window_buffer->width}, |
116 | - geom::Height{native_window_buffer->height}}; |
117 | + return {native_window_buffer->width, native_window_buffer->height}; |
118 | } |
119 | |
120 | geom::Stride mcla::AndroidClientBuffer::stride() const |
121 | |
122 | === modified file 'src/server/graphics/android/buffer.cpp' |
123 | --- src/server/graphics/android/buffer.cpp 2013-06-14 19:30:20 +0000 |
124 | +++ src/server/graphics/android/buffer.cpp 2013-07-12 11:57:23 +0000 |
125 | @@ -51,8 +51,7 @@ |
126 | |
127 | geom::Size mga::Buffer::size() const |
128 | { |
129 | - return geom::Size{geom::Width{native_buffer->width}, |
130 | - geom::Height{native_buffer->height}}; |
131 | + return {native_buffer->width, native_buffer->height}; |
132 | } |
133 | |
134 | geom::Stride mga::Buffer::stride() const |
135 | |
136 | === modified file 'src/server/graphics/android/fb_device.cpp' |
137 | --- src/server/graphics/android/fb_device.cpp 2013-05-17 20:29:13 +0000 |
138 | +++ src/server/graphics/android/fb_device.cpp 2013-07-12 11:57:23 +0000 |
139 | @@ -50,8 +50,7 @@ |
140 | |
141 | geom::Size mga::FBDevice::display_size() const |
142 | { |
143 | - return geom::Size{geom::Width{fb_device->width}, |
144 | - geom::Height{fb_device->height}}; |
145 | + return {fb_device->width, fb_device->height}; |
146 | } |
147 | |
148 | geom::PixelFormat mga::FBDevice::display_format() const |
149 | |
150 | === modified file 'src/server/graphics/android/hwc11_device.cpp' |
151 | --- src/server/graphics/android/hwc11_device.cpp 2013-05-17 20:17:16 +0000 |
152 | +++ src/server/graphics/android/hwc11_device.cpp 2013-07-12 11:57:23 +0000 |
153 | @@ -60,7 +60,7 @@ |
154 | hwc_device->getDisplayAttributes(hwc_device.get(), HWC_DISPLAY_PRIMARY, primary_display_config, |
155 | size_request, size_values); |
156 | |
157 | - return geom::Size{geom::Width{size_values[0]}, geom::Height{size_values[1]}}; |
158 | + return {size_values[0], size_values[1]}; |
159 | } |
160 | |
161 | geom::PixelFormat mga::HWC11Device::display_format() const |
162 | |
163 | === modified file 'src/server/graphics/gbm/gbm_buffer.cpp' |
164 | --- src/server/graphics/gbm/gbm_buffer.cpp 2013-05-29 04:53:18 +0000 |
165 | +++ src/server/graphics/gbm/gbm_buffer.cpp 2013-07-12 11:57:23 +0000 |
166 | @@ -104,8 +104,7 @@ |
167 | |
168 | geom::Size mgg::GBMBuffer::size() const |
169 | { |
170 | - return {geom::Width{gbm_bo_get_width(gbm_handle.get())}, |
171 | - geom::Height{gbm_bo_get_height(gbm_handle.get())}}; |
172 | + return {gbm_bo_get_width(gbm_handle.get()), gbm_bo_get_height(gbm_handle.get())}; |
173 | } |
174 | |
175 | geom::Stride mgg::GBMBuffer::stride() const |
176 | |
177 | === modified file 'src/server/graphics/gbm/gbm_cursor.cpp' |
178 | --- src/server/graphics/gbm/gbm_cursor.cpp 2013-06-06 10:47:23 +0000 |
179 | +++ src/server/graphics/gbm/gbm_cursor.cpp 2013-07-12 11:57:23 +0000 |
180 | @@ -56,8 +56,7 @@ |
181 | current_position(), |
182 | buffer(*platform) |
183 | { |
184 | - set_image(black_arrow.pixel_data, |
185 | - geometry::Size{geometry::Width(width), geometry::Height(height)}); |
186 | + set_image(black_arrow.pixel_data, geometry::Size{width, height}); |
187 | |
188 | show_at_last_known_position(); |
189 | } |
190 | @@ -69,7 +68,7 @@ |
191 | |
192 | void mgg::GBMCursor::set_image(const void* raw_argb, geometry::Size size) |
193 | { |
194 | - if (size != geometry::Size{geometry::Width(width), geometry::Height(height)}) |
195 | + if (size != geometry::Size{width, height}) |
196 | BOOST_THROW_EXCEPTION(std::logic_error("No support for cursors that aren't 64x64")); |
197 | |
198 | auto const count = size.width.as_uint32_t() * size.height.as_uint32_t() * sizeof(uint32_t); |
199 | |
200 | === modified file 'src/server/graphics/gbm/kms_display_configuration.cpp' |
201 | --- src/server/graphics/gbm/kms_display_configuration.cpp 2013-07-10 16:55:22 +0000 |
202 | +++ src/server/graphics/gbm/kms_display_configuration.cpp 2013-07-12 11:57:23 +0000 |
203 | @@ -149,8 +149,7 @@ |
204 | { |
205 | DisplayConfigurationOutputId id{static_cast<int>(connector.connector_id)}; |
206 | DisplayConfigurationCardId card_id{0}; |
207 | - geom::Size physical_size{geom::Width{connector.mmWidth}, |
208 | - geom::Height{connector.mmHeight}}; |
209 | + geom::Size physical_size{connector.mmWidth, connector.mmHeight}; |
210 | bool connected{connector.connection == DRM_MODE_CONNECTED}; |
211 | size_t current_mode_index{std::numeric_limits<size_t>::max()}; |
212 | std::vector<DisplayConfigurationMode> modes; |
213 | @@ -170,8 +169,7 @@ |
214 | { |
215 | drmModeModeInfo& mode_info = connector.modes[m]; |
216 | |
217 | - geom::Size size{geom::Width{mode_info.hdisplay}, |
218 | - geom::Height{mode_info.vdisplay}}; |
219 | + geom::Size size{mode_info.hdisplay, mode_info.vdisplay}; |
220 | |
221 | double vrefresh_hz = calculate_vrefresh_hz(mode_info); |
222 | |
223 | |
224 | === modified file 'src/server/graphics/gbm/kms_output.cpp' |
225 | --- src/server/graphics/gbm/kms_output.cpp 2013-05-03 22:08:24 +0000 |
226 | +++ src/server/graphics/gbm/kms_output.cpp 2013-07-12 11:57:23 +0000 |
227 | @@ -132,7 +132,7 @@ |
228 | geom::Size mgg::KMSOutput::size() const |
229 | { |
230 | drmModeModeInfo const& mode(connector->modes[mode_index]); |
231 | - return geom::Size{geom::Width{mode.hdisplay}, geom::Height{mode.vdisplay}}; |
232 | + return {mode.hdisplay, mode.vdisplay}; |
233 | } |
234 | |
235 | bool mgg::KMSOutput::set_crtc(uint32_t fb_id) |
236 | |
237 | === modified file 'src/server/shell/surface_creation_parameters.cpp' |
238 | --- src/server/shell/surface_creation_parameters.cpp 2013-05-21 17:16:43 +0000 |
239 | +++ src/server/shell/surface_creation_parameters.cpp 2013-07-12 11:57:23 +0000 |
240 | @@ -47,7 +47,7 @@ |
241 | geometry::Width::ValueType width, |
242 | geometry::Height::ValueType height) |
243 | { |
244 | - return of_size(geometry::Size(geometry::Width(width), geometry::Height(height))); |
245 | + return of_size({width, height}); |
246 | } |
247 | |
248 | msh::SurfaceCreationParameters& msh::SurfaceCreationParameters::of_position(geometry::Point const& new_top_left) |
249 | |
250 | === modified file 'tests/acceptance-tests/test_client_input.cpp' |
251 | --- tests/acceptance-tests/test_client_input.cpp 2013-07-11 13:41:09 +0000 |
252 | +++ tests/acceptance-tests/test_client_input.cpp 2013-07-12 11:57:23 +0000 |
253 | @@ -477,17 +477,16 @@ |
254 | { |
255 | static GeometryList positions; |
256 | positions[test_client_1] = geom::Rectangle{geom::Point{0, 0}, |
257 | - geom::Size{geom::Width{client_width}, geom::Height{client_height}}}; |
258 | + geom::Size{client_width, client_height}}; |
259 | positions[test_client_2] = geom::Rectangle{geom::Point{screen_width/2, screen_height/2}, |
260 | - geom::Size{geom::Width{client_width}, geom::Height{client_height}}}; |
261 | + geom::Size{client_width, client_height}}; |
262 | |
263 | return std::make_shared<StaticPlacementStrategy>(positions); |
264 | } |
265 | |
266 | geom::Rectangle the_screen_geometry() override |
267 | { |
268 | - return geom::Rectangle{geom::Point{0, 0}, |
269 | - geom::Size{geom::Width{screen_width}, geom::Height{screen_height}}}; |
270 | + return geom::Rectangle{geom::Point{0, 0}, geom::Size{screen_width, screen_height}}; |
271 | } |
272 | |
273 | void inject_input() override |
274 | @@ -575,11 +574,11 @@ |
275 | static int const screen_height = 100; |
276 | |
277 | static geom::Rectangle const screen_geometry{geom::Point{0, 0}, |
278 | - geom::Size{geom::Width{screen_width}, geom::Height{screen_height}}}; |
279 | + geom::Size{screen_width, screen_height}}; |
280 | |
281 | static std::initializer_list<geom::Rectangle> client_input_regions = { |
282 | - {geom::Point{0, 0}, {geom::Width{screen_width-80}, geom::Height{screen_height}}}, |
283 | - {geom::Point{screen_width-20, 0}, {geom::Width{screen_width-80}, geom::Height{screen_height}}} |
284 | + {geom::Point{0, 0}, {screen_width-80, screen_height}}, |
285 | + {geom::Point{screen_width-20, 0}, {screen_width-80, screen_height}} |
286 | }; |
287 | |
288 | struct ServerConfiguration : mtf::InputTestingServerConfiguration |
289 | @@ -682,7 +681,7 @@ |
290 | static int const screen_height = 100; |
291 | |
292 | static geom::Rectangle const screen_geometry{geom::Point{0, 0}, |
293 | - geom::Size{geom::Width{screen_width}, geom::Height{screen_height}}}; |
294 | + geom::Size{screen_width, screen_height}}; |
295 | |
296 | struct ServerConiguration : mtf::InputTestingServerConfiguration |
297 | { |
298 | |
299 | === modified file 'tests/acceptance-tests/test_surfaceloop.cpp' |
300 | --- tests/acceptance-tests/test_surfaceloop.cpp 2013-06-03 08:14:01 +0000 |
301 | +++ tests/acceptance-tests/test_surfaceloop.cpp 2013-07-12 11:57:23 +0000 |
302 | @@ -39,7 +39,7 @@ |
303 | { |
304 | char const* const mir_test_socket = mtf::test_socket_file().c_str(); |
305 | |
306 | -geom::Size const size{geom::Width{640}, geom::Height{480}}; |
307 | +geom::Size const size{640, 480}; |
308 | geom::PixelFormat const format{geom::PixelFormat::abgr_8888}; |
309 | } |
310 | |
311 | |
312 | === modified file 'tests/integration-tests/client/test_client_render.cpp' |
313 | --- tests/integration-tests/client/test_client_render.cpp 2013-06-20 11:55:33 +0000 |
314 | +++ tests/integration-tests/client/test_client_render.cpp 2013-07-12 11:57:23 +0000 |
315 | @@ -448,7 +448,7 @@ |
316 | void SetUp() { |
317 | ASSERT_FALSE(mtd::is_surface_flinger_running()); |
318 | |
319 | - size = geom::Size{geom::Width{test_width}, geom::Height{test_height}}; |
320 | + size = geom::Size{test_width, test_height}; |
321 | pf = geom::PixelFormat::abgr_8888; |
322 | |
323 | auto initializer = std::make_shared<mg::NullBufferInitializer>(); |
324 | |
325 | === modified file 'tests/integration-tests/compositor/test_buffer_stream.cpp' |
326 | --- tests/integration-tests/compositor/test_buffer_stream.cpp 2013-06-17 15:55:04 +0000 |
327 | +++ tests/integration-tests/compositor/test_buffer_stream.cpp 2013-07-12 11:57:23 +0000 |
328 | @@ -45,7 +45,7 @@ |
329 | |
330 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&) |
331 | { |
332 | - mc::BufferProperties properties{geom::Size{geom::Width{id}, geom::Height{id}}, |
333 | + mc::BufferProperties properties{geom::Size{id, id}, |
334 | geom::PixelFormat::abgr_8888, |
335 | mc::BufferUsage::hardware}; |
336 | ++id; |
337 | @@ -72,7 +72,7 @@ |
338 | { |
339 | auto allocator = std::make_shared<StubBufferAllocator>(); |
340 | auto factory = std::make_shared<mc::SwapperFactory>(allocator); |
341 | - mc::BufferProperties properties{geom::Size{geom::Width{380}, geom::Height{210}}, |
342 | + mc::BufferProperties properties{geom::Size{380, 210}, |
343 | geom::PixelFormat::abgr_8888, |
344 | mc::BufferUsage::hardware}; |
345 | |
346 | |
347 | === modified file 'tests/integration-tests/compositor/test_swapping_swappers.cpp' |
348 | --- tests/integration-tests/compositor/test_swapping_swappers.cpp 2013-06-11 19:55:10 +0000 |
349 | +++ tests/integration-tests/compositor/test_swapping_swappers.cpp 2013-07-12 11:57:23 +0000 |
350 | @@ -59,7 +59,7 @@ |
351 | { |
352 | auto allocator = std::make_shared<MockBufferAllocator>(); |
353 | auto factory = std::make_shared<mc::SwapperFactory>(allocator, 3); |
354 | - auto properties = mc::BufferProperties{geom::Size{geom::Width{380}, geom::Height{210}}, |
355 | + auto properties = mc::BufferProperties{geom::Size{380, 210}, |
356 | geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware}; |
357 | switching_bundle = std::make_shared<mc::SwitchingBundle>(factory, properties); |
358 | } |
359 | |
360 | === modified file 'tests/integration-tests/graphics/android/test_buffer_integration.cpp' |
361 | --- tests/integration-tests/graphics/android/test_buffer_integration.cpp 2013-06-11 00:05:53 +0000 |
362 | +++ tests/integration-tests/graphics/android/test_buffer_integration.cpp 2013-07-12 11:57:23 +0000 |
363 | @@ -42,8 +42,7 @@ |
364 | protected: |
365 | virtual void SetUp() |
366 | { |
367 | - size = geom::Size{geom::Width{334}, |
368 | - geom::Height{122}}; |
369 | + size = geom::Size{334, 122}; |
370 | pf = geom::PixelFormat::abgr_8888; |
371 | buffer_properties = mc::BufferProperties{size, pf, mc::BufferUsage::software}; |
372 | null_buffer_initializer = std::make_shared<mg::NullBufferInitializer>(); |
373 | |
374 | === modified file 'tests/integration-tests/graphics/android/test_internal_client.cpp' |
375 | --- tests/integration-tests/graphics/android/test_internal_client.cpp 2013-07-03 22:07:12 +0000 |
376 | +++ tests/integration-tests/graphics/android/test_internal_client.cpp 2013-07-12 11:57:23 +0000 |
377 | @@ -76,8 +76,7 @@ |
378 | |
379 | TEST_F(AndroidInternalClient, internal_client_creation_and_use) |
380 | { |
381 | - auto size = geom::Size{geom::Width{334}, |
382 | - geom::Height{122}}; |
383 | + auto size = geom::Size{334, 122}; |
384 | auto pf = geom::PixelFormat::abgr_8888; |
385 | msh::SurfaceCreationParameters params; |
386 | params.name = std::string("test"); |
387 | |
388 | === modified file 'tests/integration-tests/graphics/gbm/test_buffer_integration.cpp' |
389 | --- tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-07-10 08:50:53 +0000 |
390 | +++ tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-07-12 11:57:23 +0000 |
391 | @@ -109,7 +109,7 @@ |
392 | display = platform->create_display(conf_policy); |
393 | auto buffer_initializer = std::make_shared<mg::NullBufferInitializer>(); |
394 | allocator = platform->create_buffer_allocator(buffer_initializer); |
395 | - size = geom::Size{geom::Width{100}, geom::Height{100}}; |
396 | + size = geom::Size{100, 100}; |
397 | pf = geom::PixelFormat::abgr_8888; |
398 | usage = mc::BufferUsage::hardware; |
399 | buffer_properties = mc::BufferProperties{size, pf, usage}; |
400 | |
401 | === modified file 'tests/integration-tests/input/android/test_android_cursor_listener.cpp' |
402 | --- tests/integration-tests/input/android/test_android_cursor_listener.cpp 2013-07-01 17:01:15 +0000 |
403 | +++ tests/integration-tests/input/android/test_android_cursor_listener.cpp 2013-07-12 11:57:23 +0000 |
404 | @@ -72,7 +72,7 @@ |
405 | static const geom::Rectangle visible_rectangle |
406 | { |
407 | geom::Point(), |
408 | - geom::Size{geom::Width(1024), geom::Height(1024)} |
409 | + geom::Size{1024, 1024} |
410 | }; |
411 | |
412 | event_filter = std::make_shared<MockEventFilter>(); |
413 | |
414 | === modified file 'tests/integration-tests/input/android/test_android_input_manager.cpp' |
415 | --- tests/integration-tests/input/android/test_android_input_manager.cpp 2013-07-05 21:27:14 +0000 |
416 | +++ tests/integration-tests/input/android/test_android_input_manager.cpp 2013-07-12 11:57:23 +0000 |
417 | @@ -64,9 +64,7 @@ |
418 | { |
419 | using namespace ::testing; |
420 | |
421 | -static const geom::Rectangle default_view_area = |
422 | - geom::Rectangle{geom::Point(), |
423 | - geom::Size{geom::Width(1600), geom::Height(1400)}}; |
424 | +static const geom::Rectangle default_view_area{geom::Point(), geom::Size{1600, 1400}}; |
425 | |
426 | static const std::shared_ptr<mi::CursorListener> null_cursor_listener{}; |
427 | |
428 | |
429 | === modified file 'tests/integration-tests/test_display_info.cpp' |
430 | --- tests/integration-tests/test_display_info.cpp 2013-07-10 08:50:53 +0000 |
431 | +++ tests/integration-tests/test_display_info.cpp 2013-07-12 11:57:23 +0000 |
432 | @@ -50,7 +50,7 @@ |
433 | }; |
434 | |
435 | geom::Rectangle const StubDisplay::rectangle{geom::Point{geom::X{25}, geom::Y{36}}, |
436 | - geom::Size{geom::Width{49}, geom::Height{64}}}; |
437 | + geom::Size{49, 64}}; |
438 | |
439 | } |
440 | } |
441 | |
442 | === modified file 'tests/integration-tests/test_surface_first_frame_sync.cpp' |
443 | --- tests/integration-tests/test_surface_first_frame_sync.cpp 2013-06-28 12:00:04 +0000 |
444 | +++ tests/integration-tests/test_surface_first_frame_sync.cpp 2013-07-12 11:57:23 +0000 |
445 | @@ -105,8 +105,7 @@ |
446 | geom::Rectangle view_area() const |
447 | { |
448 | return geom::Rectangle{geom::Point(), |
449 | - geom::Size{geom::Width(1600), |
450 | - geom::Height(1600)}}; |
451 | + geom::Size{1600, 1600}}; |
452 | } |
453 | void make_current() {} |
454 | void release_current() {} |
455 | |
456 | === modified file 'tests/integration-tests/test_surfaceloop.cpp' |
457 | --- tests/integration-tests/test_surfaceloop.cpp 2013-07-10 08:50:53 +0000 |
458 | +++ tests/integration-tests/test_surfaceloop.cpp 2013-07-12 11:57:23 +0000 |
459 | @@ -50,7 +50,7 @@ |
460 | { |
461 | char const* const mir_test_socket = mtf::test_socket_file().c_str(); |
462 | |
463 | -geom::Size const size{geom::Width{640}, geom::Height{480}}; |
464 | +geom::Size const size{640, 480}; |
465 | geom::PixelFormat const format{geom::PixelFormat::abgr_8888}; |
466 | mc::BufferUsage const usage{mc::BufferUsage::hardware}; |
467 | mc::BufferProperties const buffer_properties{size, format, usage}; |
468 | @@ -97,8 +97,7 @@ |
469 | geom::Rectangle view_area() const override |
470 | { |
471 | return geom::Rectangle{geom::Point(), |
472 | - geom::Size{geom::Width(1600), |
473 | - geom::Height(1600)}}; |
474 | + geom::Size{1600, 1600}}; |
475 | } |
476 | }; |
477 | |
478 | |
479 | === modified file 'tests/mir_test_doubles/mock_drm.cpp' |
480 | --- tests/mir_test_doubles/mock_drm.cpp 2013-07-04 07:51:30 +0000 |
481 | +++ tests/mir_test_doubles/mock_drm.cpp 2013-07-12 11:57:23 +0000 |
482 | @@ -65,7 +65,7 @@ |
483 | modes_empty, connector_encoder_ids, geom::Size()); |
484 | add_connector(connector1_id, DRM_MODE_CONNECTED, encoder1_id, |
485 | modes, connector_encoder_ids, |
486 | - geom::Size{geom::Width{121}, geom::Height{144}}); |
487 | + geom::Size{121, 144}); |
488 | |
489 | prepare(); |
490 | } |
491 | |
492 | === modified file 'tests/mir_test_framework/input_testing_server_options.cpp' |
493 | --- tests/mir_test_framework/input_testing_server_options.cpp 2013-07-10 17:06:37 +0000 |
494 | +++ tests/mir_test_framework/input_testing_server_options.cpp 2013-07-12 11:57:23 +0000 |
495 | @@ -181,8 +181,7 @@ |
496 | |
497 | geom::Rectangle mtf::InputTestingServerConfiguration::the_screen_geometry() |
498 | { |
499 | - static geom::Rectangle const default_geometry{geom::Point{0, 0}, |
500 | - geom::Size{geom::Width{1600}, geom::Height{1600}}}; |
501 | + static geom::Rectangle const default_geometry{geom::Point{0, 0}, geom::Size{1600, 1600}}; |
502 | return default_geometry; |
503 | } |
504 | |
505 | |
506 | === modified file 'tests/mir_test_framework/testing_server_options.cpp' |
507 | --- tests/mir_test_framework/testing_server_options.cpp 2013-07-10 08:50:53 +0000 |
508 | +++ tests/mir_test_framework/testing_server_options.cpp 2013-07-12 11:57:23 +0000 |
509 | @@ -71,9 +71,7 @@ |
510 | public: |
511 | geom::Rectangle view_area() const override |
512 | { |
513 | - return geom::Rectangle{geom::Point(), |
514 | - geom::Size{geom::Width(1600), |
515 | - geom::Height(1600)}}; |
516 | + return geom::Rectangle{geom::Point(), geom::Size{1600, 1600}}; |
517 | } |
518 | }; |
519 | |
520 | |
521 | === modified file 'tests/unit-tests/client/android/test_client_android_registrar.cpp' |
522 | --- tests/unit-tests/client/android/test_client_android_registrar.cpp 2013-07-04 22:33:02 +0000 |
523 | +++ tests/unit-tests/client/android/test_client_android_registrar.cpp 2013-07-12 11:57:23 +0000 |
524 | @@ -103,7 +103,7 @@ |
525 | auto t = geom::X(top); |
526 | auto l = geom::Y(left); |
527 | auto pt = geom::Point{t,l}; |
528 | - rect = geom::Rectangle{ pt, {geom::Width(width), geom::Height(height)}}; |
529 | + rect = geom::Rectangle{ pt, {width, height}}; |
530 | package = std::make_shared<MirBufferPackage>(); |
531 | package->fd_items = 4; |
532 | package->data_items = 21; |
533 | @@ -214,7 +214,7 @@ |
534 | auto t = geom::X(top); |
535 | auto l = geom::Y(left); |
536 | auto pt = geom::Point{t,l}; |
537 | - rect = geom::Rectangle{ pt, {geom::Width(width), geom::Height(height)}}; |
538 | + rect = geom::Rectangle{ pt, {width, height}}; |
539 | fake_package = std::make_shared<native_handle_t>(); |
540 | } |
541 | |
542 | |
543 | === modified file 'tests/unit-tests/compositor/test_buffer_properties.cpp' |
544 | --- tests/unit-tests/compositor/test_buffer_properties.cpp 2012-12-19 16:01:00 +0000 |
545 | +++ tests/unit-tests/compositor/test_buffer_properties.cpp 2013-07-12 11:57:23 +0000 |
546 | @@ -39,7 +39,7 @@ |
547 | |
548 | TEST(buffer_properties, custom_create) |
549 | { |
550 | - geom::Size size{geom::Width{66}, geom::Height{166}}; |
551 | + geom::Size size{66, 166}; |
552 | geom::PixelFormat pixel_format{geom::PixelFormat::abgr_8888}; |
553 | mc::BufferUsage usage{mc::BufferUsage::hardware}; |
554 | |
555 | @@ -52,7 +52,7 @@ |
556 | |
557 | TEST(buffer_properties, equal_properties_test_equal) |
558 | { |
559 | - geom::Size size{geom::Width{66}, geom::Height{166}}; |
560 | + geom::Size size{66, 166}; |
561 | geom::PixelFormat pixel_format{geom::PixelFormat::abgr_8888}; |
562 | mc::BufferUsage usage{mc::BufferUsage::hardware}; |
563 | |
564 | |
565 | === modified file 'tests/unit-tests/compositor/test_buffer_stream.cpp' |
566 | --- tests/unit-tests/compositor/test_buffer_stream.cpp 2013-06-19 18:33:24 +0000 |
567 | +++ tests/unit-tests/compositor/test_buffer_stream.cpp 2013-07-12 11:57:23 +0000 |
568 | @@ -45,7 +45,7 @@ |
569 | |
570 | TEST_F(BufferStreamTest, size_query) |
571 | { |
572 | - geom::Size size{geom::Width{4},geom::Height{5}}; |
573 | + geom::Size size{4, 5}; |
574 | mc::BufferProperties properties {size, geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware}; |
575 | EXPECT_CALL(*mock_bundle, properties()) |
576 | .Times(1) |
577 | @@ -59,8 +59,7 @@ |
578 | TEST_F(BufferStreamTest, pixel_format_query) |
579 | { |
580 | geom::PixelFormat format{geom::PixelFormat::abgr_8888}; |
581 | - mc::BufferProperties properties {geom::Size{geom::Width{4},geom::Height{5}}, |
582 | - format, mc::BufferUsage::hardware}; |
583 | + mc::BufferProperties properties {geom::Size{4, 5}, format, mc::BufferUsage::hardware}; |
584 | EXPECT_CALL(*mock_bundle, properties()) |
585 | .Times(1) |
586 | .WillOnce(testing::Return(properties)); |
587 | |
588 | === modified file 'tests/unit-tests/compositor/test_swapper_factory.cpp' |
589 | --- tests/unit-tests/compositor/test_swapper_factory.cpp 2013-06-17 19:11:59 +0000 |
590 | +++ tests/unit-tests/compositor/test_swapper_factory.cpp 2013-07-12 11:57:23 +0000 |
591 | @@ -33,7 +33,7 @@ |
592 | |
593 | namespace |
594 | { |
595 | -static geom::Size const buf_size{geom::Width{100}, geom::Height{121}}; |
596 | +static geom::Size const buf_size{100, 121}; |
597 | static geom::PixelFormat const buf_pixel_format{geom::PixelFormat::xbgr_8888}; |
598 | |
599 | class MockGraphicBufferAllocator : public mc::GraphicBufferAllocator |
600 | @@ -56,7 +56,7 @@ |
601 | { |
602 | SwapperFactoryTest() |
603 | : mock_buffer_allocator{std::make_shared<testing::NiceMock<MockGraphicBufferAllocator>>()}, |
604 | - size{geom::Width{10},geom::Height{20}}, |
605 | + size{10, 20}, |
606 | pf{geom::PixelFormat::abgr_8888}, |
607 | usage{mc::BufferUsage::hardware}, |
608 | properties{size, pf, usage} |
609 | |
610 | === modified file 'tests/unit-tests/compositor/test_switching_bundle.cpp' |
611 | --- tests/unit-tests/compositor/test_switching_bundle.cpp 2013-06-14 00:08:30 +0000 |
612 | +++ tests/unit-tests/compositor/test_switching_bundle.cpp 2013-07-12 11:57:23 +0000 |
613 | @@ -37,7 +37,7 @@ |
614 | mock_default_swapper = std::make_shared<testing::NiceMock<mtd::MockSwapper>>(); |
615 | mock_secondary_swapper = std::make_shared<testing::NiceMock<mtd::MockSwapper>>(); |
616 | stub_buffer = std::make_shared<mtd::StubBuffer>(); |
617 | - properties = mc::BufferProperties{geom::Size{geom::Width{4}, geom::Height{2}}, |
618 | + properties = mc::BufferProperties{geom::Size{4, 2}, |
619 | geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware}; |
620 | |
621 | ON_CALL(*mock_swapper_factory, create_swapper_new_buffers(_,_,_)) |
622 | @@ -54,7 +54,7 @@ |
623 | TEST_F(SwitchingBundleTest, sync_swapper_by_default) |
624 | { |
625 | using namespace testing; |
626 | - auto actual_properties = mc::BufferProperties{geom::Size{geom::Width{7}, geom::Height{8}}, |
627 | + auto actual_properties = mc::BufferProperties{geom::Size{7, 8}, |
628 | geom::PixelFormat::argb_8888, mc::BufferUsage::software}; |
629 | EXPECT_CALL(*mock_swapper_factory, create_swapper_new_buffers(_,_,mc::SwapperType::synchronous)) |
630 | .Times(1) |
631 | |
632 | === modified file 'tests/unit-tests/compositor/test_temporary_buffers.cpp' |
633 | --- tests/unit-tests/compositor/test_temporary_buffers.cpp 2013-06-18 09:44:11 +0000 |
634 | +++ tests/unit-tests/compositor/test_temporary_buffers.cpp 2013-07-12 11:57:23 +0000 |
635 | @@ -51,7 +51,7 @@ |
636 | { |
637 | public: |
638 | TemporaryBuffersTest() |
639 | - : buffer_size{geom::Width{1024}, geom::Height{768}}, |
640 | + : buffer_size{1024, 768}, |
641 | buffer_stride{1024}, |
642 | buffer_pixel_format{geom::PixelFormat::abgr_8888}, |
643 | mock_buffer{std::make_shared<testing::NiceMock<mtd::MockBuffer>>( |
644 | |
645 | === modified file 'tests/unit-tests/geometry/test-rectangle.cpp' |
646 | --- tests/unit-tests/geometry/test-rectangle.cpp 2013-03-21 03:32:59 +0000 |
647 | +++ tests/unit-tests/geometry/test-rectangle.cpp 2013-07-12 11:57:23 +0000 |
648 | @@ -27,7 +27,7 @@ |
649 | { |
650 | using namespace geom; |
651 | Point const x3y9{X(3), Y(9)}; |
652 | - Size const w2h4{Width(2), Height(4)}; |
653 | + Size const w2h4{2, 4}; |
654 | Rectangle const rect{x3y9, w2h4}; |
655 | |
656 | EXPECT_EQ(x3y9, rect.top_left); |
657 | |
658 | === modified file 'tests/unit-tests/geometry/test-size.cpp' |
659 | --- tests/unit-tests/geometry/test-size.cpp 2012-09-18 09:44:45 +0000 |
660 | +++ tests/unit-tests/geometry/test-size.cpp 2013-07-12 11:57:23 +0000 |
661 | @@ -26,7 +26,7 @@ |
662 | TEST(geometry, size) |
663 | { |
664 | using namespace geom; |
665 | - Size const size2x4{Width(2), Height(4)}; |
666 | + Size const size2x4{2, 4}; |
667 | |
668 | EXPECT_EQ(Width(2), size2x4.width); |
669 | EXPECT_EQ(Height(4), size2x4.height); |
670 | |
671 | === modified file 'tests/unit-tests/graphics/android/test_android_alloc_adaptor.cpp' |
672 | --- tests/unit-tests/graphics/android/test_android_alloc_adaptor.cpp 2013-06-18 20:06:22 +0000 |
673 | +++ tests/unit-tests/graphics/android/test_android_alloc_adaptor.cpp 2013-07-12 11:57:23 +0000 |
674 | @@ -48,7 +48,7 @@ |
675 | alloc_adaptor = std::make_shared<mga::AndroidAllocAdaptor>(mock_alloc_device); |
676 | |
677 | pf = geom::PixelFormat::abgr_8888; |
678 | - size = geom::Size{geom::Width{300}, geom::Height{200}}; |
679 | + size = geom::Size{300, 200}; |
680 | usage = mga::BufferUsage::use_hardware; |
681 | } |
682 | |
683 | |
684 | === modified file 'tests/unit-tests/graphics/android/test_android_buffer_allocator.cpp' |
685 | --- tests/unit-tests/graphics/android/test_android_buffer_allocator.cpp 2013-06-14 18:20:39 +0000 |
686 | +++ tests/unit-tests/graphics/android/test_android_buffer_allocator.cpp 2013-07-12 11:57:23 +0000 |
687 | @@ -93,7 +93,7 @@ |
688 | |
689 | auto buffer_initializer = std::make_shared<mtd::MockBufferInitializer>(); |
690 | |
691 | - mc::BufferProperties properties{geom::Size{geom::Width{2}, geom::Height{2}}, |
692 | + mc::BufferProperties properties{geom::Size{2, 2}, |
693 | geom::PixelFormat::abgr_8888, |
694 | mc::BufferUsage::hardware}; |
695 | mga::AndroidGraphicBufferAllocator allocator{buffer_initializer}; |
696 | @@ -110,7 +110,7 @@ |
697 | auto buffer_initializer = std::make_shared<mtd::MockBufferInitializer>(); |
698 | |
699 | mga::AndroidGraphicBufferAllocator allocator{buffer_initializer}; |
700 | - auto size = geom::Size{geom::Width{2}, geom::Height{2}}; |
701 | + auto size = geom::Size{2, 2}; |
702 | auto pf = geom::PixelFormat::abgr_8888; |
703 | |
704 | EXPECT_CALL(*buffer_initializer, operator_call(_)) |
705 | |
706 | === modified file 'tests/unit-tests/graphics/android/test_buffer.cpp' |
707 | --- tests/unit-tests/graphics/android/test_buffer.cpp 2013-06-14 17:26:03 +0000 |
708 | +++ tests/unit-tests/graphics/android/test_buffer.cpp 2013-07-12 11:57:23 +0000 |
709 | @@ -45,7 +45,7 @@ |
710 | |
711 | default_use = mga::BufferUsage::use_hardware; |
712 | pf = geom::PixelFormat::abgr_8888; |
713 | - size = geom::Size{geom::Width{300}, geom::Height{200}}; |
714 | + size = geom::Size{300, 200}; |
715 | extensions = std::make_shared<mg::EGLExtensions>(); |
716 | } |
717 | |
718 | @@ -63,8 +63,7 @@ |
719 | |
720 | mga::Buffer buffer(mock_buffer_handle, extensions); |
721 | |
722 | - geom::Size expected_size{geom::Width{mock_buffer_handle->width}, |
723 | - geom::Height{mock_buffer_handle->height}}; |
724 | + geom::Size expected_size{mock_buffer_handle->width, mock_buffer_handle->height}; |
725 | EXPECT_EQ(expected_size, buffer.size()); |
726 | } |
727 | |
728 | |
729 | === modified file 'tests/unit-tests/graphics/android/test_buffer_tex_bind.cpp' |
730 | --- tests/unit-tests/graphics/android/test_buffer_tex_bind.cpp 2013-06-14 17:44:22 +0000 |
731 | +++ tests/unit-tests/graphics/android/test_buffer_tex_bind.cpp 2013-07-12 11:57:23 +0000 |
732 | @@ -38,7 +38,7 @@ |
733 | using namespace testing; |
734 | |
735 | stub_buffer = std::make_shared<ANativeWindowBuffer>(); |
736 | - size = geom::Size{geom::Width{300}, geom::Height{220}}; |
737 | + size = geom::Size{300, 220}; |
738 | pf = geom::PixelFormat::abgr_8888; |
739 | extensions = std::make_shared<mg::EGLExtensions>(); |
740 | |
741 | |
742 | === modified file 'tests/unit-tests/graphics/android/test_framebuffer_factory.cpp' |
743 | --- tests/unit-tests/graphics/android/test_framebuffer_factory.cpp 2013-05-24 15:44:11 +0000 |
744 | +++ tests/unit-tests/graphics/android/test_framebuffer_factory.cpp 2013-07-12 11:57:23 +0000 |
745 | @@ -59,7 +59,7 @@ |
746 | ON_CALL(*mock_display_info_provider, display_format()) |
747 | .WillByDefault(Return(geom::PixelFormat::abgr_8888)); |
748 | ON_CALL(*mock_display_info_provider, display_size()) |
749 | - .WillByDefault(Return(geom::Size{geom::Width{2}, geom::Height{3}})); |
750 | + .WillByDefault(Return(geom::Size{2, 3})); |
751 | ON_CALL(*mock_display_info_provider, number_of_framebuffers_available()) |
752 | .WillByDefault(Return(fake_fb_num)); |
753 | ON_CALL(*mock_buffer_allocator, alloc_buffer_platform(_,_,_)) |
754 | |
755 | === modified file 'tests/unit-tests/graphics/android/test_hwc10_device.cpp' |
756 | --- tests/unit-tests/graphics/android/test_hwc10_device.cpp 2013-05-17 20:43:23 +0000 |
757 | +++ tests/unit-tests/graphics/android/test_hwc10_device.cpp 2013-07-12 11:57:23 +0000 |
758 | @@ -36,7 +36,7 @@ |
759 | virtual void SetUp() |
760 | { |
761 | using namespace testing; |
762 | - test_size = geom::Size{geom::Width{88}, geom::Height{4}}; |
763 | + test_size = geom::Size{88, 4}; |
764 | test_pf = geom::PixelFormat::abgr_8888; |
765 | test_numfb = 558u; |
766 | mock_device = std::make_shared<testing::NiceMock<mtd::MockHWCComposerDevice1>>(); |
767 | |
768 | === modified file 'tests/unit-tests/graphics/android/test_hwc_display.cpp' |
769 | --- tests/unit-tests/graphics/android/test_hwc_display.cpp 2013-05-22 06:30:39 +0000 |
770 | +++ tests/unit-tests/graphics/android/test_hwc_display.cpp 2013-07-12 11:57:23 +0000 |
771 | @@ -70,7 +70,7 @@ |
772 | { |
773 | using namespace testing; |
774 | |
775 | - geom::Size fake_display_size{geom::Width{223}, geom::Height{332}}; |
776 | + geom::Size fake_display_size{223, 332}; |
777 | EXPECT_CALL(*mock_hwc_device, display_size()) |
778 | .Times(1) |
779 | .WillOnce(Return(fake_display_size)); |
780 | |
781 | === modified file 'tests/unit-tests/graphics/android/test_hwc_layerlist.cpp' |
782 | --- tests/unit-tests/graphics/android/test_hwc_layerlist.cpp 2013-05-02 00:34:03 +0000 |
783 | +++ tests/unit-tests/graphics/android/test_hwc_layerlist.cpp 2013-07-12 11:57:23 +0000 |
784 | @@ -35,8 +35,7 @@ |
785 | |
786 | width = 432; |
787 | height = 876; |
788 | - default_size = geom::Size{geom::Width{width}, |
789 | - geom::Height{height}}; |
790 | + default_size = geom::Size{width, height}; |
791 | |
792 | stub_handle_1 = std::make_shared<ANativeWindowBuffer>(); |
793 | stub_handle_2 = std::make_shared<ANativeWindowBuffer>(); |
794 | @@ -66,11 +65,11 @@ |
795 | EXPECT_EQ(nullptr, layer.visibleRegionScreen.rects); |
796 | |
797 | geom::Rectangle r0{geom::Point{geom::X{0},geom::Y{1}}, |
798 | - geom::Size{geom::Width{2},geom::Height{3}}}; |
799 | + geom::Size{2, 3}}; |
800 | geom::Rectangle r1{geom::Point{geom::X{0},geom::Y{1}}, |
801 | - geom::Size{geom::Width{3},geom::Height{3}}}; |
802 | + geom::Size{3, 3}}; |
803 | geom::Rectangle r2{geom::Point{geom::X{1},geom::Y{1}}, |
804 | - geom::Size{geom::Width{2},geom::Height{3}}}; |
805 | + geom::Size{2, 3}}; |
806 | mga::HWCRect a(r0), b(r1), c(r2); |
807 | mga::HWCDefaultLayer original2({a, b, c}); |
808 | layer = original2; |
809 | |
810 | === modified file 'tests/unit-tests/graphics/android/test_internal_client.cpp' |
811 | --- tests/unit-tests/graphics/android/test_internal_client.cpp 2013-06-25 05:42:49 +0000 |
812 | +++ tests/unit-tests/graphics/android/test_internal_client.cpp 2013-07-12 11:57:23 +0000 |
813 | @@ -37,7 +37,7 @@ |
814 | } |
815 | geom::Size size() const |
816 | { |
817 | - return geom::Size{geom::Width{4},geom::Height{2}}; |
818 | + return {4, 2}; |
819 | } |
820 | geom::PixelFormat pixel_format() const |
821 | { |
822 | |
823 | === modified file 'tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp' |
824 | --- tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp 2013-06-25 05:42:49 +0000 |
825 | +++ tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp 2013-07-12 11:57:23 +0000 |
826 | @@ -52,7 +52,7 @@ |
827 | void SetUp() |
828 | { |
829 | using namespace testing; |
830 | - sz = geom::Size{geom::Width{4}, geom::Height{23}}; |
831 | + sz = geom::Size{4, 23}; |
832 | pf = geom::PixelFormat::abgr_8888; |
833 | mock_cache = std::make_shared<mtd::MockInterpreterResourceCache>(); |
834 | mock_surface = std::make_shared<MockSurface>(); |
835 | |
836 | === modified file 'tests/unit-tests/graphics/android/test_server_interpreter.cpp' |
837 | --- tests/unit-tests/graphics/android/test_server_interpreter.cpp 2013-05-16 19:43:56 +0000 |
838 | +++ tests/unit-tests/graphics/android/test_server_interpreter.cpp 2013-07-12 11:57:23 +0000 |
839 | @@ -180,7 +180,7 @@ |
840 | TEST_F(ServerRenderWindowTest, driver_inquires_about_size_without_having_been_set) |
841 | { |
842 | using namespace testing; |
843 | - auto test_size = geom::Size{geom::Width{4}, geom::Height{5}}; |
844 | + geom::Size test_size{4, 5}; |
845 | EXPECT_CALL(*mock_display_poster, display_size()) |
846 | .Times(4) |
847 | .WillRepeatedly(Return(test_size)); |
848 | |
849 | === modified file 'tests/unit-tests/graphics/gbm/test_gbm_buffer.cpp' |
850 | --- tests/unit-tests/graphics/gbm/test_gbm_buffer.cpp 2013-07-01 06:53:02 +0000 |
851 | +++ tests/unit-tests/graphics/gbm/test_gbm_buffer.cpp 2013-07-12 11:57:23 +0000 |
852 | @@ -56,7 +56,7 @@ |
853 | |
854 | fake_devices.add_standard_drm_devices(); |
855 | |
856 | - size = geom::Size{geom::Width{300}, geom::Height{200}}; |
857 | + size = geom::Size{300, 200}; |
858 | pf = geom::PixelFormat::argb_8888; |
859 | stride = geom::Stride{4 * size.width.as_uint32_t()}; |
860 | usage = mc::BufferUsage::hardware; |
861 | |
862 | === modified file 'tests/unit-tests/graphics/gbm/test_gbm_buffer_allocator.cpp' |
863 | --- tests/unit-tests/graphics/gbm/test_gbm_buffer_allocator.cpp 2013-07-01 06:53:02 +0000 |
864 | +++ tests/unit-tests/graphics/gbm/test_gbm_buffer_allocator.cpp 2013-07-12 11:57:23 +0000 |
865 | @@ -54,7 +54,7 @@ |
866 | |
867 | fake_devices.add_standard_drm_devices(); |
868 | |
869 | - size = geom::Size{geom::Width{300}, geom::Height{200}}; |
870 | + size = geom::Size{300, 200}; |
871 | pf = geom::PixelFormat::argb_8888; |
872 | usage = mc::BufferUsage::hardware; |
873 | buffer_properties = mc::BufferProperties{size, pf, usage}; |
874 | |
875 | === modified file 'tests/unit-tests/graphics/gbm/test_gbm_display_configuration.cpp' |
876 | --- tests/unit-tests/graphics/gbm/test_gbm_display_configuration.cpp 2013-07-10 08:50:53 +0000 |
877 | +++ tests/unit-tests/graphics/gbm/test_gbm_display_configuration.cpp 2013-07-12 11:57:23 +0000 |
878 | @@ -49,7 +49,7 @@ |
879 | |
880 | mg::DisplayConfigurationMode conf_mode_from_drm_mode(drmModeModeInfo const& mode) |
881 | { |
882 | - geom::Size const size{geom::Width{mode.hdisplay}, geom::Height{mode.vdisplay}}; |
883 | + geom::Size const size{mode.hdisplay, mode.vdisplay}; |
884 | double vrefresh_hz{0.0}; |
885 | |
886 | /* Calculate vertical refresh rate from DRM mode information */ |
887 | @@ -141,7 +141,7 @@ |
888 | uint32_t const connector0_id{30}; |
889 | uint32_t const connector1_id{31}; |
890 | uint32_t const connector2_id{32}; |
891 | - geom::Size const connector0_physical_size_mm{geom::Width{480}, geom::Height{270}}; |
892 | + geom::Size const connector0_physical_size_mm{480, 270}; |
893 | geom::Size const connector1_physical_size_mm{}; |
894 | geom::Size const connector2_physical_size_mm{}; |
895 | std::vector<uint32_t> possible_encoder_ids_empty; |
896 | @@ -309,10 +309,10 @@ |
897 | std::vector<uint32_t> const encoder_ids{20, 21}; |
898 | std::vector<uint32_t> const connector_ids{30, 31}; |
899 | std::vector<geom::Size> const connector_physical_sizes_mm_before{ |
900 | - {geom::Width{480}, geom::Height{270}}, {} |
901 | + {480, 270}, {} |
902 | }; |
903 | std::vector<geom::Size> const connector_physical_sizes_mm_after{ |
904 | - {}, {geom::Width{512}, geom::Height{642}} |
905 | + {}, {512, 642} |
906 | }; |
907 | std::vector<uint32_t> possible_encoder_ids_empty; |
908 | uint32_t const possible_crtcs_mask_empty{0}; |
909 | |
910 | === modified file 'tests/unit-tests/graphics/gbm/test_gbm_display_multi_monitor.cpp' |
911 | --- tests/unit-tests/graphics/gbm/test_gbm_display_multi_monitor.cpp 2013-07-10 08:50:53 +0000 |
912 | +++ tests/unit-tests/graphics/gbm/test_gbm_display_multi_monitor.cpp 2013-07-12 11:57:23 +0000 |
913 | @@ -100,7 +100,7 @@ |
914 | modes0.push_back(mtd::FakeDRMResources::create_mode(1680, 1050, 119000, 1840, 1080)); |
915 | modes0.push_back(mtd::FakeDRMResources::create_mode(832, 624, 57284, 1152, 667)); |
916 | |
917 | - geom::Size const connector_physical_size_mm{geom::Width{1597}, geom::Height{987}}; |
918 | + geom::Size const connector_physical_size_mm{1597, 987}; |
919 | |
920 | resources.reset(); |
921 | |
922 | |
923 | === modified file 'tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp' |
924 | --- tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp 2013-06-25 05:42:49 +0000 |
925 | +++ tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp 2013-07-12 11:57:23 +0000 |
926 | @@ -146,8 +146,7 @@ |
927 | { |
928 | using namespace ::testing; |
929 | |
930 | - geom::Size const test_surface_size = geom::Size{geom::Width{17}, |
931 | - geom::Height{29}}; |
932 | + geom::Size const test_surface_size{17, 29}; |
933 | geom::PixelFormat const test_pixel_format = geom::PixelFormat::xrgb_8888; |
934 | EXPECT_CALL(*mock_surface, size()) |
935 | .Times(1) |
936 | |
937 | === modified file 'tests/unit-tests/graphics/test_default_display_configuration_policy.cpp' |
938 | --- tests/unit-tests/graphics/test_default_display_configuration_policy.cpp 2013-07-10 08:50:53 +0000 |
939 | +++ tests/unit-tests/graphics/test_default_display_configuration_policy.cpp 2013-07-12 11:57:23 +0000 |
940 | @@ -40,11 +40,11 @@ |
941 | mg::DisplayConfigurationOutputId{10}, |
942 | card_id, |
943 | { |
944 | - {geom::Size{geom::Width{123}, geom::Height{111}}, 59.9}, |
945 | - {geom::Size{geom::Width{123}, geom::Height{111}}, 59.9}, |
946 | - {geom::Size{geom::Width{123}, geom::Height{111}}, 59.9} |
947 | + {geom::Size{123, 111}, 59.9}, |
948 | + {geom::Size{123, 111}, 59.9}, |
949 | + {geom::Size{123, 111}, 59.9} |
950 | }, |
951 | - geom::Size{geom::Width{324}, geom::Height{642}}, |
952 | + geom::Size{324, 642}, |
953 | true, |
954 | false, |
955 | geom::Point{geom::X{123}, geom::Y{343}}, |
956 | @@ -56,7 +56,7 @@ |
957 | mg::DisplayConfigurationOutputId{11}, |
958 | card_id, |
959 | {}, |
960 | - geom::Size{geom::Width{566}, geom::Height{111}}, |
961 | + geom::Size{566, 111}, |
962 | true, |
963 | false, |
964 | geom::Point(), |
965 | @@ -68,9 +68,9 @@ |
966 | mg::DisplayConfigurationOutputId{12}, |
967 | card_id, |
968 | { |
969 | - {geom::Size{geom::Width{523}, geom::Height{555}}, 60.0}, |
970 | + {geom::Size{523, 555}, 60.0}, |
971 | }, |
972 | - geom::Size{geom::Width{324}, geom::Height{642}}, |
973 | + geom::Size{324, 642}, |
974 | true, |
975 | false, |
976 | geom::Point(), |
977 | @@ -82,7 +82,7 @@ |
978 | mg::DisplayConfigurationOutputId{13}, |
979 | card_id, |
980 | {}, |
981 | - geom::Size{geom::Width{324}, geom::Height{642}}, |
982 | + geom::Size{324, 642}, |
983 | false, |
984 | false, |
985 | geom::Point(), |
986 | |
987 | === modified file 'tests/unit-tests/graphics/test_display_configuration.cpp' |
988 | --- tests/unit-tests/graphics/test_display_configuration.cpp 2013-07-10 08:50:53 +0000 |
989 | +++ tests/unit-tests/graphics/test_display_configuration.cpp 2013-07-12 11:57:23 +0000 |
990 | @@ -31,11 +31,11 @@ |
991 | mg::DisplayConfigurationOutputId{3}, |
992 | mg::DisplayConfigurationCardId{2}, |
993 | { |
994 | - {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0}, |
995 | - {geom::Size{geom::Width{10}, geom::Height{20}}, 59.0}, |
996 | - {geom::Size{geom::Width{15}, geom::Height{20}}, 59.0} |
997 | + {geom::Size{10, 20}, 60.0}, |
998 | + {geom::Size{10, 20}, 59.0}, |
999 | + {geom::Size{15, 20}, 59.0} |
1000 | }, |
1001 | - geom::Size{geom::Width{10}, geom::Height{20}}, |
1002 | + geom::Size{10, 20}, |
1003 | true, |
1004 | true, |
1005 | geom::Point(), |
1006 | @@ -46,7 +46,7 @@ |
1007 | |
1008 | TEST(DisplayConfiguration, mode_equality) |
1009 | { |
1010 | - geom::Size const size{geom::Width{10}, geom::Height{20}}; |
1011 | + geom::Size const size{10, 20}; |
1012 | double const vrefresh{59.9}; |
1013 | |
1014 | mg::DisplayConfigurationMode const mode1{size, vrefresh}; |
1015 | @@ -59,8 +59,8 @@ |
1016 | |
1017 | TEST(DisplayConfiguration, mode_inequality) |
1018 | { |
1019 | - geom::Size const size1{geom::Width{10}, geom::Height{20}}; |
1020 | - geom::Size const size2{geom::Width{10}, geom::Height{21}}; |
1021 | + geom::Size const size1{10, 20}; |
1022 | + geom::Size const size2{10, 21}; |
1023 | double const vrefresh1{59.9}; |
1024 | double const vrefresh2{60.0}; |
1025 | |
1026 | @@ -111,14 +111,14 @@ |
1027 | |
1028 | std::vector<mg::DisplayConfigurationMode> const modes2 |
1029 | { |
1030 | - {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0}, |
1031 | - {geom::Size{geom::Width{10}, geom::Height{20}}, 59.9}, |
1032 | - {geom::Size{geom::Width{15}, geom::Height{20}}, 59.0} |
1033 | + {geom::Size{10, 20}, 60.0}, |
1034 | + {geom::Size{10, 20}, 59.9}, |
1035 | + {geom::Size{15, 20}, 59.0} |
1036 | }; |
1037 | std::vector<mg::DisplayConfigurationMode> const modes3 |
1038 | { |
1039 | - {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0}, |
1040 | - {geom::Size{geom::Width{10}, geom::Height{20}}, 59.0} |
1041 | + {geom::Size{10, 20}, 60.0}, |
1042 | + {geom::Size{10, 20}, 59.0} |
1043 | }; |
1044 | |
1045 | output2.modes = modes2; |
1046 | @@ -137,7 +137,7 @@ |
1047 | mg::DisplayConfigurationOutput const output1 = tmpl_output; |
1048 | mg::DisplayConfigurationOutput output2 = tmpl_output; |
1049 | |
1050 | - geom::Size const physical_size2{geom::Width{11}, geom::Height{20}}; |
1051 | + geom::Size const physical_size2{11, 20}; |
1052 | |
1053 | output2.physical_size_mm = physical_size2; |
1054 | |
1055 | |
1056 | === modified file 'tests/unit-tests/graphics/test_gl_pixel_buffer.cpp' |
1057 | --- tests/unit-tests/graphics/test_gl_pixel_buffer.cpp 2013-06-26 03:03:27 +0000 |
1058 | +++ tests/unit-tests/graphics/test_gl_pixel_buffer.cpp 2013-07-12 11:57:23 +0000 |
1059 | @@ -60,8 +60,7 @@ |
1060 | using namespace testing; |
1061 | |
1062 | ON_CALL(mock_buffer, size()) |
1063 | - .WillByDefault(Return(geom::Size{geom::Width{100}, |
1064 | - geom::Height{100}})); |
1065 | + .WillByDefault(Return(geom::Size{100, 100})); |
1066 | } |
1067 | |
1068 | testing::NiceMock<mtd::MockGL> mock_gl; |
1069 | |
1070 | === modified file 'tests/unit-tests/graphics/test_graphics_platform.cpp' |
1071 | --- tests/unit-tests/graphics/test_graphics_platform.cpp 2013-07-02 05:03:20 +0000 |
1072 | +++ tests/unit-tests/graphics/test_graphics_platform.cpp 2013-07-12 11:57:23 +0000 |
1073 | @@ -126,7 +126,7 @@ |
1074 | |
1075 | ASSERT_NE(0u, supported_pixel_formats.size()); |
1076 | |
1077 | - geom::Size size{geom::Width{320}, geom::Height{240}}; |
1078 | + geom::Size size{320, 240}; |
1079 | geom::PixelFormat const pf{supported_pixel_formats[0]}; |
1080 | mc::BufferUsage usage{mc::BufferUsage::hardware}; |
1081 | mc::BufferProperties buffer_properties{size, pf, usage}; |
1082 | |
1083 | === modified file 'tests/unit-tests/input/android/test_android_input_manager.cpp' |
1084 | --- tests/unit-tests/input/android/test_android_input_manager.cpp 2013-07-03 22:07:12 +0000 |
1085 | +++ tests/unit-tests/input/android/test_android_input_manager.cpp 2013-07-12 11:57:23 +0000 |
1086 | @@ -100,8 +100,7 @@ |
1087 | using namespace ::testing; |
1088 | |
1089 | const geom::Rectangle default_view_area = |
1090 | - geom::Rectangle{geom::Point(), |
1091 | - geom::Size{geom::Width(1600), geom::Height(1400)}}; |
1092 | + geom::Rectangle{geom::Point(), geom::Size{1600, 1400}}; |
1093 | |
1094 | |
1095 | ON_CALL(view_area, view_area()) |
1096 | |
1097 | === modified file 'tests/unit-tests/input/android/test_android_input_reader_policy.cpp' |
1098 | --- tests/unit-tests/input/android/test_android_input_reader_policy.cpp 2013-03-13 08:09:52 +0000 |
1099 | +++ tests/unit-tests/input/android/test_android_input_reader_policy.cpp 2013-07-12 11:57:23 +0000 |
1100 | @@ -33,8 +33,7 @@ |
1101 | namespace mtd = mir::test::doubles; |
1102 | |
1103 | static geom::Rectangle const default_view_area = geom::Rectangle{geom::Point(), |
1104 | - geom::Size{geom::Width(1600), |
1105 | - geom::Height(1400)}}; |
1106 | + geom::Size{1600, 1400}}; |
1107 | |
1108 | namespace |
1109 | { |
1110 | |
1111 | === modified file 'tests/unit-tests/input/android/test_android_input_window_handle.cpp' |
1112 | --- tests/unit-tests/input/android/test_android_input_window_handle.cpp 2013-07-05 21:27:14 +0000 |
1113 | +++ tests/unit-tests/input/android/test_android_input_window_handle.cpp 2013-07-12 11:57:23 +0000 |
1114 | @@ -60,8 +60,7 @@ |
1115 | { |
1116 | using namespace ::testing; |
1117 | |
1118 | - geom::Size const default_surface_size = geom::Size{geom::Width{256}, |
1119 | - geom::Height{256}}; |
1120 | + geom::Size const default_surface_size{256, 256}; |
1121 | geom::Point const default_surface_top_left = geom::Point{geom::X{10}, geom::Y{10}}; |
1122 | std::string const testing_surface_name = "Test"; |
1123 | |
1124 | |
1125 | === modified file 'tests/unit-tests/input/android/test_android_pointer_controller.cpp' |
1126 | --- tests/unit-tests/input/android/test_android_pointer_controller.cpp 2013-03-13 08:09:52 +0000 |
1127 | +++ tests/unit-tests/input/android/test_android_pointer_controller.cpp 2013-07-12 11:57:23 +0000 |
1128 | @@ -36,8 +36,7 @@ |
1129 | namespace mtd = mir::test::doubles; |
1130 | |
1131 | static const geom::Rectangle default_view_area = geom::Rectangle{geom::Point(), |
1132 | - geom::Size{geom::Width(1600), |
1133 | - geom::Height(1400)}}; |
1134 | + geom::Size{1600, 1400}}; |
1135 | |
1136 | namespace |
1137 | { |
1138 | |
1139 | === modified file 'tests/unit-tests/input/test_input_surface_info.cpp' |
1140 | --- tests/unit-tests/input/test_input_surface_info.cpp 2013-07-05 23:36:24 +0000 |
1141 | +++ tests/unit-tests/input/test_input_surface_info.cpp 2013-07-12 11:57:23 +0000 |
1142 | @@ -41,7 +41,7 @@ |
1143 | } |
1144 | |
1145 | geom::Point primitive_pt{geom::X{1}, geom::Y{1}}; |
1146 | - geom::Size primitive_sz{geom::Width{1}, geom::Height{1}}; |
1147 | + geom::Size primitive_sz{1, 1}; |
1148 | geom::Rectangle primitive_rect{primitive_pt, primitive_sz}; |
1149 | mtd::MockSurfaceInfo primitive_info; |
1150 | }; |
1151 | @@ -89,8 +89,8 @@ |
1152 | TEST_F(InputSurfaceInfo, set_input_region) |
1153 | { |
1154 | std::vector<geom::Rectangle> const rectangles = { |
1155 | - {{geom::X{0}, geom::Y{0}}, {geom::Width{1}, geom::Height{1}}}, //region0 |
1156 | - {{geom::X{1}, geom::Y{1}}, {geom::Width{1}, geom::Height{1}}} //region1 |
1157 | + {{geom::X{0}, geom::Y{0}}, geom::Size{1, 1}}, //region0 |
1158 | + {{geom::X{1}, geom::Y{1}}, geom::Size{1, 1}} //region1 |
1159 | }; |
1160 | |
1161 | mi::SurfaceDataStorage input_info(mt::fake_shared(primitive_info)); |
1162 | |
1163 | === modified file 'tests/unit-tests/shell/test_consuming_placement_strategy.cpp' |
1164 | --- tests/unit-tests/shell/test_consuming_placement_strategy.cpp 2013-05-21 17:16:43 +0000 |
1165 | +++ tests/unit-tests/shell/test_consuming_placement_strategy.cpp 2013-07-12 11:57:23 +0000 |
1166 | @@ -31,8 +31,7 @@ |
1167 | namespace |
1168 | { |
1169 | static const geom::Rectangle default_view_area = geom::Rectangle{geom::Point(), |
1170 | - geom::Size{geom::Width(1600), |
1171 | - geom::Height(1600)}}; |
1172 | + geom::Size{1600, 1600}}; |
1173 | |
1174 | struct ConsumingPlacementStrategySetup : public testing::Test |
1175 | { |
1176 | @@ -66,7 +65,7 @@ |
1177 | { |
1178 | using namespace ::testing; |
1179 | |
1180 | - const geom::Size requested_size = geom::Size{geom::Width{100}, geom::Height{100}}; |
1181 | + const geom::Size requested_size = geom::Size{100, 100}; |
1182 | |
1183 | EXPECT_CALL(*viewable_area, view_area()).Times(1); |
1184 | |
1185 | |
1186 | === modified file 'tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp' |
1187 | --- tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp 2013-07-01 06:36:33 +0000 |
1188 | +++ tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp 2013-07-12 11:57:23 +0000 |
1189 | @@ -67,7 +67,7 @@ |
1190 | using namespace testing; |
1191 | |
1192 | void const* pixels{reinterpret_cast<void*>(0xabcd)}; |
1193 | - geom::Size size{geom::Width{10}, geom::Height{11}}; |
1194 | + geom::Size size{10, 11}; |
1195 | geom::Stride stride{123}; |
1196 | |
1197 | MockPixelBuffer pixel_buffer; |
1198 | |
1199 | === modified file 'tests/unit-tests/surfaces/test_surface.cpp' |
1200 | --- tests/unit-tests/surfaces/test_surface.cpp 2013-07-08 17:04:31 +0000 |
1201 | +++ tests/unit-tests/surfaces/test_surface.cpp 2013-07-12 11:57:23 +0000 |
1202 | @@ -68,7 +68,7 @@ |
1203 | TEST(SurfaceCreationParametersTest, builder_mutators) |
1204 | { |
1205 | using namespace geom; |
1206 | - Size const size{Width{1024}, Height{768}}; |
1207 | + Size const size{1024, 768}; |
1208 | mc::BufferUsage const usage{mc::BufferUsage::hardware}; |
1209 | geom::PixelFormat const format{geom::PixelFormat::abgr_8888}; |
1210 | std::string name{"surface"}; |
1211 | @@ -87,7 +87,7 @@ |
1212 | TEST(SurfaceCreationParametersTest, equality) |
1213 | { |
1214 | using namespace geom; |
1215 | - Size const size{Width{1024}, Height{768}}; |
1216 | + Size const size{1024, 768}; |
1217 | mc::BufferUsage const usage{mc::BufferUsage::hardware}; |
1218 | geom::PixelFormat const format{geom::PixelFormat::abgr_8888}; |
1219 | |
1220 | @@ -109,8 +109,8 @@ |
1221 | { |
1222 | using namespace geom; |
1223 | |
1224 | - std::vector<Size> const sizes{{Width{1024}, Height{768}}, |
1225 | - {Width{1025}, Height{768}}}; |
1226 | + std::vector<Size> const sizes{{1024, 768}, |
1227 | + {1025, 768}}; |
1228 | |
1229 | std::vector<mc::BufferUsage> const usages{mc::BufferUsage::hardware, |
1230 | mc::BufferUsage::software}; |
1231 | @@ -165,7 +165,7 @@ |
1232 | |
1233 | surface_name = "test_surfaceA"; |
1234 | pf = geom::PixelFormat::abgr_8888; |
1235 | - size = geom::Size{geom::Width{43}, geom::Height{420}}; |
1236 | + size = geom::Size{43, 420}; |
1237 | rect = geom::Rectangle{geom::Point{geom::X{0}, geom::Y{0}}, size}; |
1238 | stride = geom::Stride{4 * size.width.as_uint32_t()}; |
1239 | mock_buffer_stream = std::make_shared<testing::NiceMock<mtd::MockBufferStream>>(); |
1240 | @@ -316,7 +316,7 @@ |
1241 | std::shared_ptr<mi::InputChannel>(), null_change_cb); |
1242 | surf.set_rotation(60.0f, glm::vec3{0.0f, 0.0f, 1.0f}); |
1243 | |
1244 | - geom::Size s{geom::Width{55}, geom::Height{66}}; |
1245 | + geom::Size s{55, 66}; |
1246 | ON_CALL(*mock_basic_info, size_and_position()) |
1247 | .WillByDefault(Return(geom::Rectangle{geom::Point{geom::X{}, geom::Y{}},s})); |
1248 | |
1249 | @@ -347,7 +347,7 @@ |
1250 | { |
1251 | using namespace testing; |
1252 | |
1253 | - const geom::Size sz{geom::Width{85}, geom::Height{43}}; |
1254 | + const geom::Size sz{85, 43}; |
1255 | const geom::Rectangle origin{geom::Point{geom::X{77}, geom::Y{88}}, sz}; |
1256 | const geom::Rectangle moved_pt{geom::Point{geom::X{55}, geom::Y{66}}, sz}; |
1257 | |
1258 | |
1259 | === modified file 'tests/unit-tests/surfaces/test_surface_info.cpp' |
1260 | --- tests/unit-tests/surfaces/test_surface_info.cpp 2013-07-08 17:04:31 +0000 |
1261 | +++ tests/unit-tests/surfaces/test_surface_info.cpp 2013-07-12 11:57:23 +0000 |
1262 | @@ -29,7 +29,7 @@ |
1263 | { |
1264 | name = std::string("aa"); |
1265 | top_left = geom::Point{geom::X{4}, geom::Y{7}}; |
1266 | - size = geom::Size{geom::Width{5}, geom::Height{9}}; |
1267 | + size = geom::Size{5, 9}; |
1268 | } |
1269 | std::string name; |
1270 | geom::Point top_left; |
1271 | |
1272 | === modified file 'tests/unit-tests/surfaces/test_surface_stack.cpp' |
1273 | --- tests/unit-tests/surfaces/test_surface_stack.cpp 2013-07-06 00:24:51 +0000 |
1274 | +++ tests/unit-tests/surfaces/test_surface_stack.cpp 2013-07-12 11:57:23 +0000 |
1275 | @@ -181,7 +181,7 @@ |
1276 | ms::SurfaceStack stack(mt::fake_shared(buffer_stream_factory), |
1277 | mt::fake_shared(input_factory), mt::fake_shared(input_registrar)); |
1278 | std::weak_ptr<ms::Surface> surface = stack.create_surface( |
1279 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1280 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1281 | |
1282 | stack.destroy_surface(surface); |
1283 | } |
1284 | @@ -235,11 +235,11 @@ |
1285 | mt::fake_shared(input_factory), mt::fake_shared(input_registrar)); |
1286 | |
1287 | auto surface1 = stack.create_surface( |
1288 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1289 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1290 | auto surface2 = stack.create_surface( |
1291 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1292 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1293 | auto surface3 = stack.create_surface( |
1294 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1295 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1296 | |
1297 | mtd::MockSurfaceRenderer renderer; |
1298 | MockFilterForRenderables filter; |
1299 | @@ -277,11 +277,11 @@ |
1300 | mt::fake_shared(input_factory), mt::fake_shared(input_registrar)); |
1301 | |
1302 | auto surface1 = stack.create_surface( |
1303 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1304 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1305 | auto surface2 = stack.create_surface( |
1306 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1307 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1308 | auto surface3 = stack.create_surface( |
1309 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1310 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1311 | |
1312 | mtd::MockSurfaceRenderer renderer; |
1313 | MockFilterForRenderables filter; |
1314 | @@ -311,7 +311,7 @@ |
1315 | mtd::StubInputRegistrar input_registrar; |
1316 | |
1317 | |
1318 | - geom::Size const size{geom::Size{geom::Width{1024}, geom::Height{768}}}; |
1319 | + geom::Size const size{1024, 768}; |
1320 | geom::PixelFormat const format{geom::PixelFormat::bgr_888}; |
1321 | mc::BufferUsage const usage{mc::BufferUsage::software}; |
1322 | |
1323 | @@ -364,7 +364,7 @@ |
1324 | stack.set_change_callback(std::bind(&MockCallback::call, &mock_cb)); |
1325 | |
1326 | std::weak_ptr<ms::Surface> surface = stack.create_surface( |
1327 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1328 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1329 | } |
1330 | |
1331 | TEST(SurfaceStack, destroy_surface_notifies_changes) |
1332 | @@ -381,7 +381,7 @@ |
1333 | stack.set_change_callback(std::bind(&MockCallback::call, &mock_cb)); |
1334 | |
1335 | std::weak_ptr<ms::Surface> surface = stack.create_surface( |
1336 | - msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth); |
1337 | + msh::a_surface().of_size({1024, 768}), default_depth); |
1338 | |
1339 | Mock::VerifyAndClearExpectations(&mock_cb); |
1340 | EXPECT_CALL(mock_cb, call()).Times(1); |
1341 | @@ -423,8 +423,7 @@ |
1342 | using namespace ::testing; |
1343 | geom::Point const requested_top_left{geom::X{50}, |
1344 | geom::Y{17}}; |
1345 | - geom::Size const requested_size{geom::Width{1024}, |
1346 | - geom::Height{768}}; |
1347 | + geom::Size const requested_size{1024, 768}; |
1348 | |
1349 | ms::SurfaceStack stack{std::make_shared<StubBufferStreamFactory>(), |
1350 | std::make_shared<StubInputChannelFactory>(), |
1351 | @@ -444,8 +443,8 @@ |
1352 | using namespace ::testing; |
1353 | geom::Point const requested_top_left{geom::X{50}, |
1354 | geom::Y{17}}; |
1355 | - geom::Size const requested_size{geom::Width{1024}, geom::Height{768}}; |
1356 | - geom::Size const stream_size{geom::Width{1025}, geom::Height{769}}; |
1357 | + geom::Size const requested_size{1024, 768}; |
1358 | + geom::Size const stream_size{1025, 769}; |
1359 | |
1360 | MockBufferStreamFactory buffer_stream_factory; |
1361 | auto stream = std::make_shared<mtd::MockBufferStream>(); |
Looks good.