geometry types are too verbose to use
Bug #1199756 reported by
Alan Griffiths
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
Low
|
Alan Griffiths |
Bug Description
Many of the geometry types lack useful constructors - these should have been added when needed, not the lack worked around.
E.g. we have:
struct Point
{
X x;
Y y;
};
Whereas a constructor like:
template<XType, YType>
Point::Point(XType x, YType y) x{x}, y{y} {}
would allow conversions to be applied where valid.
Related branches
lp://staging/~alan-griffiths/mir/fix-1199756
- PS Jenkins bot (community): Approve (continuous-integration)
- Alexandros Frantzis (community): Approve
-
Diff: 1361 lines (+137/-169)69 files modifiedexamples/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)
Changed in mir: | |
assignee: | nobody → Alan Griffiths (alan-griffiths) |
Changed in mir: | |
milestone: | none → 0.0.7 |
Changed in mir: | |
status: | Fix Committed → Fix Released |
importance: | Undecided → Low |
To post a comment you must log in.
I mean I want to write:
void f(int x, int y)
{
auto p = geom::Point(x, y);
}
Not
void f(int x, int y) geom::X( x), geom::Y(y));
{
auto p = geom::Point(
}