Mir

Merge lp:~alan-griffiths/mir/fix-1199756 into lp:~mir-team/mir/trunk

Proposed by Alan Griffiths
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
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alexandros Frantzis (community) Approve
Review via email: mp+174249@code.launchpad.net

Commit message

geometry: make geometry compound types easier to construct

Description of the change

geometry: make geometry compound types easier to construct

To post a comment you must log in.
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'examples/demo-inprocess-surface-client/inprocess_egl_client.cpp'
--- examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2013-07-08 10:32:48 +0000
+++ examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2013-07-12 11:57:23 +0000
@@ -72,8 +72,7 @@
7272
73void me::InprocessEGLClient::thread_loop()73void me::InprocessEGLClient::thread_loop()
74{74{
75 geom::Size const surface_size = geom::Size{geom::Width{512},75 geom::Size const surface_size{512, 512};
76 geom::Height{512}};
7776
78 ///\internal [setup_tag]77 ///\internal [setup_tag]
79 auto params = msh::a_surface().of_name("Inprocess EGL Demo")78 auto params = msh::a_surface().of_name("Inprocess EGL Demo")
8079
=== modified file 'examples/render_surfaces.cpp'
--- examples/render_surfaces.cpp 2013-07-10 17:06:37 +0000
+++ examples/render_surfaces.cpp 2013-07-12 11:57:23 +0000
@@ -102,9 +102,7 @@
102 image[(i+1) * height + i] = fg_color;102 image[(i+1) * height + i] = fg_color;
103 image[i * height + i + 1] = fg_color;103 image[i * height + i + 1] = fg_color;
104 }104 }
105 cursor->set_image(105 cursor->set_image(image.data(), geom::Size{width, height});
106 image.data(),
107 geom::Size{ geom::Width(width), geom::Height(height) });
108 }106 }
109}107}
110108
@@ -286,8 +284,7 @@
286 public:284 public:
287 RenderResourcesBufferInitializer()285 RenderResourcesBufferInitializer()
288 : img_renderer{mir_image.pixel_data,286 : img_renderer{mir_image.pixel_data,
289 geom::Size{geom::Width{mir_image.width},287 geom::Size{mir_image.width, mir_image.height},
290 geom::Height{mir_image.height}},
291 mir_image.bytes_per_pixel}288 mir_image.bytes_per_pixel}
292 {289 {
293 }290 }
@@ -368,8 +365,7 @@
368 auto const surface_builder = the_surface_builder();365 auto const surface_builder = the_surface_builder();
369 geom::Size const display_size{display->view_area().size};366 geom::Size const display_size{display->view_area().size};
370 uint32_t const surface_side{300};367 uint32_t const surface_side{300};
371 geom::Size const surface_size{geom::Width{surface_side},368 geom::Size const surface_size{surface_side, surface_side};
372 geom::Height{surface_side}};
373369
374 float const angular_step = 2.0 * M_PI / moveables.size();370 float const angular_step = 2.0 * M_PI / moveables.size();
375 float const w = display_size.width.as_uint32_t();371 float const w = display_size.width.as_uint32_t();
376372
=== modified file 'include/shared/mir/geometry/size.h'
--- include/shared/mir/geometry/size.h 2013-04-24 05:22:20 +0000
+++ include/shared/mir/geometry/size.h 2013-07-12 11:57:23 +0000
@@ -30,10 +30,11 @@
30struct Size30struct Size
31{31{
32 Size() {}32 Size() {}
33 Size(Size const&) = default;
34 Size& operator=(Size const&) = default;
3335
34 Size(const Width& w, const Height& h) : width {w}, height {h}36 template<typename WidthType, typename HeightType>
35 {37 Size(WidthType&& width, HeightType&& height) : width(width), height(height) {}
36 }
3738
38 Width width;39 Width width;
39 Height height;40 Height height;
4041
=== modified file 'include/test/mir_test_doubles/mock_input_info.h'
--- include/test/mir_test_doubles/mock_input_info.h 2013-07-10 17:06:37 +0000
+++ include/test/mir_test_doubles/mock_input_info.h 2013-07-12 11:57:23 +0000
@@ -39,7 +39,7 @@
39 .WillByDefault(39 .WillByDefault(
40 Return(geometry::Rectangle{40 Return(geometry::Rectangle{
41 geometry::Point{},41 geometry::Point{},
42 geometry::Size{geometry::Width{}, geometry::Height{}}}));42 geometry::Size{}}));
43 static std::string n;43 static std::string n;
44 ON_CALL(*this, name())44 ON_CALL(*this, name())
45 .WillByDefault(testing::ReturnRef(n));45 .WillByDefault(testing::ReturnRef(n));
4646
=== modified file 'include/test/mir_test_doubles/mock_surface_info.h'
--- include/test/mir_test_doubles/mock_surface_info.h 2013-07-10 17:06:37 +0000
+++ include/test/mir_test_doubles/mock_surface_info.h 2013-07-12 11:57:23 +0000
@@ -39,7 +39,7 @@
39 .WillByDefault(39 .WillByDefault(
40 Return(geometry::Rectangle{40 Return(geometry::Rectangle{
41 geometry::Point{},41 geometry::Point{},
42 geometry::Size{geometry::Width{}, geometry::Height{}}}));42 geometry::Size{}}));
43 static std::string n;43 static std::string n;
44 ON_CALL(*this, name())44 ON_CALL(*this, name())
45 .WillByDefault(testing::ReturnRef(n));45 .WillByDefault(testing::ReturnRef(n));
4646
=== modified file 'include/test/mir_test_doubles/stub_buffer.h'
--- include/test/mir_test_doubles/stub_buffer.h 2013-05-14 21:39:52 +0000
+++ include/test/mir_test_doubles/stub_buffer.h 2013-07-12 11:57:23 +0000
@@ -35,7 +35,7 @@
35{35{
36public:36public:
37 StubBuffer()37 StubBuffer()
38 : buf_size{geometry::Size{geometry::Width{0}, geometry::Height{0}}},38 : buf_size{0, 0},
39 buf_pixel_format{geometry::PixelFormat::abgr_8888}39 buf_pixel_format{geometry::PixelFormat::abgr_8888}
40 {40 {
41 }41 }
4242
=== modified file 'src/client/android/android_client_buffer.cpp'
--- src/client/android/android_client_buffer.cpp 2013-07-10 17:06:37 +0000
+++ src/client/android/android_client_buffer.cpp 2013-07-12 11:57:23 +0000
@@ -66,8 +66,7 @@
6666
67geom::Size mcla::AndroidClientBuffer::size() const67geom::Size mcla::AndroidClientBuffer::size() const
68{68{
69 return geom::Size{geom::Width{native_window_buffer->width},69 return {native_window_buffer->width, native_window_buffer->height};
70 geom::Height{native_window_buffer->height}};
71}70}
7271
73geom::Stride mcla::AndroidClientBuffer::stride() const72geom::Stride mcla::AndroidClientBuffer::stride() const
7473
=== modified file 'src/server/graphics/android/buffer.cpp'
--- src/server/graphics/android/buffer.cpp 2013-06-14 19:30:20 +0000
+++ src/server/graphics/android/buffer.cpp 2013-07-12 11:57:23 +0000
@@ -51,8 +51,7 @@
5151
52geom::Size mga::Buffer::size() const52geom::Size mga::Buffer::size() const
53{53{
54 return geom::Size{geom::Width{native_buffer->width},54 return {native_buffer->width, native_buffer->height};
55 geom::Height{native_buffer->height}};
56}55}
5756
58geom::Stride mga::Buffer::stride() const57geom::Stride mga::Buffer::stride() const
5958
=== modified file 'src/server/graphics/android/fb_device.cpp'
--- src/server/graphics/android/fb_device.cpp 2013-05-17 20:29:13 +0000
+++ src/server/graphics/android/fb_device.cpp 2013-07-12 11:57:23 +0000
@@ -50,8 +50,7 @@
5050
51geom::Size mga::FBDevice::display_size() const51geom::Size mga::FBDevice::display_size() const
52{52{
53 return geom::Size{geom::Width{fb_device->width},53 return {fb_device->width, fb_device->height};
54 geom::Height{fb_device->height}};
55} 54}
5655
57geom::PixelFormat mga::FBDevice::display_format() const56geom::PixelFormat mga::FBDevice::display_format() const
5857
=== modified file 'src/server/graphics/android/hwc11_device.cpp'
--- src/server/graphics/android/hwc11_device.cpp 2013-05-17 20:17:16 +0000
+++ src/server/graphics/android/hwc11_device.cpp 2013-07-12 11:57:23 +0000
@@ -60,7 +60,7 @@
60 hwc_device->getDisplayAttributes(hwc_device.get(), HWC_DISPLAY_PRIMARY, primary_display_config,60 hwc_device->getDisplayAttributes(hwc_device.get(), HWC_DISPLAY_PRIMARY, primary_display_config,
61 size_request, size_values);61 size_request, size_values);
6262
63 return geom::Size{geom::Width{size_values[0]}, geom::Height{size_values[1]}};63 return {size_values[0], size_values[1]};
64}64}
6565
66geom::PixelFormat mga::HWC11Device::display_format() const66geom::PixelFormat mga::HWC11Device::display_format() const
6767
=== modified file 'src/server/graphics/gbm/gbm_buffer.cpp'
--- src/server/graphics/gbm/gbm_buffer.cpp 2013-05-29 04:53:18 +0000
+++ src/server/graphics/gbm/gbm_buffer.cpp 2013-07-12 11:57:23 +0000
@@ -104,8 +104,7 @@
104104
105geom::Size mgg::GBMBuffer::size() const105geom::Size mgg::GBMBuffer::size() const
106{106{
107 return {geom::Width{gbm_bo_get_width(gbm_handle.get())},107 return {gbm_bo_get_width(gbm_handle.get()), gbm_bo_get_height(gbm_handle.get())};
108 geom::Height{gbm_bo_get_height(gbm_handle.get())}};
109}108}
110109
111geom::Stride mgg::GBMBuffer::stride() const110geom::Stride mgg::GBMBuffer::stride() const
112111
=== modified file 'src/server/graphics/gbm/gbm_cursor.cpp'
--- src/server/graphics/gbm/gbm_cursor.cpp 2013-06-06 10:47:23 +0000
+++ src/server/graphics/gbm/gbm_cursor.cpp 2013-07-12 11:57:23 +0000
@@ -56,8 +56,7 @@
56 current_position(),56 current_position(),
57 buffer(*platform)57 buffer(*platform)
58{58{
59 set_image(black_arrow.pixel_data,59 set_image(black_arrow.pixel_data, geometry::Size{width, height});
60 geometry::Size{geometry::Width(width), geometry::Height(height)});
6160
62 show_at_last_known_position();61 show_at_last_known_position();
63}62}
@@ -69,7 +68,7 @@
6968
70void mgg::GBMCursor::set_image(const void* raw_argb, geometry::Size size)69void mgg::GBMCursor::set_image(const void* raw_argb, geometry::Size size)
71{70{
72 if (size != geometry::Size{geometry::Width(width), geometry::Height(height)})71 if (size != geometry::Size{width, height})
73 BOOST_THROW_EXCEPTION(std::logic_error("No support for cursors that aren't 64x64"));72 BOOST_THROW_EXCEPTION(std::logic_error("No support for cursors that aren't 64x64"));
7473
75 auto const count = size.width.as_uint32_t() * size.height.as_uint32_t() * sizeof(uint32_t);74 auto const count = size.width.as_uint32_t() * size.height.as_uint32_t() * sizeof(uint32_t);
7675
=== modified file 'src/server/graphics/gbm/kms_display_configuration.cpp'
--- src/server/graphics/gbm/kms_display_configuration.cpp 2013-07-10 16:55:22 +0000
+++ src/server/graphics/gbm/kms_display_configuration.cpp 2013-07-12 11:57:23 +0000
@@ -149,8 +149,7 @@
149{149{
150 DisplayConfigurationOutputId id{static_cast<int>(connector.connector_id)};150 DisplayConfigurationOutputId id{static_cast<int>(connector.connector_id)};
151 DisplayConfigurationCardId card_id{0};151 DisplayConfigurationCardId card_id{0};
152 geom::Size physical_size{geom::Width{connector.mmWidth},152 geom::Size physical_size{connector.mmWidth, connector.mmHeight};
153 geom::Height{connector.mmHeight}};
154 bool connected{connector.connection == DRM_MODE_CONNECTED};153 bool connected{connector.connection == DRM_MODE_CONNECTED};
155 size_t current_mode_index{std::numeric_limits<size_t>::max()};154 size_t current_mode_index{std::numeric_limits<size_t>::max()};
156 std::vector<DisplayConfigurationMode> modes;155 std::vector<DisplayConfigurationMode> modes;
@@ -170,8 +169,7 @@
170 {169 {
171 drmModeModeInfo& mode_info = connector.modes[m];170 drmModeModeInfo& mode_info = connector.modes[m];
172171
173 geom::Size size{geom::Width{mode_info.hdisplay},172 geom::Size size{mode_info.hdisplay, mode_info.vdisplay};
174 geom::Height{mode_info.vdisplay}};
175173
176 double vrefresh_hz = calculate_vrefresh_hz(mode_info);174 double vrefresh_hz = calculate_vrefresh_hz(mode_info);
177175
178176
=== modified file 'src/server/graphics/gbm/kms_output.cpp'
--- src/server/graphics/gbm/kms_output.cpp 2013-05-03 22:08:24 +0000
+++ src/server/graphics/gbm/kms_output.cpp 2013-07-12 11:57:23 +0000
@@ -132,7 +132,7 @@
132geom::Size mgg::KMSOutput::size() const132geom::Size mgg::KMSOutput::size() const
133{133{
134 drmModeModeInfo const& mode(connector->modes[mode_index]);134 drmModeModeInfo const& mode(connector->modes[mode_index]);
135 return geom::Size{geom::Width{mode.hdisplay}, geom::Height{mode.vdisplay}};135 return {mode.hdisplay, mode.vdisplay};
136}136}
137137
138bool mgg::KMSOutput::set_crtc(uint32_t fb_id)138bool mgg::KMSOutput::set_crtc(uint32_t fb_id)
139139
=== modified file 'src/server/shell/surface_creation_parameters.cpp'
--- src/server/shell/surface_creation_parameters.cpp 2013-05-21 17:16:43 +0000
+++ src/server/shell/surface_creation_parameters.cpp 2013-07-12 11:57:23 +0000
@@ -47,7 +47,7 @@
47 geometry::Width::ValueType width,47 geometry::Width::ValueType width,
48 geometry::Height::ValueType height)48 geometry::Height::ValueType height)
49{49{
50 return of_size(geometry::Size(geometry::Width(width), geometry::Height(height)));50 return of_size({width, height});
51}51}
5252
53msh::SurfaceCreationParameters& msh::SurfaceCreationParameters::of_position(geometry::Point const& new_top_left)53msh::SurfaceCreationParameters& msh::SurfaceCreationParameters::of_position(geometry::Point const& new_top_left)
5454
=== modified file 'tests/acceptance-tests/test_client_input.cpp'
--- tests/acceptance-tests/test_client_input.cpp 2013-07-11 13:41:09 +0000
+++ tests/acceptance-tests/test_client_input.cpp 2013-07-12 11:57:23 +0000
@@ -477,17 +477,16 @@
477 {477 {
478 static GeometryList positions;478 static GeometryList positions;
479 positions[test_client_1] = geom::Rectangle{geom::Point{0, 0},479 positions[test_client_1] = geom::Rectangle{geom::Point{0, 0},
480 geom::Size{geom::Width{client_width}, geom::Height{client_height}}};480 geom::Size{client_width, client_height}};
481 positions[test_client_2] = geom::Rectangle{geom::Point{screen_width/2, screen_height/2},481 positions[test_client_2] = geom::Rectangle{geom::Point{screen_width/2, screen_height/2},
482 geom::Size{geom::Width{client_width}, geom::Height{client_height}}};482 geom::Size{client_width, client_height}};
483483
484 return std::make_shared<StaticPlacementStrategy>(positions);484 return std::make_shared<StaticPlacementStrategy>(positions);
485 }485 }
486 486
487 geom::Rectangle the_screen_geometry() override487 geom::Rectangle the_screen_geometry() override
488 {488 {
489 return geom::Rectangle{geom::Point{0, 0},489 return geom::Rectangle{geom::Point{0, 0}, geom::Size{screen_width, screen_height}};
490 geom::Size{geom::Width{screen_width}, geom::Height{screen_height}}};
491 }490 }
492491
493 void inject_input() override492 void inject_input() override
@@ -575,11 +574,11 @@
575 static int const screen_height = 100;574 static int const screen_height = 100;
576 575
577 static geom::Rectangle const screen_geometry{geom::Point{0, 0},576 static geom::Rectangle const screen_geometry{geom::Point{0, 0},
578 geom::Size{geom::Width{screen_width}, geom::Height{screen_height}}};577 geom::Size{screen_width, screen_height}};
579578
580 static std::initializer_list<geom::Rectangle> client_input_regions = {579 static std::initializer_list<geom::Rectangle> client_input_regions = {
581 {geom::Point{0, 0}, {geom::Width{screen_width-80}, geom::Height{screen_height}}},580 {geom::Point{0, 0}, {screen_width-80, screen_height}},
582 {geom::Point{screen_width-20, 0}, {geom::Width{screen_width-80}, geom::Height{screen_height}}}581 {geom::Point{screen_width-20, 0}, {screen_width-80, screen_height}}
583 };582 };
584583
585 struct ServerConfiguration : mtf::InputTestingServerConfiguration584 struct ServerConfiguration : mtf::InputTestingServerConfiguration
@@ -682,7 +681,7 @@
682 static int const screen_height = 100;681 static int const screen_height = 100;
683 682
684 static geom::Rectangle const screen_geometry{geom::Point{0, 0},683 static geom::Rectangle const screen_geometry{geom::Point{0, 0},
685 geom::Size{geom::Width{screen_width}, geom::Height{screen_height}}};684 geom::Size{screen_width, screen_height}};
686685
687 struct ServerConiguration : mtf::InputTestingServerConfiguration686 struct ServerConiguration : mtf::InputTestingServerConfiguration
688 {687 {
689688
=== modified file 'tests/acceptance-tests/test_surfaceloop.cpp'
--- tests/acceptance-tests/test_surfaceloop.cpp 2013-06-03 08:14:01 +0000
+++ tests/acceptance-tests/test_surfaceloop.cpp 2013-07-12 11:57:23 +0000
@@ -39,7 +39,7 @@
39{39{
40char const* const mir_test_socket = mtf::test_socket_file().c_str();40char const* const mir_test_socket = mtf::test_socket_file().c_str();
4141
42geom::Size const size{geom::Width{640}, geom::Height{480}};42geom::Size const size{640, 480};
43geom::PixelFormat const format{geom::PixelFormat::abgr_8888};43geom::PixelFormat const format{geom::PixelFormat::abgr_8888};
44}44}
4545
4646
=== modified file 'tests/integration-tests/client/test_client_render.cpp'
--- tests/integration-tests/client/test_client_render.cpp 2013-06-20 11:55:33 +0000
+++ tests/integration-tests/client/test_client_render.cpp 2013-07-12 11:57:23 +0000
@@ -448,7 +448,7 @@
448 void SetUp() {448 void SetUp() {
449 ASSERT_FALSE(mtd::is_surface_flinger_running());449 ASSERT_FALSE(mtd::is_surface_flinger_running());
450450
451 size = geom::Size{geom::Width{test_width}, geom::Height{test_height}};451 size = geom::Size{test_width, test_height};
452 pf = geom::PixelFormat::abgr_8888;452 pf = geom::PixelFormat::abgr_8888;
453453
454 auto initializer = std::make_shared<mg::NullBufferInitializer>();454 auto initializer = std::make_shared<mg::NullBufferInitializer>();
455455
=== modified file 'tests/integration-tests/compositor/test_buffer_stream.cpp'
--- tests/integration-tests/compositor/test_buffer_stream.cpp 2013-06-17 15:55:04 +0000
+++ tests/integration-tests/compositor/test_buffer_stream.cpp 2013-07-12 11:57:23 +0000
@@ -45,7 +45,7 @@
4545
46 std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)46 std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)
47 {47 {
48 mc::BufferProperties properties{geom::Size{geom::Width{id}, geom::Height{id}},48 mc::BufferProperties properties{geom::Size{id, id},
49 geom::PixelFormat::abgr_8888,49 geom::PixelFormat::abgr_8888,
50 mc::BufferUsage::hardware};50 mc::BufferUsage::hardware};
51 ++id;51 ++id;
@@ -72,7 +72,7 @@
72 {72 {
73 auto allocator = std::make_shared<StubBufferAllocator>();73 auto allocator = std::make_shared<StubBufferAllocator>();
74 auto factory = std::make_shared<mc::SwapperFactory>(allocator);74 auto factory = std::make_shared<mc::SwapperFactory>(allocator);
75 mc::BufferProperties properties{geom::Size{geom::Width{380}, geom::Height{210}},75 mc::BufferProperties properties{geom::Size{380, 210},
76 geom::PixelFormat::abgr_8888,76 geom::PixelFormat::abgr_8888,
77 mc::BufferUsage::hardware};77 mc::BufferUsage::hardware};
7878
7979
=== modified file 'tests/integration-tests/compositor/test_swapping_swappers.cpp'
--- tests/integration-tests/compositor/test_swapping_swappers.cpp 2013-06-11 19:55:10 +0000
+++ tests/integration-tests/compositor/test_swapping_swappers.cpp 2013-07-12 11:57:23 +0000
@@ -59,7 +59,7 @@
59 {59 {
60 auto allocator = std::make_shared<MockBufferAllocator>();60 auto allocator = std::make_shared<MockBufferAllocator>();
61 auto factory = std::make_shared<mc::SwapperFactory>(allocator, 3);61 auto factory = std::make_shared<mc::SwapperFactory>(allocator, 3);
62 auto properties = mc::BufferProperties{geom::Size{geom::Width{380}, geom::Height{210}},62 auto properties = mc::BufferProperties{geom::Size{380, 210},
63 geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware};63 geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware};
64 switching_bundle = std::make_shared<mc::SwitchingBundle>(factory, properties);64 switching_bundle = std::make_shared<mc::SwitchingBundle>(factory, properties);
65 }65 }
6666
=== modified file 'tests/integration-tests/graphics/android/test_buffer_integration.cpp'
--- tests/integration-tests/graphics/android/test_buffer_integration.cpp 2013-06-11 00:05:53 +0000
+++ tests/integration-tests/graphics/android/test_buffer_integration.cpp 2013-07-12 11:57:23 +0000
@@ -42,8 +42,7 @@
42protected:42protected:
43 virtual void SetUp()43 virtual void SetUp()
44 {44 {
45 size = geom::Size{geom::Width{334},45 size = geom::Size{334, 122};
46 geom::Height{122}};
47 pf = geom::PixelFormat::abgr_8888;46 pf = geom::PixelFormat::abgr_8888;
48 buffer_properties = mc::BufferProperties{size, pf, mc::BufferUsage::software};47 buffer_properties = mc::BufferProperties{size, pf, mc::BufferUsage::software};
49 null_buffer_initializer = std::make_shared<mg::NullBufferInitializer>();48 null_buffer_initializer = std::make_shared<mg::NullBufferInitializer>();
5049
=== modified file 'tests/integration-tests/graphics/android/test_internal_client.cpp'
--- tests/integration-tests/graphics/android/test_internal_client.cpp 2013-07-03 22:07:12 +0000
+++ tests/integration-tests/graphics/android/test_internal_client.cpp 2013-07-12 11:57:23 +0000
@@ -76,8 +76,7 @@
7676
77TEST_F(AndroidInternalClient, internal_client_creation_and_use)77TEST_F(AndroidInternalClient, internal_client_creation_and_use)
78{78{
79 auto size = geom::Size{geom::Width{334},79 auto size = geom::Size{334, 122};
80 geom::Height{122}};
81 auto pf = geom::PixelFormat::abgr_8888;80 auto pf = geom::PixelFormat::abgr_8888;
82 msh::SurfaceCreationParameters params;81 msh::SurfaceCreationParameters params;
83 params.name = std::string("test");82 params.name = std::string("test");
8483
=== modified file 'tests/integration-tests/graphics/gbm/test_buffer_integration.cpp'
--- tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-07-10 08:50:53 +0000
+++ tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-07-12 11:57:23 +0000
@@ -109,7 +109,7 @@
109 display = platform->create_display(conf_policy);109 display = platform->create_display(conf_policy);
110 auto buffer_initializer = std::make_shared<mg::NullBufferInitializer>();110 auto buffer_initializer = std::make_shared<mg::NullBufferInitializer>();
111 allocator = platform->create_buffer_allocator(buffer_initializer);111 allocator = platform->create_buffer_allocator(buffer_initializer);
112 size = geom::Size{geom::Width{100}, geom::Height{100}};112 size = geom::Size{100, 100};
113 pf = geom::PixelFormat::abgr_8888;113 pf = geom::PixelFormat::abgr_8888;
114 usage = mc::BufferUsage::hardware;114 usage = mc::BufferUsage::hardware;
115 buffer_properties = mc::BufferProperties{size, pf, usage};115 buffer_properties = mc::BufferProperties{size, pf, usage};
116116
=== modified file 'tests/integration-tests/input/android/test_android_cursor_listener.cpp'
--- tests/integration-tests/input/android/test_android_cursor_listener.cpp 2013-07-01 17:01:15 +0000
+++ tests/integration-tests/input/android/test_android_cursor_listener.cpp 2013-07-12 11:57:23 +0000
@@ -72,7 +72,7 @@
72 static const geom::Rectangle visible_rectangle72 static const geom::Rectangle visible_rectangle
73 {73 {
74 geom::Point(),74 geom::Point(),
75 geom::Size{geom::Width(1024), geom::Height(1024)}75 geom::Size{1024, 1024}
76 };76 };
7777
78 event_filter = std::make_shared<MockEventFilter>();78 event_filter = std::make_shared<MockEventFilter>();
7979
=== modified file 'tests/integration-tests/input/android/test_android_input_manager.cpp'
--- tests/integration-tests/input/android/test_android_input_manager.cpp 2013-07-05 21:27:14 +0000
+++ tests/integration-tests/input/android/test_android_input_manager.cpp 2013-07-12 11:57:23 +0000
@@ -64,9 +64,7 @@
64{64{
65using namespace ::testing;65using namespace ::testing;
6666
67static const geom::Rectangle default_view_area =67static const geom::Rectangle default_view_area{geom::Point(), geom::Size{1600, 1400}};
68 geom::Rectangle{geom::Point(),
69 geom::Size{geom::Width(1600), geom::Height(1400)}};
7068
71static const std::shared_ptr<mi::CursorListener> null_cursor_listener{};69static const std::shared_ptr<mi::CursorListener> null_cursor_listener{};
7270
7371
=== modified file 'tests/integration-tests/test_display_info.cpp'
--- tests/integration-tests/test_display_info.cpp 2013-07-10 08:50:53 +0000
+++ tests/integration-tests/test_display_info.cpp 2013-07-12 11:57:23 +0000
@@ -50,7 +50,7 @@
50};50};
5151
52geom::Rectangle const StubDisplay::rectangle{geom::Point{geom::X{25}, geom::Y{36}},52geom::Rectangle const StubDisplay::rectangle{geom::Point{geom::X{25}, geom::Y{36}},
53 geom::Size{geom::Width{49}, geom::Height{64}}};53 geom::Size{49, 64}};
5454
55}55}
56}56}
5757
=== modified file 'tests/integration-tests/test_surface_first_frame_sync.cpp'
--- tests/integration-tests/test_surface_first_frame_sync.cpp 2013-06-28 12:00:04 +0000
+++ tests/integration-tests/test_surface_first_frame_sync.cpp 2013-07-12 11:57:23 +0000
@@ -105,8 +105,7 @@
105 geom::Rectangle view_area() const105 geom::Rectangle view_area() const
106 {106 {
107 return geom::Rectangle{geom::Point(),107 return geom::Rectangle{geom::Point(),
108 geom::Size{geom::Width(1600),108 geom::Size{1600, 1600}};
109 geom::Height(1600)}};
110 }109 }
111 void make_current() {}110 void make_current() {}
112 void release_current() {}111 void release_current() {}
113112
=== modified file 'tests/integration-tests/test_surfaceloop.cpp'
--- tests/integration-tests/test_surfaceloop.cpp 2013-07-10 08:50:53 +0000
+++ tests/integration-tests/test_surfaceloop.cpp 2013-07-12 11:57:23 +0000
@@ -50,7 +50,7 @@
50{50{
51char const* const mir_test_socket = mtf::test_socket_file().c_str();51char const* const mir_test_socket = mtf::test_socket_file().c_str();
5252
53geom::Size const size{geom::Width{640}, geom::Height{480}};53geom::Size const size{640, 480};
54geom::PixelFormat const format{geom::PixelFormat::abgr_8888};54geom::PixelFormat const format{geom::PixelFormat::abgr_8888};
55mc::BufferUsage const usage{mc::BufferUsage::hardware};55mc::BufferUsage const usage{mc::BufferUsage::hardware};
56mc::BufferProperties const buffer_properties{size, format, usage};56mc::BufferProperties const buffer_properties{size, format, usage};
@@ -97,8 +97,7 @@
97 geom::Rectangle view_area() const override97 geom::Rectangle view_area() const override
98 {98 {
99 return geom::Rectangle{geom::Point(),99 return geom::Rectangle{geom::Point(),
100 geom::Size{geom::Width(1600),100 geom::Size{1600, 1600}};
101 geom::Height(1600)}};
102 }101 }
103};102};
104103
105104
=== modified file 'tests/mir_test_doubles/mock_drm.cpp'
--- tests/mir_test_doubles/mock_drm.cpp 2013-07-04 07:51:30 +0000
+++ tests/mir_test_doubles/mock_drm.cpp 2013-07-12 11:57:23 +0000
@@ -65,7 +65,7 @@
65 modes_empty, connector_encoder_ids, geom::Size());65 modes_empty, connector_encoder_ids, geom::Size());
66 add_connector(connector1_id, DRM_MODE_CONNECTED, encoder1_id,66 add_connector(connector1_id, DRM_MODE_CONNECTED, encoder1_id,
67 modes, connector_encoder_ids,67 modes, connector_encoder_ids,
68 geom::Size{geom::Width{121}, geom::Height{144}});68 geom::Size{121, 144});
6969
70 prepare();70 prepare();
71}71}
7272
=== modified file 'tests/mir_test_framework/input_testing_server_options.cpp'
--- tests/mir_test_framework/input_testing_server_options.cpp 2013-07-10 17:06:37 +0000
+++ tests/mir_test_framework/input_testing_server_options.cpp 2013-07-12 11:57:23 +0000
@@ -181,8 +181,7 @@
181181
182geom::Rectangle mtf::InputTestingServerConfiguration::the_screen_geometry()182geom::Rectangle mtf::InputTestingServerConfiguration::the_screen_geometry()
183{183{
184 static geom::Rectangle const default_geometry{geom::Point{0, 0},184 static geom::Rectangle const default_geometry{geom::Point{0, 0}, geom::Size{1600, 1600}};
185 geom::Size{geom::Width{1600}, geom::Height{1600}}};
186 return default_geometry;185 return default_geometry;
187}186}
188187
189188
=== modified file 'tests/mir_test_framework/testing_server_options.cpp'
--- tests/mir_test_framework/testing_server_options.cpp 2013-07-10 08:50:53 +0000
+++ tests/mir_test_framework/testing_server_options.cpp 2013-07-12 11:57:23 +0000
@@ -71,9 +71,7 @@
71public:71public:
72 geom::Rectangle view_area() const override72 geom::Rectangle view_area() const override
73 {73 {
74 return geom::Rectangle{geom::Point(),74 return geom::Rectangle{geom::Point(), geom::Size{1600, 1600}};
75 geom::Size{geom::Width(1600),
76 geom::Height(1600)}};
77 }75 }
78};76};
7977
8078
=== modified file 'tests/unit-tests/client/android/test_client_android_registrar.cpp'
--- tests/unit-tests/client/android/test_client_android_registrar.cpp 2013-07-04 22:33:02 +0000
+++ tests/unit-tests/client/android/test_client_android_registrar.cpp 2013-07-12 11:57:23 +0000
@@ -103,7 +103,7 @@
103 auto t = geom::X(top);103 auto t = geom::X(top);
104 auto l = geom::Y(left);104 auto l = geom::Y(left);
105 auto pt = geom::Point{t,l};105 auto pt = geom::Point{t,l};
106 rect = geom::Rectangle{ pt, {geom::Width(width), geom::Height(height)}};106 rect = geom::Rectangle{ pt, {width, height}};
107 package = std::make_shared<MirBufferPackage>();107 package = std::make_shared<MirBufferPackage>();
108 package->fd_items = 4;108 package->fd_items = 4;
109 package->data_items = 21;109 package->data_items = 21;
@@ -214,7 +214,7 @@
214 auto t = geom::X(top);214 auto t = geom::X(top);
215 auto l = geom::Y(left);215 auto l = geom::Y(left);
216 auto pt = geom::Point{t,l};216 auto pt = geom::Point{t,l};
217 rect = geom::Rectangle{ pt, {geom::Width(width), geom::Height(height)}};217 rect = geom::Rectangle{ pt, {width, height}};
218 fake_package = std::make_shared<native_handle_t>();218 fake_package = std::make_shared<native_handle_t>();
219 }219 }
220220
221221
=== modified file 'tests/unit-tests/compositor/test_buffer_properties.cpp'
--- tests/unit-tests/compositor/test_buffer_properties.cpp 2012-12-19 16:01:00 +0000
+++ tests/unit-tests/compositor/test_buffer_properties.cpp 2013-07-12 11:57:23 +0000
@@ -39,7 +39,7 @@
3939
40TEST(buffer_properties, custom_create)40TEST(buffer_properties, custom_create)
41{41{
42 geom::Size size{geom::Width{66}, geom::Height{166}};42 geom::Size size{66, 166};
43 geom::PixelFormat pixel_format{geom::PixelFormat::abgr_8888};43 geom::PixelFormat pixel_format{geom::PixelFormat::abgr_8888};
44 mc::BufferUsage usage{mc::BufferUsage::hardware};44 mc::BufferUsage usage{mc::BufferUsage::hardware};
4545
@@ -52,7 +52,7 @@
5252
53TEST(buffer_properties, equal_properties_test_equal)53TEST(buffer_properties, equal_properties_test_equal)
54{54{
55 geom::Size size{geom::Width{66}, geom::Height{166}};55 geom::Size size{66, 166};
56 geom::PixelFormat pixel_format{geom::PixelFormat::abgr_8888};56 geom::PixelFormat pixel_format{geom::PixelFormat::abgr_8888};
57 mc::BufferUsage usage{mc::BufferUsage::hardware};57 mc::BufferUsage usage{mc::BufferUsage::hardware};
5858
5959
=== modified file 'tests/unit-tests/compositor/test_buffer_stream.cpp'
--- tests/unit-tests/compositor/test_buffer_stream.cpp 2013-06-19 18:33:24 +0000
+++ tests/unit-tests/compositor/test_buffer_stream.cpp 2013-07-12 11:57:23 +0000
@@ -45,7 +45,7 @@
4545
46TEST_F(BufferStreamTest, size_query)46TEST_F(BufferStreamTest, size_query)
47{47{
48 geom::Size size{geom::Width{4},geom::Height{5}};48 geom::Size size{4, 5};
49 mc::BufferProperties properties {size, geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware};49 mc::BufferProperties properties {size, geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware};
50 EXPECT_CALL(*mock_bundle, properties())50 EXPECT_CALL(*mock_bundle, properties())
51 .Times(1)51 .Times(1)
@@ -59,8 +59,7 @@
59TEST_F(BufferStreamTest, pixel_format_query)59TEST_F(BufferStreamTest, pixel_format_query)
60{60{
61 geom::PixelFormat format{geom::PixelFormat::abgr_8888};61 geom::PixelFormat format{geom::PixelFormat::abgr_8888};
62 mc::BufferProperties properties {geom::Size{geom::Width{4},geom::Height{5}},62 mc::BufferProperties properties {geom::Size{4, 5}, format, mc::BufferUsage::hardware};
63 format, mc::BufferUsage::hardware};
64 EXPECT_CALL(*mock_bundle, properties())63 EXPECT_CALL(*mock_bundle, properties())
65 .Times(1)64 .Times(1)
66 .WillOnce(testing::Return(properties));65 .WillOnce(testing::Return(properties));
6766
=== modified file 'tests/unit-tests/compositor/test_swapper_factory.cpp'
--- tests/unit-tests/compositor/test_swapper_factory.cpp 2013-06-17 19:11:59 +0000
+++ tests/unit-tests/compositor/test_swapper_factory.cpp 2013-07-12 11:57:23 +0000
@@ -33,7 +33,7 @@
3333
34namespace34namespace
35{35{
36static geom::Size const buf_size{geom::Width{100}, geom::Height{121}};36static geom::Size const buf_size{100, 121};
37static geom::PixelFormat const buf_pixel_format{geom::PixelFormat::xbgr_8888};37static geom::PixelFormat const buf_pixel_format{geom::PixelFormat::xbgr_8888};
3838
39class MockGraphicBufferAllocator : public mc::GraphicBufferAllocator39class MockGraphicBufferAllocator : public mc::GraphicBufferAllocator
@@ -56,7 +56,7 @@
56{56{
57 SwapperFactoryTest()57 SwapperFactoryTest()
58 : mock_buffer_allocator{std::make_shared<testing::NiceMock<MockGraphicBufferAllocator>>()},58 : mock_buffer_allocator{std::make_shared<testing::NiceMock<MockGraphicBufferAllocator>>()},
59 size{geom::Width{10},geom::Height{20}},59 size{10, 20},
60 pf{geom::PixelFormat::abgr_8888},60 pf{geom::PixelFormat::abgr_8888},
61 usage{mc::BufferUsage::hardware},61 usage{mc::BufferUsage::hardware},
62 properties{size, pf, usage}62 properties{size, pf, usage}
6363
=== modified file 'tests/unit-tests/compositor/test_switching_bundle.cpp'
--- tests/unit-tests/compositor/test_switching_bundle.cpp 2013-06-14 00:08:30 +0000
+++ tests/unit-tests/compositor/test_switching_bundle.cpp 2013-07-12 11:57:23 +0000
@@ -37,7 +37,7 @@
37 mock_default_swapper = std::make_shared<testing::NiceMock<mtd::MockSwapper>>();37 mock_default_swapper = std::make_shared<testing::NiceMock<mtd::MockSwapper>>();
38 mock_secondary_swapper = std::make_shared<testing::NiceMock<mtd::MockSwapper>>();38 mock_secondary_swapper = std::make_shared<testing::NiceMock<mtd::MockSwapper>>();
39 stub_buffer = std::make_shared<mtd::StubBuffer>();39 stub_buffer = std::make_shared<mtd::StubBuffer>();
40 properties = mc::BufferProperties{geom::Size{geom::Width{4}, geom::Height{2}},40 properties = mc::BufferProperties{geom::Size{4, 2},
41 geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware};41 geom::PixelFormat::abgr_8888, mc::BufferUsage::hardware};
4242
43 ON_CALL(*mock_swapper_factory, create_swapper_new_buffers(_,_,_))43 ON_CALL(*mock_swapper_factory, create_swapper_new_buffers(_,_,_))
@@ -54,7 +54,7 @@
54TEST_F(SwitchingBundleTest, sync_swapper_by_default)54TEST_F(SwitchingBundleTest, sync_swapper_by_default)
55{55{
56 using namespace testing;56 using namespace testing;
57 auto actual_properties = mc::BufferProperties{geom::Size{geom::Width{7}, geom::Height{8}},57 auto actual_properties = mc::BufferProperties{geom::Size{7, 8},
58 geom::PixelFormat::argb_8888, mc::BufferUsage::software};58 geom::PixelFormat::argb_8888, mc::BufferUsage::software};
59 EXPECT_CALL(*mock_swapper_factory, create_swapper_new_buffers(_,_,mc::SwapperType::synchronous))59 EXPECT_CALL(*mock_swapper_factory, create_swapper_new_buffers(_,_,mc::SwapperType::synchronous))
60 .Times(1)60 .Times(1)
6161
=== modified file 'tests/unit-tests/compositor/test_temporary_buffers.cpp'
--- tests/unit-tests/compositor/test_temporary_buffers.cpp 2013-06-18 09:44:11 +0000
+++ tests/unit-tests/compositor/test_temporary_buffers.cpp 2013-07-12 11:57:23 +0000
@@ -51,7 +51,7 @@
51{51{
52public:52public:
53 TemporaryBuffersTest()53 TemporaryBuffersTest()
54 : buffer_size{geom::Width{1024}, geom::Height{768}},54 : buffer_size{1024, 768},
55 buffer_stride{1024},55 buffer_stride{1024},
56 buffer_pixel_format{geom::PixelFormat::abgr_8888},56 buffer_pixel_format{geom::PixelFormat::abgr_8888},
57 mock_buffer{std::make_shared<testing::NiceMock<mtd::MockBuffer>>(57 mock_buffer{std::make_shared<testing::NiceMock<mtd::MockBuffer>>(
5858
=== modified file 'tests/unit-tests/geometry/test-rectangle.cpp'
--- tests/unit-tests/geometry/test-rectangle.cpp 2013-03-21 03:32:59 +0000
+++ tests/unit-tests/geometry/test-rectangle.cpp 2013-07-12 11:57:23 +0000
@@ -27,7 +27,7 @@
27{27{
28 using namespace geom;28 using namespace geom;
29 Point const x3y9{X(3), Y(9)};29 Point const x3y9{X(3), Y(9)};
30 Size const w2h4{Width(2), Height(4)};30 Size const w2h4{2, 4};
31 Rectangle const rect{x3y9, w2h4};31 Rectangle const rect{x3y9, w2h4};
3232
33 EXPECT_EQ(x3y9, rect.top_left);33 EXPECT_EQ(x3y9, rect.top_left);
3434
=== modified file 'tests/unit-tests/geometry/test-size.cpp'
--- tests/unit-tests/geometry/test-size.cpp 2012-09-18 09:44:45 +0000
+++ tests/unit-tests/geometry/test-size.cpp 2013-07-12 11:57:23 +0000
@@ -26,7 +26,7 @@
26TEST(geometry, size)26TEST(geometry, size)
27{27{
28 using namespace geom;28 using namespace geom;
29 Size const size2x4{Width(2), Height(4)};29 Size const size2x4{2, 4};
3030
31 EXPECT_EQ(Width(2), size2x4.width);31 EXPECT_EQ(Width(2), size2x4.width);
32 EXPECT_EQ(Height(4), size2x4.height);32 EXPECT_EQ(Height(4), size2x4.height);
3333
=== modified file 'tests/unit-tests/graphics/android/test_android_alloc_adaptor.cpp'
--- tests/unit-tests/graphics/android/test_android_alloc_adaptor.cpp 2013-06-18 20:06:22 +0000
+++ tests/unit-tests/graphics/android/test_android_alloc_adaptor.cpp 2013-07-12 11:57:23 +0000
@@ -48,7 +48,7 @@
48 alloc_adaptor = std::make_shared<mga::AndroidAllocAdaptor>(mock_alloc_device);48 alloc_adaptor = std::make_shared<mga::AndroidAllocAdaptor>(mock_alloc_device);
4949
50 pf = geom::PixelFormat::abgr_8888;50 pf = geom::PixelFormat::abgr_8888;
51 size = geom::Size{geom::Width{300}, geom::Height{200}};51 size = geom::Size{300, 200};
52 usage = mga::BufferUsage::use_hardware;52 usage = mga::BufferUsage::use_hardware;
53 }53 }
5454
5555
=== modified file 'tests/unit-tests/graphics/android/test_android_buffer_allocator.cpp'
--- tests/unit-tests/graphics/android/test_android_buffer_allocator.cpp 2013-06-14 18:20:39 +0000
+++ tests/unit-tests/graphics/android/test_android_buffer_allocator.cpp 2013-07-12 11:57:23 +0000
@@ -93,7 +93,7 @@
9393
94 auto buffer_initializer = std::make_shared<mtd::MockBufferInitializer>();94 auto buffer_initializer = std::make_shared<mtd::MockBufferInitializer>();
9595
96 mc::BufferProperties properties{geom::Size{geom::Width{2}, geom::Height{2}},96 mc::BufferProperties properties{geom::Size{2, 2},
97 geom::PixelFormat::abgr_8888,97 geom::PixelFormat::abgr_8888,
98 mc::BufferUsage::hardware};98 mc::BufferUsage::hardware};
99 mga::AndroidGraphicBufferAllocator allocator{buffer_initializer};99 mga::AndroidGraphicBufferAllocator allocator{buffer_initializer};
@@ -110,7 +110,7 @@
110 auto buffer_initializer = std::make_shared<mtd::MockBufferInitializer>();110 auto buffer_initializer = std::make_shared<mtd::MockBufferInitializer>();
111111
112 mga::AndroidGraphicBufferAllocator allocator{buffer_initializer};112 mga::AndroidGraphicBufferAllocator allocator{buffer_initializer};
113 auto size = geom::Size{geom::Width{2}, geom::Height{2}};113 auto size = geom::Size{2, 2};
114 auto pf = geom::PixelFormat::abgr_8888;114 auto pf = geom::PixelFormat::abgr_8888;
115115
116 EXPECT_CALL(*buffer_initializer, operator_call(_))116 EXPECT_CALL(*buffer_initializer, operator_call(_))
117117
=== modified file 'tests/unit-tests/graphics/android/test_buffer.cpp'
--- tests/unit-tests/graphics/android/test_buffer.cpp 2013-06-14 17:26:03 +0000
+++ tests/unit-tests/graphics/android/test_buffer.cpp 2013-07-12 11:57:23 +0000
@@ -45,7 +45,7 @@
4545
46 default_use = mga::BufferUsage::use_hardware;46 default_use = mga::BufferUsage::use_hardware;
47 pf = geom::PixelFormat::abgr_8888;47 pf = geom::PixelFormat::abgr_8888;
48 size = geom::Size{geom::Width{300}, geom::Height{200}};48 size = geom::Size{300, 200};
49 extensions = std::make_shared<mg::EGLExtensions>();49 extensions = std::make_shared<mg::EGLExtensions>();
50 }50 }
5151
@@ -63,8 +63,7 @@
6363
64 mga::Buffer buffer(mock_buffer_handle, extensions);64 mga::Buffer buffer(mock_buffer_handle, extensions);
6565
66 geom::Size expected_size{geom::Width{mock_buffer_handle->width},66 geom::Size expected_size{mock_buffer_handle->width, mock_buffer_handle->height};
67 geom::Height{mock_buffer_handle->height}};
68 EXPECT_EQ(expected_size, buffer.size());67 EXPECT_EQ(expected_size, buffer.size());
69}68}
7069
7170
=== modified file 'tests/unit-tests/graphics/android/test_buffer_tex_bind.cpp'
--- tests/unit-tests/graphics/android/test_buffer_tex_bind.cpp 2013-06-14 17:44:22 +0000
+++ tests/unit-tests/graphics/android/test_buffer_tex_bind.cpp 2013-07-12 11:57:23 +0000
@@ -38,7 +38,7 @@
38 using namespace testing;38 using namespace testing;
3939
40 stub_buffer = std::make_shared<ANativeWindowBuffer>();40 stub_buffer = std::make_shared<ANativeWindowBuffer>();
41 size = geom::Size{geom::Width{300}, geom::Height{220}};41 size = geom::Size{300, 220};
42 pf = geom::PixelFormat::abgr_8888;42 pf = geom::PixelFormat::abgr_8888;
43 extensions = std::make_shared<mg::EGLExtensions>();43 extensions = std::make_shared<mg::EGLExtensions>();
4444
4545
=== modified file 'tests/unit-tests/graphics/android/test_framebuffer_factory.cpp'
--- tests/unit-tests/graphics/android/test_framebuffer_factory.cpp 2013-05-24 15:44:11 +0000
+++ tests/unit-tests/graphics/android/test_framebuffer_factory.cpp 2013-07-12 11:57:23 +0000
@@ -59,7 +59,7 @@
59 ON_CALL(*mock_display_info_provider, display_format())59 ON_CALL(*mock_display_info_provider, display_format())
60 .WillByDefault(Return(geom::PixelFormat::abgr_8888));60 .WillByDefault(Return(geom::PixelFormat::abgr_8888));
61 ON_CALL(*mock_display_info_provider, display_size())61 ON_CALL(*mock_display_info_provider, display_size())
62 .WillByDefault(Return(geom::Size{geom::Width{2}, geom::Height{3}}));62 .WillByDefault(Return(geom::Size{2, 3}));
63 ON_CALL(*mock_display_info_provider, number_of_framebuffers_available())63 ON_CALL(*mock_display_info_provider, number_of_framebuffers_available())
64 .WillByDefault(Return(fake_fb_num));64 .WillByDefault(Return(fake_fb_num));
65 ON_CALL(*mock_buffer_allocator, alloc_buffer_platform(_,_,_))65 ON_CALL(*mock_buffer_allocator, alloc_buffer_platform(_,_,_))
6666
=== modified file 'tests/unit-tests/graphics/android/test_hwc10_device.cpp'
--- tests/unit-tests/graphics/android/test_hwc10_device.cpp 2013-05-17 20:43:23 +0000
+++ tests/unit-tests/graphics/android/test_hwc10_device.cpp 2013-07-12 11:57:23 +0000
@@ -36,7 +36,7 @@
36 virtual void SetUp()36 virtual void SetUp()
37 {37 {
38 using namespace testing;38 using namespace testing;
39 test_size = geom::Size{geom::Width{88}, geom::Height{4}};39 test_size = geom::Size{88, 4};
40 test_pf = geom::PixelFormat::abgr_8888;40 test_pf = geom::PixelFormat::abgr_8888;
41 test_numfb = 558u;41 test_numfb = 558u;
42 mock_device = std::make_shared<testing::NiceMock<mtd::MockHWCComposerDevice1>>();42 mock_device = std::make_shared<testing::NiceMock<mtd::MockHWCComposerDevice1>>();
4343
=== modified file 'tests/unit-tests/graphics/android/test_hwc_display.cpp'
--- tests/unit-tests/graphics/android/test_hwc_display.cpp 2013-05-22 06:30:39 +0000
+++ tests/unit-tests/graphics/android/test_hwc_display.cpp 2013-07-12 11:57:23 +0000
@@ -70,7 +70,7 @@
70{70{
71 using namespace testing;71 using namespace testing;
7272
73 geom::Size fake_display_size{geom::Width{223}, geom::Height{332}};73 geom::Size fake_display_size{223, 332};
74 EXPECT_CALL(*mock_hwc_device, display_size())74 EXPECT_CALL(*mock_hwc_device, display_size())
75 .Times(1)75 .Times(1)
76 .WillOnce(Return(fake_display_size)); 76 .WillOnce(Return(fake_display_size));
7777
=== modified file 'tests/unit-tests/graphics/android/test_hwc_layerlist.cpp'
--- tests/unit-tests/graphics/android/test_hwc_layerlist.cpp 2013-05-02 00:34:03 +0000
+++ tests/unit-tests/graphics/android/test_hwc_layerlist.cpp 2013-07-12 11:57:23 +0000
@@ -35,8 +35,7 @@
3535
36 width = 432; 36 width = 432;
37 height = 876; 37 height = 876;
38 default_size = geom::Size{geom::Width{width},38 default_size = geom::Size{width, height};
39 geom::Height{height}};
4039
41 stub_handle_1 = std::make_shared<ANativeWindowBuffer>();40 stub_handle_1 = std::make_shared<ANativeWindowBuffer>();
42 stub_handle_2 = std::make_shared<ANativeWindowBuffer>();41 stub_handle_2 = std::make_shared<ANativeWindowBuffer>();
@@ -66,11 +65,11 @@
66 EXPECT_EQ(nullptr, layer.visibleRegionScreen.rects);65 EXPECT_EQ(nullptr, layer.visibleRegionScreen.rects);
6766
68 geom::Rectangle r0{geom::Point{geom::X{0},geom::Y{1}},67 geom::Rectangle r0{geom::Point{geom::X{0},geom::Y{1}},
69 geom::Size{geom::Width{2},geom::Height{3}}}; 68 geom::Size{2, 3}};
70 geom::Rectangle r1{geom::Point{geom::X{0},geom::Y{1}},69 geom::Rectangle r1{geom::Point{geom::X{0},geom::Y{1}},
71 geom::Size{geom::Width{3},geom::Height{3}}}; 70 geom::Size{3, 3}};
72 geom::Rectangle r2{geom::Point{geom::X{1},geom::Y{1}},71 geom::Rectangle r2{geom::Point{geom::X{1},geom::Y{1}},
73 geom::Size{geom::Width{2},geom::Height{3}}}; 72 geom::Size{2, 3}};
74 mga::HWCRect a(r0), b(r1), c(r2);73 mga::HWCRect a(r0), b(r1), c(r2);
75 mga::HWCDefaultLayer original2({a, b, c});74 mga::HWCDefaultLayer original2({a, b, c});
76 layer = original2;75 layer = original2;
7776
=== modified file 'tests/unit-tests/graphics/android/test_internal_client.cpp'
--- tests/unit-tests/graphics/android/test_internal_client.cpp 2013-06-25 05:42:49 +0000
+++ tests/unit-tests/graphics/android/test_internal_client.cpp 2013-07-12 11:57:23 +0000
@@ -37,7 +37,7 @@
37 }37 }
38 geom::Size size() const38 geom::Size size() const
39 {39 {
40 return geom::Size{geom::Width{4},geom::Height{2}};40 return {4, 2};
41 }41 }
42 geom::PixelFormat pixel_format() const42 geom::PixelFormat pixel_format() const
43 {43 {
4444
=== modified file 'tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp'
--- tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp 2013-06-25 05:42:49 +0000
+++ tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp 2013-07-12 11:57:23 +0000
@@ -52,7 +52,7 @@
52 void SetUp()52 void SetUp()
53 {53 {
54 using namespace testing;54 using namespace testing;
55 sz = geom::Size{geom::Width{4}, geom::Height{23}};55 sz = geom::Size{4, 23};
56 pf = geom::PixelFormat::abgr_8888;56 pf = geom::PixelFormat::abgr_8888;
57 mock_cache = std::make_shared<mtd::MockInterpreterResourceCache>();57 mock_cache = std::make_shared<mtd::MockInterpreterResourceCache>();
58 mock_surface = std::make_shared<MockSurface>();58 mock_surface = std::make_shared<MockSurface>();
5959
=== modified file 'tests/unit-tests/graphics/android/test_server_interpreter.cpp'
--- tests/unit-tests/graphics/android/test_server_interpreter.cpp 2013-05-16 19:43:56 +0000
+++ tests/unit-tests/graphics/android/test_server_interpreter.cpp 2013-07-12 11:57:23 +0000
@@ -180,7 +180,7 @@
180TEST_F(ServerRenderWindowTest, driver_inquires_about_size_without_having_been_set)180TEST_F(ServerRenderWindowTest, driver_inquires_about_size_without_having_been_set)
181{181{
182 using namespace testing;182 using namespace testing;
183 auto test_size = geom::Size{geom::Width{4}, geom::Height{5}};183 geom::Size test_size{4, 5};
184 EXPECT_CALL(*mock_display_poster, display_size())184 EXPECT_CALL(*mock_display_poster, display_size())
185 .Times(4)185 .Times(4)
186 .WillRepeatedly(Return(test_size));186 .WillRepeatedly(Return(test_size));
187187
=== modified file 'tests/unit-tests/graphics/gbm/test_gbm_buffer.cpp'
--- tests/unit-tests/graphics/gbm/test_gbm_buffer.cpp 2013-07-01 06:53:02 +0000
+++ tests/unit-tests/graphics/gbm/test_gbm_buffer.cpp 2013-07-12 11:57:23 +0000
@@ -56,7 +56,7 @@
5656
57 fake_devices.add_standard_drm_devices();57 fake_devices.add_standard_drm_devices();
5858
59 size = geom::Size{geom::Width{300}, geom::Height{200}};59 size = geom::Size{300, 200};
60 pf = geom::PixelFormat::argb_8888;60 pf = geom::PixelFormat::argb_8888;
61 stride = geom::Stride{4 * size.width.as_uint32_t()};61 stride = geom::Stride{4 * size.width.as_uint32_t()};
62 usage = mc::BufferUsage::hardware;62 usage = mc::BufferUsage::hardware;
6363
=== modified file 'tests/unit-tests/graphics/gbm/test_gbm_buffer_allocator.cpp'
--- tests/unit-tests/graphics/gbm/test_gbm_buffer_allocator.cpp 2013-07-01 06:53:02 +0000
+++ tests/unit-tests/graphics/gbm/test_gbm_buffer_allocator.cpp 2013-07-12 11:57:23 +0000
@@ -54,7 +54,7 @@
5454
55 fake_devices.add_standard_drm_devices();55 fake_devices.add_standard_drm_devices();
5656
57 size = geom::Size{geom::Width{300}, geom::Height{200}};57 size = geom::Size{300, 200};
58 pf = geom::PixelFormat::argb_8888;58 pf = geom::PixelFormat::argb_8888;
59 usage = mc::BufferUsage::hardware;59 usage = mc::BufferUsage::hardware;
60 buffer_properties = mc::BufferProperties{size, pf, usage};60 buffer_properties = mc::BufferProperties{size, pf, usage};
6161
=== modified file 'tests/unit-tests/graphics/gbm/test_gbm_display_configuration.cpp'
--- tests/unit-tests/graphics/gbm/test_gbm_display_configuration.cpp 2013-07-10 08:50:53 +0000
+++ tests/unit-tests/graphics/gbm/test_gbm_display_configuration.cpp 2013-07-12 11:57:23 +0000
@@ -49,7 +49,7 @@
4949
50mg::DisplayConfigurationMode conf_mode_from_drm_mode(drmModeModeInfo const& mode)50mg::DisplayConfigurationMode conf_mode_from_drm_mode(drmModeModeInfo const& mode)
51{51{
52 geom::Size const size{geom::Width{mode.hdisplay}, geom::Height{mode.vdisplay}};52 geom::Size const size{mode.hdisplay, mode.vdisplay};
53 double vrefresh_hz{0.0};53 double vrefresh_hz{0.0};
5454
55 /* Calculate vertical refresh rate from DRM mode information */55 /* Calculate vertical refresh rate from DRM mode information */
@@ -141,7 +141,7 @@
141 uint32_t const connector0_id{30};141 uint32_t const connector0_id{30};
142 uint32_t const connector1_id{31};142 uint32_t const connector1_id{31};
143 uint32_t const connector2_id{32};143 uint32_t const connector2_id{32};
144 geom::Size const connector0_physical_size_mm{geom::Width{480}, geom::Height{270}};144 geom::Size const connector0_physical_size_mm{480, 270};
145 geom::Size const connector1_physical_size_mm{};145 geom::Size const connector1_physical_size_mm{};
146 geom::Size const connector2_physical_size_mm{};146 geom::Size const connector2_physical_size_mm{};
147 std::vector<uint32_t> possible_encoder_ids_empty;147 std::vector<uint32_t> possible_encoder_ids_empty;
@@ -309,10 +309,10 @@
309 std::vector<uint32_t> const encoder_ids{20, 21};309 std::vector<uint32_t> const encoder_ids{20, 21};
310 std::vector<uint32_t> const connector_ids{30, 31};310 std::vector<uint32_t> const connector_ids{30, 31};
311 std::vector<geom::Size> const connector_physical_sizes_mm_before{311 std::vector<geom::Size> const connector_physical_sizes_mm_before{
312 {geom::Width{480}, geom::Height{270}}, {}312 {480, 270}, {}
313 };313 };
314 std::vector<geom::Size> const connector_physical_sizes_mm_after{314 std::vector<geom::Size> const connector_physical_sizes_mm_after{
315 {}, {geom::Width{512}, geom::Height{642}}315 {}, {512, 642}
316 };316 };
317 std::vector<uint32_t> possible_encoder_ids_empty;317 std::vector<uint32_t> possible_encoder_ids_empty;
318 uint32_t const possible_crtcs_mask_empty{0};318 uint32_t const possible_crtcs_mask_empty{0};
319319
=== modified file 'tests/unit-tests/graphics/gbm/test_gbm_display_multi_monitor.cpp'
--- tests/unit-tests/graphics/gbm/test_gbm_display_multi_monitor.cpp 2013-07-10 08:50:53 +0000
+++ tests/unit-tests/graphics/gbm/test_gbm_display_multi_monitor.cpp 2013-07-12 11:57:23 +0000
@@ -100,7 +100,7 @@
100 modes0.push_back(mtd::FakeDRMResources::create_mode(1680, 1050, 119000, 1840, 1080));100 modes0.push_back(mtd::FakeDRMResources::create_mode(1680, 1050, 119000, 1840, 1080));
101 modes0.push_back(mtd::FakeDRMResources::create_mode(832, 624, 57284, 1152, 667));101 modes0.push_back(mtd::FakeDRMResources::create_mode(832, 624, 57284, 1152, 667));
102102
103 geom::Size const connector_physical_size_mm{geom::Width{1597}, geom::Height{987}};103 geom::Size const connector_physical_size_mm{1597, 987};
104104
105 resources.reset();105 resources.reset();
106106
107107
=== modified file 'tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp'
--- tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp 2013-06-25 05:42:49 +0000
+++ tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp 2013-07-12 11:57:23 +0000
@@ -146,8 +146,7 @@
146{146{
147 using namespace ::testing;147 using namespace ::testing;
148 148
149 geom::Size const test_surface_size = geom::Size{geom::Width{17},149 geom::Size const test_surface_size{17, 29};
150 geom::Height{29}};
151 geom::PixelFormat const test_pixel_format = geom::PixelFormat::xrgb_8888;150 geom::PixelFormat const test_pixel_format = geom::PixelFormat::xrgb_8888;
152 EXPECT_CALL(*mock_surface, size())151 EXPECT_CALL(*mock_surface, size())
153 .Times(1)152 .Times(1)
154153
=== modified file 'tests/unit-tests/graphics/test_default_display_configuration_policy.cpp'
--- tests/unit-tests/graphics/test_default_display_configuration_policy.cpp 2013-07-10 08:50:53 +0000
+++ tests/unit-tests/graphics/test_default_display_configuration_policy.cpp 2013-07-12 11:57:23 +0000
@@ -40,11 +40,11 @@
40 mg::DisplayConfigurationOutputId{10},40 mg::DisplayConfigurationOutputId{10},
41 card_id,41 card_id,
42 {42 {
43 {geom::Size{geom::Width{123}, geom::Height{111}}, 59.9},43 {geom::Size{123, 111}, 59.9},
44 {geom::Size{geom::Width{123}, geom::Height{111}}, 59.9},44 {geom::Size{123, 111}, 59.9},
45 {geom::Size{geom::Width{123}, geom::Height{111}}, 59.9}45 {geom::Size{123, 111}, 59.9}
46 },46 },
47 geom::Size{geom::Width{324}, geom::Height{642}},47 geom::Size{324, 642},
48 true,48 true,
49 false,49 false,
50 geom::Point{geom::X{123}, geom::Y{343}},50 geom::Point{geom::X{123}, geom::Y{343}},
@@ -56,7 +56,7 @@
56 mg::DisplayConfigurationOutputId{11},56 mg::DisplayConfigurationOutputId{11},
57 card_id,57 card_id,
58 {},58 {},
59 geom::Size{geom::Width{566}, geom::Height{111}},59 geom::Size{566, 111},
60 true,60 true,
61 false,61 false,
62 geom::Point(),62 geom::Point(),
@@ -68,9 +68,9 @@
68 mg::DisplayConfigurationOutputId{12},68 mg::DisplayConfigurationOutputId{12},
69 card_id,69 card_id,
70 {70 {
71 {geom::Size{geom::Width{523}, geom::Height{555}}, 60.0},71 {geom::Size{523, 555}, 60.0},
72 },72 },
73 geom::Size{geom::Width{324}, geom::Height{642}},73 geom::Size{324, 642},
74 true,74 true,
75 false,75 false,
76 geom::Point(),76 geom::Point(),
@@ -82,7 +82,7 @@
82 mg::DisplayConfigurationOutputId{13},82 mg::DisplayConfigurationOutputId{13},
83 card_id,83 card_id,
84 {},84 {},
85 geom::Size{geom::Width{324}, geom::Height{642}},85 geom::Size{324, 642},
86 false,86 false,
87 false,87 false,
88 geom::Point(),88 geom::Point(),
8989
=== modified file 'tests/unit-tests/graphics/test_display_configuration.cpp'
--- tests/unit-tests/graphics/test_display_configuration.cpp 2013-07-10 08:50:53 +0000
+++ tests/unit-tests/graphics/test_display_configuration.cpp 2013-07-12 11:57:23 +0000
@@ -31,11 +31,11 @@
31 mg::DisplayConfigurationOutputId{3},31 mg::DisplayConfigurationOutputId{3},
32 mg::DisplayConfigurationCardId{2},32 mg::DisplayConfigurationCardId{2},
33 {33 {
34 {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0},34 {geom::Size{10, 20}, 60.0},
35 {geom::Size{geom::Width{10}, geom::Height{20}}, 59.0},35 {geom::Size{10, 20}, 59.0},
36 {geom::Size{geom::Width{15}, geom::Height{20}}, 59.0}36 {geom::Size{15, 20}, 59.0}
37 },37 },
38 geom::Size{geom::Width{10}, geom::Height{20}},38 geom::Size{10, 20},
39 true,39 true,
40 true,40 true,
41 geom::Point(),41 geom::Point(),
@@ -46,7 +46,7 @@
4646
47TEST(DisplayConfiguration, mode_equality)47TEST(DisplayConfiguration, mode_equality)
48{48{
49 geom::Size const size{geom::Width{10}, geom::Height{20}};49 geom::Size const size{10, 20};
50 double const vrefresh{59.9};50 double const vrefresh{59.9};
5151
52 mg::DisplayConfigurationMode const mode1{size, vrefresh};52 mg::DisplayConfigurationMode const mode1{size, vrefresh};
@@ -59,8 +59,8 @@
5959
60TEST(DisplayConfiguration, mode_inequality)60TEST(DisplayConfiguration, mode_inequality)
61{61{
62 geom::Size const size1{geom::Width{10}, geom::Height{20}};62 geom::Size const size1{10, 20};
63 geom::Size const size2{geom::Width{10}, geom::Height{21}};63 geom::Size const size2{10, 21};
64 double const vrefresh1{59.9};64 double const vrefresh1{59.9};
65 double const vrefresh2{60.0};65 double const vrefresh2{60.0};
6666
@@ -111,14 +111,14 @@
111111
112 std::vector<mg::DisplayConfigurationMode> const modes2112 std::vector<mg::DisplayConfigurationMode> const modes2
113 {113 {
114 {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0},114 {geom::Size{10, 20}, 60.0},
115 {geom::Size{geom::Width{10}, geom::Height{20}}, 59.9},115 {geom::Size{10, 20}, 59.9},
116 {geom::Size{geom::Width{15}, geom::Height{20}}, 59.0}116 {geom::Size{15, 20}, 59.0}
117 };117 };
118 std::vector<mg::DisplayConfigurationMode> const modes3118 std::vector<mg::DisplayConfigurationMode> const modes3
119 {119 {
120 {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0},120 {geom::Size{10, 20}, 60.0},
121 {geom::Size{geom::Width{10}, geom::Height{20}}, 59.0}121 {geom::Size{10, 20}, 59.0}
122 };122 };
123123
124 output2.modes = modes2;124 output2.modes = modes2;
@@ -137,7 +137,7 @@
137 mg::DisplayConfigurationOutput const output1 = tmpl_output;137 mg::DisplayConfigurationOutput const output1 = tmpl_output;
138 mg::DisplayConfigurationOutput output2 = tmpl_output;138 mg::DisplayConfigurationOutput output2 = tmpl_output;
139139
140 geom::Size const physical_size2{geom::Width{11}, geom::Height{20}};140 geom::Size const physical_size2{11, 20};
141141
142 output2.physical_size_mm = physical_size2;142 output2.physical_size_mm = physical_size2;
143143
144144
=== modified file 'tests/unit-tests/graphics/test_gl_pixel_buffer.cpp'
--- tests/unit-tests/graphics/test_gl_pixel_buffer.cpp 2013-06-26 03:03:27 +0000
+++ tests/unit-tests/graphics/test_gl_pixel_buffer.cpp 2013-07-12 11:57:23 +0000
@@ -60,8 +60,7 @@
60 using namespace testing;60 using namespace testing;
6161
62 ON_CALL(mock_buffer, size())62 ON_CALL(mock_buffer, size())
63 .WillByDefault(Return(geom::Size{geom::Width{100},63 .WillByDefault(Return(geom::Size{100, 100}));
64 geom::Height{100}}));
65 }64 }
6665
67 testing::NiceMock<mtd::MockGL> mock_gl;66 testing::NiceMock<mtd::MockGL> mock_gl;
6867
=== modified file 'tests/unit-tests/graphics/test_graphics_platform.cpp'
--- tests/unit-tests/graphics/test_graphics_platform.cpp 2013-07-02 05:03:20 +0000
+++ tests/unit-tests/graphics/test_graphics_platform.cpp 2013-07-12 11:57:23 +0000
@@ -126,7 +126,7 @@
126126
127 ASSERT_NE(0u, supported_pixel_formats.size());127 ASSERT_NE(0u, supported_pixel_formats.size());
128128
129 geom::Size size{geom::Width{320}, geom::Height{240}};129 geom::Size size{320, 240};
130 geom::PixelFormat const pf{supported_pixel_formats[0]};130 geom::PixelFormat const pf{supported_pixel_formats[0]};
131 mc::BufferUsage usage{mc::BufferUsage::hardware};131 mc::BufferUsage usage{mc::BufferUsage::hardware};
132 mc::BufferProperties buffer_properties{size, pf, usage};132 mc::BufferProperties buffer_properties{size, pf, usage};
133133
=== modified file 'tests/unit-tests/input/android/test_android_input_manager.cpp'
--- tests/unit-tests/input/android/test_android_input_manager.cpp 2013-07-03 22:07:12 +0000
+++ tests/unit-tests/input/android/test_android_input_manager.cpp 2013-07-12 11:57:23 +0000
@@ -100,8 +100,7 @@
100 using namespace ::testing;100 using namespace ::testing;
101101
102 const geom::Rectangle default_view_area =102 const geom::Rectangle default_view_area =
103 geom::Rectangle{geom::Point(),103 geom::Rectangle{geom::Point(), geom::Size{1600, 1400}};
104 geom::Size{geom::Width(1600), geom::Height(1400)}};
105104
106105
107 ON_CALL(view_area, view_area())106 ON_CALL(view_area, view_area())
108107
=== modified file 'tests/unit-tests/input/android/test_android_input_reader_policy.cpp'
--- tests/unit-tests/input/android/test_android_input_reader_policy.cpp 2013-03-13 08:09:52 +0000
+++ tests/unit-tests/input/android/test_android_input_reader_policy.cpp 2013-07-12 11:57:23 +0000
@@ -33,8 +33,7 @@
33namespace mtd = mir::test::doubles;33namespace mtd = mir::test::doubles;
3434
35static geom::Rectangle const default_view_area = geom::Rectangle{geom::Point(),35static geom::Rectangle const default_view_area = geom::Rectangle{geom::Point(),
36 geom::Size{geom::Width(1600),36 geom::Size{1600, 1400}};
37 geom::Height(1400)}};
3837
39namespace38namespace
40{39{
4140
=== modified file 'tests/unit-tests/input/android/test_android_input_window_handle.cpp'
--- tests/unit-tests/input/android/test_android_input_window_handle.cpp 2013-07-05 21:27:14 +0000
+++ tests/unit-tests/input/android/test_android_input_window_handle.cpp 2013-07-12 11:57:23 +0000
@@ -60,8 +60,7 @@
60{60{
61 using namespace ::testing;61 using namespace ::testing;
6262
63 geom::Size const default_surface_size = geom::Size{geom::Width{256},63 geom::Size const default_surface_size{256, 256};
64 geom::Height{256}};
65 geom::Point const default_surface_top_left = geom::Point{geom::X{10}, geom::Y{10}};64 geom::Point const default_surface_top_left = geom::Point{geom::X{10}, geom::Y{10}};
66 std::string const testing_surface_name = "Test";65 std::string const testing_surface_name = "Test";
6766
6867
=== modified file 'tests/unit-tests/input/android/test_android_pointer_controller.cpp'
--- tests/unit-tests/input/android/test_android_pointer_controller.cpp 2013-03-13 08:09:52 +0000
+++ tests/unit-tests/input/android/test_android_pointer_controller.cpp 2013-07-12 11:57:23 +0000
@@ -36,8 +36,7 @@
36namespace mtd = mir::test::doubles;36namespace mtd = mir::test::doubles;
3737
38static const geom::Rectangle default_view_area = geom::Rectangle{geom::Point(),38static const geom::Rectangle default_view_area = geom::Rectangle{geom::Point(),
39 geom::Size{geom::Width(1600),39 geom::Size{1600, 1400}};
40 geom::Height(1400)}};
4140
42namespace41namespace
43{42{
4443
=== modified file 'tests/unit-tests/input/test_input_surface_info.cpp'
--- tests/unit-tests/input/test_input_surface_info.cpp 2013-07-05 23:36:24 +0000
+++ tests/unit-tests/input/test_input_surface_info.cpp 2013-07-12 11:57:23 +0000
@@ -41,7 +41,7 @@
41 }41 }
4242
43 geom::Point primitive_pt{geom::X{1}, geom::Y{1}};43 geom::Point primitive_pt{geom::X{1}, geom::Y{1}};
44 geom::Size primitive_sz{geom::Width{1}, geom::Height{1}};44 geom::Size primitive_sz{1, 1};
45 geom::Rectangle primitive_rect{primitive_pt, primitive_sz};45 geom::Rectangle primitive_rect{primitive_pt, primitive_sz};
46 mtd::MockSurfaceInfo primitive_info;46 mtd::MockSurfaceInfo primitive_info;
47};47};
@@ -89,8 +89,8 @@
89TEST_F(InputSurfaceInfo, set_input_region)89TEST_F(InputSurfaceInfo, set_input_region)
90{90{
91 std::vector<geom::Rectangle> const rectangles = {91 std::vector<geom::Rectangle> const rectangles = {
92 {{geom::X{0}, geom::Y{0}}, {geom::Width{1}, geom::Height{1}}}, //region092 {{geom::X{0}, geom::Y{0}}, geom::Size{1, 1}}, //region0
93 {{geom::X{1}, geom::Y{1}}, {geom::Width{1}, geom::Height{1}}} //region193 {{geom::X{1}, geom::Y{1}}, geom::Size{1, 1}} //region1
94 };94 };
9595
96 mi::SurfaceDataStorage input_info(mt::fake_shared(primitive_info));96 mi::SurfaceDataStorage input_info(mt::fake_shared(primitive_info));
9797
=== modified file 'tests/unit-tests/shell/test_consuming_placement_strategy.cpp'
--- tests/unit-tests/shell/test_consuming_placement_strategy.cpp 2013-05-21 17:16:43 +0000
+++ tests/unit-tests/shell/test_consuming_placement_strategy.cpp 2013-07-12 11:57:23 +0000
@@ -31,8 +31,7 @@
31namespace31namespace
32{32{
33static const geom::Rectangle default_view_area = geom::Rectangle{geom::Point(),33static const geom::Rectangle default_view_area = geom::Rectangle{geom::Point(),
34 geom::Size{geom::Width(1600),34 geom::Size{1600, 1600}};
35 geom::Height(1600)}};
3635
37struct ConsumingPlacementStrategySetup : public testing::Test36struct ConsumingPlacementStrategySetup : public testing::Test
38{37{
@@ -66,7 +65,7 @@
66{65{
67 using namespace ::testing;66 using namespace ::testing;
6867
69 const geom::Size requested_size = geom::Size{geom::Width{100}, geom::Height{100}};68 const geom::Size requested_size = geom::Size{100, 100};
7069
71 EXPECT_CALL(*viewable_area, view_area()).Times(1);70 EXPECT_CALL(*viewable_area, view_area()).Times(1);
7271
7372
=== modified file 'tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp'
--- tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp 2013-07-01 06:36:33 +0000
+++ tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp 2013-07-12 11:57:23 +0000
@@ -67,7 +67,7 @@
67 using namespace testing;67 using namespace testing;
6868
69 void const* pixels{reinterpret_cast<void*>(0xabcd)};69 void const* pixels{reinterpret_cast<void*>(0xabcd)};
70 geom::Size size{geom::Width{10}, geom::Height{11}};70 geom::Size size{10, 11};
71 geom::Stride stride{123};71 geom::Stride stride{123};
7272
73 MockPixelBuffer pixel_buffer;73 MockPixelBuffer pixel_buffer;
7474
=== modified file 'tests/unit-tests/surfaces/test_surface.cpp'
--- tests/unit-tests/surfaces/test_surface.cpp 2013-07-08 17:04:31 +0000
+++ tests/unit-tests/surfaces/test_surface.cpp 2013-07-12 11:57:23 +0000
@@ -68,7 +68,7 @@
68TEST(SurfaceCreationParametersTest, builder_mutators)68TEST(SurfaceCreationParametersTest, builder_mutators)
69{69{
70 using namespace geom;70 using namespace geom;
71 Size const size{Width{1024}, Height{768}};71 Size const size{1024, 768};
72 mc::BufferUsage const usage{mc::BufferUsage::hardware};72 mc::BufferUsage const usage{mc::BufferUsage::hardware};
73 geom::PixelFormat const format{geom::PixelFormat::abgr_8888};73 geom::PixelFormat const format{geom::PixelFormat::abgr_8888};
74 std::string name{"surface"};74 std::string name{"surface"};
@@ -87,7 +87,7 @@
87TEST(SurfaceCreationParametersTest, equality)87TEST(SurfaceCreationParametersTest, equality)
88{88{
89 using namespace geom;89 using namespace geom;
90 Size const size{Width{1024}, Height{768}};90 Size const size{1024, 768};
91 mc::BufferUsage const usage{mc::BufferUsage::hardware};91 mc::BufferUsage const usage{mc::BufferUsage::hardware};
92 geom::PixelFormat const format{geom::PixelFormat::abgr_8888};92 geom::PixelFormat const format{geom::PixelFormat::abgr_8888};
9393
@@ -109,8 +109,8 @@
109{109{
110 using namespace geom;110 using namespace geom;
111111
112 std::vector<Size> const sizes{{Width{1024}, Height{768}},112 std::vector<Size> const sizes{{1024, 768},
113 {Width{1025}, Height{768}}};113 {1025, 768}};
114114
115 std::vector<mc::BufferUsage> const usages{mc::BufferUsage::hardware,115 std::vector<mc::BufferUsage> const usages{mc::BufferUsage::hardware,
116 mc::BufferUsage::software};116 mc::BufferUsage::software};
@@ -165,7 +165,7 @@
165165
166 surface_name = "test_surfaceA";166 surface_name = "test_surfaceA";
167 pf = geom::PixelFormat::abgr_8888;167 pf = geom::PixelFormat::abgr_8888;
168 size = geom::Size{geom::Width{43}, geom::Height{420}};168 size = geom::Size{43, 420};
169 rect = geom::Rectangle{geom::Point{geom::X{0}, geom::Y{0}}, size};169 rect = geom::Rectangle{geom::Point{geom::X{0}, geom::Y{0}}, size};
170 stride = geom::Stride{4 * size.width.as_uint32_t()};170 stride = geom::Stride{4 * size.width.as_uint32_t()};
171 mock_buffer_stream = std::make_shared<testing::NiceMock<mtd::MockBufferStream>>();171 mock_buffer_stream = std::make_shared<testing::NiceMock<mtd::MockBufferStream>>();
@@ -316,7 +316,7 @@
316 std::shared_ptr<mi::InputChannel>(), null_change_cb);316 std::shared_ptr<mi::InputChannel>(), null_change_cb);
317 surf.set_rotation(60.0f, glm::vec3{0.0f, 0.0f, 1.0f});317 surf.set_rotation(60.0f, glm::vec3{0.0f, 0.0f, 1.0f});
318318
319 geom::Size s{geom::Width{55}, geom::Height{66}};319 geom::Size s{55, 66};
320 ON_CALL(*mock_basic_info, size_and_position())320 ON_CALL(*mock_basic_info, size_and_position())
321 .WillByDefault(Return(geom::Rectangle{geom::Point{geom::X{}, geom::Y{}},s}));321 .WillByDefault(Return(geom::Rectangle{geom::Point{geom::X{}, geom::Y{}},s}));
322322
@@ -347,7 +347,7 @@
347{347{
348 using namespace testing;348 using namespace testing;
349349
350 const geom::Size sz{geom::Width{85}, geom::Height{43}};350 const geom::Size sz{85, 43};
351 const geom::Rectangle origin{geom::Point{geom::X{77}, geom::Y{88}}, sz};351 const geom::Rectangle origin{geom::Point{geom::X{77}, geom::Y{88}}, sz};
352 const geom::Rectangle moved_pt{geom::Point{geom::X{55}, geom::Y{66}}, sz};352 const geom::Rectangle moved_pt{geom::Point{geom::X{55}, geom::Y{66}}, sz};
353353
354354
=== modified file 'tests/unit-tests/surfaces/test_surface_info.cpp'
--- tests/unit-tests/surfaces/test_surface_info.cpp 2013-07-08 17:04:31 +0000
+++ tests/unit-tests/surfaces/test_surface_info.cpp 2013-07-12 11:57:23 +0000
@@ -29,7 +29,7 @@
29 {29 {
30 name = std::string("aa");30 name = std::string("aa");
31 top_left = geom::Point{geom::X{4}, geom::Y{7}};31 top_left = geom::Point{geom::X{4}, geom::Y{7}};
32 size = geom::Size{geom::Width{5}, geom::Height{9}};32 size = geom::Size{5, 9};
33 }33 }
34 std::string name;34 std::string name;
35 geom::Point top_left;35 geom::Point top_left;
3636
=== modified file 'tests/unit-tests/surfaces/test_surface_stack.cpp'
--- tests/unit-tests/surfaces/test_surface_stack.cpp 2013-07-06 00:24:51 +0000
+++ tests/unit-tests/surfaces/test_surface_stack.cpp 2013-07-12 11:57:23 +0000
@@ -181,7 +181,7 @@
181 ms::SurfaceStack stack(mt::fake_shared(buffer_stream_factory), 181 ms::SurfaceStack stack(mt::fake_shared(buffer_stream_factory),
182 mt::fake_shared(input_factory), mt::fake_shared(input_registrar));182 mt::fake_shared(input_factory), mt::fake_shared(input_registrar));
183 std::weak_ptr<ms::Surface> surface = stack.create_surface(183 std::weak_ptr<ms::Surface> surface = stack.create_surface(
184 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);184 msh::a_surface().of_size({1024, 768}), default_depth);
185185
186 stack.destroy_surface(surface);186 stack.destroy_surface(surface);
187}187}
@@ -235,11 +235,11 @@
235 mt::fake_shared(input_factory), mt::fake_shared(input_registrar));235 mt::fake_shared(input_factory), mt::fake_shared(input_registrar));
236236
237 auto surface1 = stack.create_surface(237 auto surface1 = stack.create_surface(
238 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);238 msh::a_surface().of_size({1024, 768}), default_depth);
239 auto surface2 = stack.create_surface(239 auto surface2 = stack.create_surface(
240 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);240 msh::a_surface().of_size({1024, 768}), default_depth);
241 auto surface3 = stack.create_surface(241 auto surface3 = stack.create_surface(
242 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);242 msh::a_surface().of_size({1024, 768}), default_depth);
243243
244 mtd::MockSurfaceRenderer renderer;244 mtd::MockSurfaceRenderer renderer;
245 MockFilterForRenderables filter;245 MockFilterForRenderables filter;
@@ -277,11 +277,11 @@
277 mt::fake_shared(input_factory), mt::fake_shared(input_registrar));277 mt::fake_shared(input_factory), mt::fake_shared(input_registrar));
278278
279 auto surface1 = stack.create_surface(279 auto surface1 = stack.create_surface(
280 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);280 msh::a_surface().of_size({1024, 768}), default_depth);
281 auto surface2 = stack.create_surface(281 auto surface2 = stack.create_surface(
282 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);282 msh::a_surface().of_size({1024, 768}), default_depth);
283 auto surface3 = stack.create_surface(283 auto surface3 = stack.create_surface(
284 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);284 msh::a_surface().of_size({1024, 768}), default_depth);
285285
286 mtd::MockSurfaceRenderer renderer;286 mtd::MockSurfaceRenderer renderer;
287 MockFilterForRenderables filter;287 MockFilterForRenderables filter;
@@ -311,7 +311,7 @@
311 mtd::StubInputRegistrar input_registrar;311 mtd::StubInputRegistrar input_registrar;
312312
313313
314 geom::Size const size{geom::Size{geom::Width{1024}, geom::Height{768}}};314 geom::Size const size{1024, 768};
315 geom::PixelFormat const format{geom::PixelFormat::bgr_888};315 geom::PixelFormat const format{geom::PixelFormat::bgr_888};
316 mc::BufferUsage const usage{mc::BufferUsage::software};316 mc::BufferUsage const usage{mc::BufferUsage::software};
317317
@@ -364,7 +364,7 @@
364 stack.set_change_callback(std::bind(&MockCallback::call, &mock_cb));364 stack.set_change_callback(std::bind(&MockCallback::call, &mock_cb));
365365
366 std::weak_ptr<ms::Surface> surface = stack.create_surface(366 std::weak_ptr<ms::Surface> surface = stack.create_surface(
367 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);367 msh::a_surface().of_size({1024, 768}), default_depth);
368}368}
369369
370TEST(SurfaceStack, destroy_surface_notifies_changes)370TEST(SurfaceStack, destroy_surface_notifies_changes)
@@ -381,7 +381,7 @@
381 stack.set_change_callback(std::bind(&MockCallback::call, &mock_cb));381 stack.set_change_callback(std::bind(&MockCallback::call, &mock_cb));
382382
383 std::weak_ptr<ms::Surface> surface = stack.create_surface(383 std::weak_ptr<ms::Surface> surface = stack.create_surface(
384 msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}), default_depth);384 msh::a_surface().of_size({1024, 768}), default_depth);
385385
386 Mock::VerifyAndClearExpectations(&mock_cb);386 Mock::VerifyAndClearExpectations(&mock_cb);
387 EXPECT_CALL(mock_cb, call()).Times(1);387 EXPECT_CALL(mock_cb, call()).Times(1);
@@ -423,8 +423,7 @@
423 using namespace ::testing;423 using namespace ::testing;
424 geom::Point const requested_top_left{geom::X{50},424 geom::Point const requested_top_left{geom::X{50},
425 geom::Y{17}};425 geom::Y{17}};
426 geom::Size const requested_size{geom::Width{1024}, 426 geom::Size const requested_size{1024, 768};
427 geom::Height{768}};
428 427
429 ms::SurfaceStack stack{std::make_shared<StubBufferStreamFactory>(),428 ms::SurfaceStack stack{std::make_shared<StubBufferStreamFactory>(),
430 std::make_shared<StubInputChannelFactory>(),429 std::make_shared<StubInputChannelFactory>(),
@@ -444,8 +443,8 @@
444 using namespace ::testing;443 using namespace ::testing;
445 geom::Point const requested_top_left{geom::X{50},444 geom::Point const requested_top_left{geom::X{50},
446 geom::Y{17}};445 geom::Y{17}};
447 geom::Size const requested_size{geom::Width{1024}, geom::Height{768}}; 446 geom::Size const requested_size{1024, 768};
448 geom::Size const stream_size{geom::Width{1025}, geom::Height{769}};447 geom::Size const stream_size{1025, 769};
449448
450 MockBufferStreamFactory buffer_stream_factory;449 MockBufferStreamFactory buffer_stream_factory;
451 auto stream = std::make_shared<mtd::MockBufferStream>();450 auto stream = std::make_shared<mtd::MockBufferStream>();

Subscribers

People subscribed via source and target branches