Mir

Merge lp:mir/0.8 into lp:mir/ubuntu

Proposed by Cemil Azizoglu
Status: Merged
Approved by: Cemil Azizoglu
Approved revision: 1963
Merged at revision: 1215
Proposed branch: lp:mir/0.8
Merge into: lp:mir/ubuntu
Diff against target: 20146 lines (+8792/-3532)
350 files modified
3rd_party/android-deps/std/atomic.h (+1/-1)
3rd_party/android-input/android/CMakeLists.txt (+2/-0)
CMakeLists.txt (+11/-8)
benchmarks/android-input/CMakeLists.txt (+1/-1)
client-ABI-sha1sums (+6/-6)
cmake/ABICheck.cmake (+109/-0)
cmake/MirCommon.cmake (+36/-0)
common-ABI-sha1sums (+18/-45)
cross-compile-chroot.sh (+3/-1)
debian/changelog (+95/-0)
debian/control (+13/-16)
debian/copyright (+1/-1)
debian/create_postinst_prerm_scripts.sh (+1/-1)
debian/install_ld_so_conf.sh (+1/-1)
debian/libmirclient8driver-android.install (+1/-1)
debian/libmirclient8driver-mesa.install (+1/-1)
debian/libmircommon2.install (+1/-1)
debian/libmirplatform3.install (+1/-1)
debian/libmirplatform3driver-android.install (+1/-1)
debian/libmirplatform3driver-mesa.install (+1/-1)
debian/libmirserver26.install (+1/-1)
debian/rules (+5/-2)
doc/abi_compatibility_tools.md (+82/-0)
doc/dso_versioning_guide.md (+195/-0)
doc/mainpage.md (+2/-0)
examples/CMakeLists.txt (+25/-33)
examples/basic_server_configuration.cpp (+0/-4)
examples/demo_input_filter.cpp (+0/-2)
examples/eglapp.c (+1/-16)
examples/fingerpaint.c (+1/-0)
examples/flicker.c (+0/-13)
examples/multiwin.c (+1/-0)
examples/pixel_format_selector.cpp (+9/-2)
examples/progressbar.c (+1/-0)
examples/render_overlays.cpp (+0/-5)
examples/testdraw/mesa_graphics_region_factory.cpp (+1/-1)
include/common/mir/geometry/rectangle.h (+1/-1)
include/common/mir/geometry/rectangles.h (+5/-2)
include/common/mir/geometry/size.h (+1/-1)
include/common/mir/time/clock.h (+4/-3)
include/platform/mir/graphics/display_configuration.h (+0/-1)
include/platform/mir/graphics/native_platform.h (+7/-3)
include/platform/mir/graphics/platform.h (+8/-29)
include/platform/mir/graphics/platform_ipc_operations.h (+81/-0)
include/platform/mir/graphics/renderable.h (+0/-1)
include/platform/mir/options/configuration.h (+2/-1)
include/platform/mir/options/default_configuration.h (+2/-1)
include/platform/mir/options/program_option.h (+1/-1)
include/server/mir/compositor/scene_element.h (+5/-1)
include/server/mir/default_server_configuration.h (+5/-2)
include/server/mir/frontend/session_mediator_report.h (+2/-0)
include/server/mir/input/cursor_listener.h (+2/-2)
include/server/mir/input/touch_visualizer.h (+6/-2)
include/server/mir/scene/observer.h (+4/-0)
include/server/mir/thread/basic_thread_pool.h (+0/-63)
include/test/mir_test_framework/input_testing_client_configuration.h (+0/-69)
platform-ABI-sha1sums (+26/-69)
playground/CMakeLists.txt (+26/-0)
playground/README (+6/-0)
playground/demo-inprocess-surface-client/CMakeLists.txt (+1/-3)
playground/demo-inprocess-surface-client/demo_inprocess_surface_client.cpp (+1/-1)
playground/demo-shell/CMakeLists.txt (+1/-1)
playground/demo-shell/demo_compositor.cpp (+6/-1)
playground/demo-shell/demo_renderer.cpp (+9/-7)
playground/demo-shell/demo_renderer.h (+7/-1)
playground/demo-shell/demo_shell.cpp (+1/-1)
playground/demo-shell/window_manager.cpp (+2/-2)
server-ABI-sha1sums (+32/-115)
src/CMakeLists.txt (+1/-1)
src/client/CMakeLists.txt (+9/-1)
src/client/android/CMakeLists.txt (+5/-5)
src/client/default_connection_configuration.cpp (+21/-2)
src/client/default_connection_configuration.h (+4/-0)
src/client/logging/perf_report.cpp (+53/-0)
src/client/logging/perf_report.h (+48/-0)
src/client/logging/rpc_report.cpp (+1/-1)
src/client/logging/rpc_report.h (+1/-1)
src/client/lttng/CMakeLists.txt (+1/-0)
src/client/lttng/input_receiver_report_tp.h (+0/-14)
src/client/lttng/rpc_report.cpp (+7/-2)
src/client/lttng/rpc_report.h (+1/-1)
src/client/lttng/rpc_report_tp.h (+0/-14)
src/client/lttng/shared_library_prober_report.cpp (+50/-0)
src/client/lttng/shared_library_prober_report.h (+55/-0)
src/client/lttng/shared_library_prober_report_tp.h (+85/-0)
src/client/mesa/CMakeLists.txt (+5/-5)
src/client/mir_connection.cpp (+6/-1)
src/client/mir_connection.h (+1/-0)
src/client/mir_surface.cpp (+16/-0)
src/client/mir_surface.h (+2/-0)
src/client/perf_report.h (+47/-0)
src/client/periodic_perf_report.cpp (+98/-0)
src/client/periodic_perf_report.h (+64/-0)
src/client/rpc/make_socket_rpc_channel.cpp (+1/-1)
src/client/rpc/mir_protobuf_rpc_channel.cpp (+1/-1)
src/client/rpc/null_rpc_report.cpp (+1/-1)
src/client/rpc/null_rpc_report.h (+1/-1)
src/client/rpc/rpc_report.h (+3/-2)
src/client/rpc/stream_socket_transport.cpp (+15/-129)
src/client/rpc/stream_socket_transport.h (+6/-5)
src/client/rpc/stream_transport.h (+3/-1)
src/common/CMakeLists.txt (+4/-2)
src/common/fd/CMakeLists.txt (+2/-1)
src/common/fd/fd_socket_transmission.cpp (+177/-0)
src/common/input/android/android_input_receiver.cpp (+16/-12)
src/common/logging/CMakeLists.txt (+1/-0)
src/common/logging/shared_library_prober_report.cpp (+58/-0)
src/common/protobuf/mir_protobuf.proto (+6/-0)
src/common/sharedlibrary/CMakeLists.txt (+1/-0)
src/common/sharedlibrary/shared_library.cpp (+12/-0)
src/common/sharedlibrary/shared_library_prober.cpp (+74/-0)
src/common/symbols.map (+65/-2)
src/common/time/high_resolution_clock.cpp (+3/-3)
src/include/common/mir/basic_observers.h (+1/-1)
src/include/common/mir/fd_socket_transmission.h (+47/-0)
src/include/common/mir/geometry/displacement.h (+2/-2)
src/include/common/mir/logging/null_shared_library_prober_report.h (+49/-0)
src/include/common/mir/logging/shared_library_prober_report.h (+48/-0)
src/include/common/mir/report/lttng/mir_tracepoint.h (+0/-17)
src/include/common/mir/shared_library.h (+9/-0)
src/include/common/mir/shared_library_prober.h (+36/-0)
src/include/common/mir/shared_library_prober_report.h (+44/-0)
src/include/common/mir/time/high_resolution_clock.h (+3/-3)
src/include/platform/mir/graphics/buffer_ipc_message.h (+13/-9)
src/include/platform/mir/graphics/buffer_writer.h (+44/-0)
src/include/server/mir/compositor/recently_used_cache.h (+1/-0)
src/include/server/mir/input/scene.h (+23/-8)
src/include/server/mir/scene/legacy_scene_change_notification.h (+2/-0)
src/include/server/mir/thread/basic_thread_pool.h (+63/-0)
src/platform/CMakeLists.txt (+12/-3)
src/platform/graphics/android/CMakeLists.txt (+10/-8)
src/platform/graphics/android/buffer_writer.cpp (+70/-0)
src/platform/graphics/android/buffer_writer.h (+50/-0)
src/platform/graphics/android/device_quirks.cpp (+21/-4)
src/platform/graphics/android/device_quirks.h (+3/-0)
src/platform/graphics/android/display.cpp (+23/-23)
src/platform/graphics/android/display.h (+7/-7)
src/platform/graphics/android/display_buffer.h (+1/-1)
src/platform/graphics/android/display_configuration.cpp (+8/-8)
src/platform/graphics/android/display_configuration.h (+8/-8)
src/platform/graphics/android/display_resource_factory.h (+3/-2)
src/platform/graphics/android/hwc_common_device.cpp (+10/-6)
src/platform/graphics/android/hwc_common_device.h (+3/-3)
src/platform/graphics/android/hwc_device.cpp (+1/-1)
src/platform/graphics/android/hwc_fallback_gl_renderer.cpp (+1/-1)
src/platform/graphics/android/hwc_layerlist.cpp (+2/-2)
src/platform/graphics/android/hwc_wrapper.h (+2/-1)
src/platform/graphics/android/ipc_operations.cpp (+60/-0)
src/platform/graphics/android/ipc_operations.h (+40/-0)
src/platform/graphics/android/output_builder.cpp (+6/-3)
src/platform/graphics/android/output_builder.h (+5/-1)
src/platform/graphics/android/platform.cpp (+57/-51)
src/platform/graphics/android/platform.h (+15/-9)
src/platform/graphics/android/real_hwc_wrapper.cpp (+4/-2)
src/platform/graphics/android/real_hwc_wrapper.h (+4/-1)
src/platform/graphics/android/resource_factory.cpp (+3/-10)
src/platform/graphics/android/resource_factory.h (+2/-7)
src/platform/graphics/mesa/CMakeLists.txt (+7/-5)
src/platform/graphics/mesa/anonymous_shm_file.cpp (+2/-30)
src/platform/graphics/mesa/anonymous_shm_file.h (+2/-16)
src/platform/graphics/mesa/buffer_allocator.cpp (+1/-1)
src/platform/graphics/mesa/buffer_writer.cpp (+40/-0)
src/platform/graphics/mesa/buffer_writer.h (+43/-0)
src/platform/graphics/mesa/display_buffer.cpp (+3/-12)
src/platform/graphics/mesa/ipc_operations.cpp (+79/-0)
src/platform/graphics/mesa/ipc_operations.h (+46/-0)
src/platform/graphics/mesa/native_platform.cpp (+15/-10)
src/platform/graphics/mesa/native_platform.h (+3/-2)
src/platform/graphics/mesa/platform.cpp (+15/-44)
src/platform/graphics/mesa/platform.h (+2/-3)
src/platform/graphics/mesa/shm_buffer.cpp (+13/-0)
src/platform/graphics/mesa/shm_buffer.h (+2/-0)
src/platform/options/default_configuration.cpp (+4/-2)
src/platform/symbols.map (+5/-5)
src/server/CMakeLists.txt (+5/-5)
src/server/compositor/recently_used_cache.cpp (+3/-3)
src/server/frontend/client_buffer_tracker.cpp (+42/-21)
src/server/frontend/client_buffer_tracker.h (+10/-4)
src/server/frontend/protobuf_buffer_packer.cpp (+13/-7)
src/server/frontend/protobuf_buffer_packer.h (+7/-5)
src/server/frontend/protobuf_message_processor.cpp (+4/-0)
src/server/frontend/session_mediator.cpp (+52/-7)
src/server/frontend/session_mediator.h (+11/-3)
src/server/frontend/socket_messenger.cpp (+6/-44)
src/server/frontend/socket_messenger.h (+1/-0)
src/server/frontend/surface_tracker.cpp (+22/-1)
src/server/frontend/surface_tracker.h (+15/-5)
src/server/graphics/default_configuration.cpp (+10/-0)
src/server/graphics/nested/nested_display.cpp (+2/-0)
src/server/graphics/nested/nested_display.h (+3/-0)
src/server/graphics/nested/nested_output.cpp (+1/-0)
src/server/graphics/nested/nested_platform.cpp (+33/-10)
src/server/graphics/nested/nested_platform.h (+4/-4)
src/server/input/CMakeLists.txt (+1/-0)
src/server/input/android/android_input_registrar.cpp (+4/-0)
src/server/input/android/android_input_registrar.h (+1/-0)
src/server/input/android/android_input_target_enumerator.cpp (+4/-4)
src/server/input/android/android_input_target_enumerator.h (+3/-3)
src/server/input/android/input_sender.cpp (+9/-5)
src/server/input/android/input_sender.h (+1/-0)
src/server/input/cursor_controller.cpp (+8/-3)
src/server/input/cursor_controller.h (+3/-3)
src/server/input/default_configuration.cpp (+16/-10)
src/server/input/touchspot_controller.cpp (+170/-0)
src/server/input/touchspot_controller.h (+77/-0)
src/server/input/touchspot_image.c (+1034/-0)
src/server/report/logging/session_mediator_report.cpp (+5/-0)
src/server/report/logging/session_mediator_report.h (+2/-0)
src/server/report/lttng/compositor_report_tp.h (+0/-2)
src/server/report/lttng/connector_report_tp.h (+0/-2)
src/server/report/lttng/display_report_tp.h (+0/-2)
src/server/report/lttng/input_report_tp.h (+0/-2)
src/server/report/lttng/lttng_utils.h (+0/-11)
src/server/report/lttng/lttng_utils_pop.h (+0/-22)
src/server/report/lttng/message_processor_report_tp.h (+0/-2)
src/server/report/lttng/scene_report_tp.h (+0/-2)
src/server/report/lttng/session_mediator_report.cpp (+1/-0)
src/server/report/lttng/session_mediator_report.h (+1/-0)
src/server/report/lttng/session_mediator_report_tp.h (+1/-2)
src/server/report/null/session_mediator_report.cpp (+4/-0)
src/server/report/null/session_mediator_report.h (+2/-0)
src/server/scene/basic_surface.cpp (+0/-9)
src/server/scene/default_configuration.cpp (+2/-2)
src/server/scene/legacy_scene_change_notification.cpp (+5/-0)
src/server/scene/surface_stack.cpp (+78/-0)
src/server/scene/surface_stack.h (+16/-3)
src/server/shell/default_focus_mechanism.cpp (+5/-3)
src/server/symbols.map (+6/-13)
src/utils/ping.c (+1/-0)
src/utils/screencast.cpp (+1/-0)
tests/CMakeLists.txt (+2/-1)
tests/acceptance-tests/CMakeLists.txt (+7/-2)
tests/acceptance-tests/precompiled.hpp (+30/-0)
tests/acceptance-tests/test_client_cursor_api.cpp (+265/-382)
tests/acceptance-tests/test_client_input.cpp (+483/-484)
tests/acceptance-tests/test_client_library.cpp (+0/-2)
tests/acceptance-tests/test_client_surface_swap_buffers.cpp (+85/-0)
tests/acceptance-tests/test_nested_mir.cpp (+19/-10)
tests/acceptance-tests/test_protobuf.cpp (+7/-0)
tests/acceptance-tests/test_server_disconnect.cpp (+3/-1)
tests/acceptance-tests/test_server_shutdown.cpp (+0/-409)
tests/acceptance-tests/test_symbols_required_by_mesa.cpp (+2/-2)
tests/acceptance-tests/test_touchspot_visualization.cpp (+2/-0)
tests/include/mir_test/auto_unblock_thread.h (+3/-2)
tests/include/mir_test/fake_event_hub.h (+1/-1)
tests/include/mir_test/test_protobuf_client.h (+6/-0)
tests/include/mir_test_doubles/fake_renderable.h (+0/-5)
tests/include/mir_test_doubles/mock_buffer_ipc_message.h (+8/-6)
tests/include/mir_test_doubles/mock_egl.h (+2/-0)
tests/include/mir_test_doubles/mock_frontend_surface.h (+5/-0)
tests/include/mir_test_doubles/mock_gl.h (+1/-0)
tests/include/mir_test_doubles/mock_hwc_device_wrapper.h (+1/-1)
tests/include/mir_test_doubles/mock_renderable.h (+0/-1)
tests/include/mir_test_doubles/mock_rpc_report.h (+1/-1)
tests/include/mir_test_doubles/null_platform.h (+11/-5)
tests/include/mir_test_doubles/null_platform_ipc_operations.h (+48/-0)
tests/include/mir_test_doubles/stub_buffer.h (+14/-1)
tests/include/mir_test_doubles/stub_gbm_native_buffer.h (+12/-4)
tests/include/mir_test_doubles/stub_input_scene.h (+16/-5)
tests/include/mir_test_doubles/stub_renderable.h (+1/-9)
tests/include/mir_test_doubles/stub_scene_element.h (+5/-0)
tests/include/mir_test_doubles/stub_touch_visualizer.h (+6/-0)
tests/include/mir_test_framework/declarative_placement_strategy.h (+2/-2)
tests/include/mir_test_framework/display_server_test_fixture.h (+0/-1)
tests/include/mir_test_framework/executable_path.h (+2/-0)
tests/include/mir_test_framework/fake_event_hub_server_configuration.h (+64/-0)
tests/include/mir_test_framework/testing_process_manager.h (+0/-1)
tests/integration-tests/CMakeLists.txt (+12/-1)
tests/integration-tests/client/test_client_render.cpp (+4/-4)
tests/integration-tests/compositor/test_buffer_stream.cpp (+66/-56)
tests/integration-tests/frontend/CMakeLists.txt (+1/-1)
tests/integration-tests/frontend/test_session_mediator_report.cpp (+189/-134)
tests/integration-tests/graphics/android/test_display_integration.cpp (+37/-22)
tests/integration-tests/input/android/test_android_cursor_listener.cpp (+1/-1)
tests/integration-tests/input/android/test_android_input_manager.cpp (+1/-1)
tests/integration-tests/input/test_nested_input.cpp (+1/-1)
tests/integration-tests/precompiled.hpp (+30/-0)
tests/integration-tests/test_client_surface_swap_buffers.cpp (+55/-55)
tests/integration-tests/test_exchange_buffer.cpp (+182/-0)
tests/integration-tests/test_server_shutdown.cpp (+434/-0)
tests/mir_test/pipe.cpp (+4/-3)
tests/mir_test/popen.cpp (+4/-5)
tests/mir_test_doubles/CMakeLists.txt (+5/-0)
tests/mir_test_doubles/fake_event_hub.cpp (+1/-0)
tests/mir_test_doubles/mock_egl.cpp (+9/-0)
tests/mir_test_doubles/mock_gl.cpp (+9/-0)
tests/mir_test_doubles/test_protobuf_client.cpp (+18/-0)
tests/mir_test_framework/CMakeLists.txt (+5/-1)
tests/mir_test_framework/cross_process_sync.cpp (+17/-17)
tests/mir_test_framework/declarative_placement_strategy.cpp (+2/-2)
tests/mir_test_framework/display_server_test_fixture.cpp (+0/-6)
tests/mir_test_framework/executable_path.cpp (+5/-0)
tests/mir_test_framework/fake_event_hub_server_configuration.cpp (+64/-0)
tests/mir_test_framework/input_testing_client_configuration.cpp (+0/-85)
tests/mir_test_framework/process.cpp (+5/-3)
tests/mir_test_framework/stubbed_server_configuration.cpp (+58/-23)
tests/mir_test_framework/testing_process_manager.cpp (+0/-13)
tests/mir_test_framework/using_stub_client_platform.cpp (+2/-2)
tests/unit-tests/CMakeLists.txt (+23/-4)
tests/unit-tests/client/CMakeLists.txt (+1/-0)
tests/unit-tests/client/input/test_android_input_receiver.cpp (+108/-1)
tests/unit-tests/client/input/test_android_input_receiver_thread.cpp (+2/-2)
tests/unit-tests/client/test_client_mir_surface.cpp (+2/-2)
tests/unit-tests/client/test_periodic_perf_report.cpp (+146/-0)
tests/unit-tests/client/test_protobuf_rpc_channel.cpp (+11/-7)
tests/unit-tests/client/test_stream_transport.cpp (+15/-14)
tests/unit-tests/compositor/test_buffer_queue.cpp (+10/-8)
tests/unit-tests/compositor/test_gl_texture_cache.cpp (+15/-0)
tests/unit-tests/examples/test_demo_compositor.cpp (+1/-1)
tests/unit-tests/examples/test_demo_renderer.cpp (+1/-1)
tests/unit-tests/frontend/test_client_buffer_tracker.cpp (+144/-93)
tests/unit-tests/frontend/test_protobuf_buffer_packer.cpp (+50/-38)
tests/unit-tests/frontend/test_session_mediator.cpp (+246/-43)
tests/unit-tests/graphics/android/CMakeLists.txt (+3/-3)
tests/unit-tests/graphics/android/test_device_detection.cpp (+39/-0)
tests/unit-tests/graphics/android/test_display.cpp (+19/-19)
tests/unit-tests/graphics/android/test_display_buffer.cpp (+20/-21)
tests/unit-tests/graphics/android/test_hwc_common_device.cpp (+34/-16)
tests/unit-tests/graphics/android/test_hwc_wrapper.cpp (+13/-5)
tests/unit-tests/graphics/android/test_output_builder.cpp (+11/-9)
tests/unit-tests/graphics/android/test_platform.cpp (+21/-21)
tests/unit-tests/graphics/android/test_resource_factory.cpp (+4/-10)
tests/unit-tests/graphics/mesa/test_display.cpp (+4/-9)
tests/unit-tests/graphics/mesa/test_display_buffer.cpp (+2/-9)
tests/unit-tests/graphics/mesa/test_display_configuration.cpp (+2/-7)
tests/unit-tests/graphics/mesa/test_display_multi_monitor.cpp (+2/-7)
tests/unit-tests/graphics/mesa/test_native_platform.cpp (+12/-12)
tests/unit-tests/graphics/mesa/test_platform.cpp (+19/-15)
tests/unit-tests/graphics/mesa/test_shm_buffer.cpp (+1/-1)
tests/unit-tests/graphics/nested/test_nested_display.cpp (+24/-0)
tests/unit-tests/graphics/nested/test_nested_platform.cpp (+7/-2)
tests/unit-tests/graphics/offscreen/test_offscreen_display.cpp (+3/-8)
tests/unit-tests/graphics/test_display.cpp (+2/-8)
tests/unit-tests/graphics/test_graphics_platform.cpp (+4/-2)
tests/unit-tests/input/CMakeLists.txt (+1/-0)
tests/unit-tests/input/android/test_android_input_target_enumerator.cpp (+5/-4)
tests/unit-tests/input/test_cursor_controller.cpp (+12/-11)
tests/unit-tests/input/test_touchspot_controller.cpp (+246/-0)
tests/unit-tests/precompiled.hpp (+30/-0)
tests/unit-tests/scene/CMakeLists.txt (+0/-1)
tests/unit-tests/scene/test_surface_stack.cpp (+96/-0)
tests/unit-tests/shared_library_test.cpp (+63/-18)
tests/unit-tests/shell/CMakeLists.txt (+1/-0)
tests/unit-tests/shell/test_default_focus_mechanism.cpp (+23/-2)
tests/unit-tests/test_shared_library_prober.cpp (+191/-0)
tools/install_on_android.sh (+2/-2)
tools/lib_descriptor.xml.skel (+20/-0)
tools/process_doxygen_xml.py (+18/-3)
tools/update-all-ABI-sha1sums.sh (+4/-4)
tools/valgrind_suppressions_armhf (+8/-0)
To merge this branch: bzr merge lp:mir/0.8
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Mir development team Pending
Review via email: mp+237977@code.launchpad.net

Commit message

Mir 0.8.0 release.

Description of the change

Mir 0.8.0 release.

To post a comment you must log in.
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
1=== modified file '3rd_party/android-deps/std/atomic.h'
2--- 3rd_party/android-deps/std/atomic.h 2013-03-13 04:54:15 +0000
3+++ 3rd_party/android-deps/std/atomic.h 2014-10-10 13:43:10 +0000
4@@ -80,7 +80,7 @@
5 //int android_atomic_acquire_cas(int32_t oldvalue, int32_t newvalue,
6 // volatile int32_t* addr);
7 inline int android_atomic_release_cas(int32_t oldvalue, int32_t newvalue,
8- android_atomic_int32_t* addr) { return !addr->compare_exchange_weak(oldvalue, newvalue); }
9+ android_atomic_int32_t* addr) { return !addr->compare_exchange_strong(oldvalue, newvalue); }
10 }
11
12 /*
13
14=== modified file '3rd_party/android-input/android/CMakeLists.txt'
15--- 3rd_party/android-input/android/CMakeLists.txt 2014-07-14 10:39:48 +0000
16+++ 3rd_party/android-input/android/CMakeLists.txt 2014-10-10 13:43:10 +0000
17@@ -7,7 +7,9 @@
18 system/extras/ext4_utils
19
20 ${PROJECT_SOURCE_DIR}/include/server
21+ ${PROJECT_SOURCE_DIR}/src/include/server
22 ${PROJECT_SOURCE_DIR}/include/platform
23+ ${PROJECT_SOURCE_DIR}/src/include/platform
24 )
25
26 add_definitions(
27
28=== modified file 'CMakeLists.txt'
29--- CMakeLists.txt 2014-09-16 08:33:51 +0000
30+++ CMakeLists.txt 2014-10-10 13:43:10 +0000
31@@ -27,8 +27,8 @@
32 set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
33
34 set(MIR_VERSION_MAJOR 0)
35-set(MIR_VERSION_MINOR 7) # This should change at least with every MIRSERVER_ABI
36-set(MIR_VERSION_PATCH 3)
37+set(MIR_VERSION_MINOR 8) # This should change at least with every MIRSERVER_ABI
38+set(MIR_VERSION_PATCH 0)
39
40 set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH})
41
42@@ -104,10 +104,10 @@
43
44 enable_testing()
45
46-include_directories(include/shared)
47+include_directories(include/common src/include/common)
48
49 # Check for boost
50-find_package(Boost 1.48.0 COMPONENTS date_time system program_options iostreams REQUIRED)
51+find_package(Boost 1.48.0 COMPONENTS date_time system program_options iostreams filesystem REQUIRED)
52 include_directories (
53 ${Boost_INCLUDE_DIRS}
54 )
55@@ -125,10 +125,10 @@
56
57 add_definitions(-DMESA_EGL_NO_X11_HEADERS)
58
59-# Default to mesa backend
60+# Default to mesa backend, but build all of them
61 set(
62 MIR_PLATFORM
63- mesa
64+ mesa;android
65 CACHE
66 STRING
67 "a list of graphics backends to build (options are 'mesa' or 'android')"
68@@ -190,6 +190,7 @@
69 add_subdirectory(benchmarks/)
70 add_subdirectory(tools/)
71 add_subdirectory(examples/)
72+add_subdirectory(playground/)
73 add_subdirectory(guides/)
74 add_subdirectory(cmake/)
75
76@@ -200,10 +201,10 @@
77
78 # There's no nice way to format this. Thanks CMake.
79 add_test(LGPL-required
80- /bin/sh -c "! grep -rl 'GNU General' ${PROJECT_SOURCE_DIR}/src/client ${PROJECT_SOURCE_DIR}/include/client ${PROJECT_SOURCE_DIR}/src/shared ${PROJECT_SOURCE_DIR}/include/shared ${PROJECT_SOURCE_DIR}/src/platform ${PROJECT_SOURCE_DIR}/include/platform"
81+ /bin/sh -c "! grep -rl 'GNU General' ${PROJECT_SOURCE_DIR}/src/client ${PROJECT_SOURCE_DIR}/include/client ${PROJECT_SOURCE_DIR}/src/common ${PROJECT_SOURCE_DIR}/include/common ${PROJECT_SOURCE_DIR}/src/include/common ${PROJECT_SOURCE_DIR}/src/platform ${PROJECT_SOURCE_DIR}/include/platform ${PROJECT_SOURCE_DIR}/src/include/platform"
82 )
83 add_test(GPL-required
84- /bin/sh -c "! grep -rl 'GNU Lesser' ${PROJECT_SOURCE_DIR}/src/server ${PROJECT_SOURCE_DIR}/include/server ${PROJECT_SOURCE_DIR}/include/test ${PROJECT_SOURCE_DIR}/tests ${PROJECT_SOURCE_DIR}/examples"
85+ /bin/sh -c "! grep -rl 'GNU Lesser' ${PROJECT_SOURCE_DIR}/src/server ${PROJECT_SOURCE_DIR}/include/server ${PROJECT_SOURCE_DIR}/src/include/server ${PROJECT_SOURCE_DIR}/tests ${PROJECT_SOURCE_DIR}/examples"
86 )
87
88 add_test(NAME server-ABI-unchanged
89@@ -229,3 +230,5 @@
90
91 enable_coverage_report(mirserver)
92 include (cmake/Doxygen.cmake)
93+include (cmake/ABICheck.cmake)
94+
95
96=== modified file 'benchmarks/android-input/CMakeLists.txt'
97--- benchmarks/android-input/CMakeLists.txt 2014-08-27 19:44:04 +0000
98+++ benchmarks/android-input/CMakeLists.txt 2014-10-10 13:43:10 +0000
99@@ -5,7 +5,7 @@
100 )
101
102 include_directories(
103- ${Mir_SOURCE_DIR}/include/test
104+ ${Mir_SOURCE_DIR}/tests/include
105 ${Mir_SOURCE_DIR}/include/platform
106 )
107
108
109=== modified file 'client-ABI-sha1sums'
110--- client-ABI-sha1sums 2014-08-05 14:01:56 +0000
111+++ client-ABI-sha1sums 2014-10-10 13:43:10 +0000
112@@ -8,9 +8,9 @@
113 21d07e655e85eeec8a3523e1c6f9c2252176ec01 include/client/mir_toolkit/mir_screencast.h
114 8609754db3be20e11e43858dd2c36b5bd480d5ec include/client/mir_toolkit/mir_surface.h
115 b141c4d79802ad626d969249c0004744e5c2a525 include/client/mir_toolkit/mir_wait.h
116-9907751d046e4aea81881cf19e5df52c7a6a813e include/shared/mir_toolkit/client_types.h
117-183d9e5e6cfe48b3d9145a28541dd4202ff6137b include/shared/mir_toolkit/common.h
118-fce4c1a9e0d037244f7e9e96ea2d8eaab4fc404c include/shared/mir_toolkit/cursors.h
119-bdaceadd56e41d2cb708f7c4da97acf84dfc75b7 include/shared/mir_toolkit/event.h
120-99ef5f3bf548508fae24c60f74be1dea018a6e8c include/shared/mir_toolkit/mesa/native_display.h
121-101017c17714a57db57d79b7b5e7df40a3568236 include/shared/mir_toolkit/mir_native_buffer.h
122+9907751d046e4aea81881cf19e5df52c7a6a813e include/common/mir_toolkit/client_types.h
123+183d9e5e6cfe48b3d9145a28541dd4202ff6137b include/common/mir_toolkit/common.h
124+fce4c1a9e0d037244f7e9e96ea2d8eaab4fc404c include/common/mir_toolkit/cursors.h
125+bdaceadd56e41d2cb708f7c4da97acf84dfc75b7 include/common/mir_toolkit/event.h
126+99ef5f3bf548508fae24c60f74be1dea018a6e8c include/common/mir_toolkit/mesa/native_display.h
127+101017c17714a57db57d79b7b5e7df40a3568236 include/common/mir_toolkit/mir_native_buffer.h
128
129=== added file 'cmake/ABICheck.cmake'
130--- cmake/ABICheck.cmake 1970-01-01 00:00:00 +0000
131+++ cmake/ABICheck.cmake 2014-10-10 13:43:10 +0000
132@@ -0,0 +1,109 @@
133+cmake_minimum_required (VERSION 2.6)
134+
135+execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE ABI_CHECK_TARGET_MACH OUTPUT_STRIP_TRAILING_WHITESPACE)
136+
137+set(ABI_CHECK_BASE_DIR $ENV{MIR_ABI_CHECK_BASE_DIR})
138+set(ABI_DUMP_PREBUILT_LIBDIR $ENV{MIR_ABI_DUMP_PREBUILT_LIBDIR})
139+
140+if ("${ABI_CHECK_BASE_DIR}" STREQUAL "")
141+ set(ABI_CHECK_BASE_DIR ${CMAKE_BINARY_DIR}/abi_dumps)
142+endif()
143+
144+set(ABI_DUMPS_DIR_PREFIX "abi_dumps/${ABI_CHECK_TARGET_MACH}")
145+
146+function(get_value_for_arg alist name output)
147+ list(FIND alist ${name} idx)
148+ if (idx GREATER -1)
149+ math(EXPR idx "${idx} + 1")
150+ list(GET alist ${idx} tmp_out)
151+ set(${output} "${tmp_out}" PARENT_SCOPE)
152+ endif()
153+endfunction()
154+
155+function(get_includes libname output)
156+ get_property(lib_includes TARGET ${libname} PROPERTY INCLUDE_DIRECTORIES)
157+ list(REMOVE_DUPLICATES lib_includes)
158+ string(REPLACE ";" "\n " tmp_out "${lib_includes}")
159+ set(${output} "${tmp_out}" PARENT_SCOPE)
160+endfunction()
161+
162+function(make_lib_descriptor name)
163+ set(libname "mir${name}")
164+
165+ list(FIND ARGN "INCLUDE_PRIVATE" include_private)
166+ if (include_private GREATER -1)
167+ set(private_headers "${CMAKE_SOURCE_DIR}/src/include/${name}")
168+ endif()
169+
170+ set(LIB_DESC_HEADERS "${CMAKE_SOURCE_DIR}/include/${name}
171+ ${private_headers}"
172+ )
173+
174+ if ("${ABI_DUMP_PREBUILT_LIBDIR}" STREQUAL "")
175+ get_property(LIB_DESC_LIBS TARGET ${libname} PROPERTY LOCATION)
176+ else()
177+ get_property(liblocation TARGET ${libname} PROPERTY LOCATION)
178+ get_filename_component(libfilename ${liblocation} NAME)
179+ set(LIB_DESC_LIBS "${ABI_DUMP_PREBUILT_LIBDIR}/${libfilename}")
180+ endif()
181+
182+ get_includes(${libname} LIB_DESC_INCLUDE_PATHS)
183+ set(LIB_DESC_GCC_OPTS "${CMAKE_CXX_FLAGS}")
184+
185+ get_value_for_arg("${ARGN}" "EXCLUDE_HEADERS" LIB_DESC_SKIP_HEADERS)
186+
187+ configure_file(${CMAKE_SOURCE_DIR}/tools/lib_descriptor.xml.skel ${libname}_desc.xml)
188+endfunction()
189+
190+#These headers are not part of the libmircommon interface
191+set(android-platform-headers "${CMAKE_SOURCE_DIR}/src/include/common/mir/graphics/android")
192+
193+make_lib_descriptor(client)
194+make_lib_descriptor(server)
195+make_lib_descriptor(common INCLUDE_PRIVATE EXCLUDE_HEADERS ${android-platform-headers})
196+make_lib_descriptor(platform INCLUDE_PRIVATE)
197+
198+macro(_add_custom_abi_dump_command libname version)
199+ set(ABI_DUMP_NAME ${ABI_DUMPS_DIR_PREFIX}/${libname}_${version}.abi.tar.gz)
200+
201+ if ("${ABI_DUMP_PREBUILT_LIBDIR}" STREQUAL "")
202+ set(dump_depends ${libname})
203+ else()
204+ set(dump_depends "")
205+ endif()
206+
207+ add_custom_command(OUTPUT ${ABI_DUMP_NAME}
208+ COMMAND abi-compliance-checker -gcc-path ${CMAKE_C_COMPILER} -l ${libname} -v1 ${version} -dump-path ${ABI_DUMP_NAME} -dump-abi ${libname}_desc.xml
209+ DEPENDS ${dump_depends}
210+ )
211+endmacro(_add_custom_abi_dump_command)
212+
213+macro(_define_abi_dump_for libname)
214+ _add_custom_abi_dump_command(${libname} next)
215+ add_custom_target(abi-dump-${libname} DEPENDS ${ABI_DUMP_NAME})
216+ _add_custom_abi_dump_command(${libname} base)
217+ add_custom_target(abi-dump-base-${libname} DEPENDS ${ABI_DUMP_NAME})
218+endmacro(_define_abi_dump_for)
219+
220+macro(_define_abi_check_for libname)
221+ set(OLD_ABI_DUMP "${ABI_CHECK_BASE_DIR}/${ABI_CHECK_TARGET_MACH}/${libname}_base.abi.tar.gz")
222+ set(NEW_ABI_DUMP ${ABI_DUMPS_DIR_PREFIX}/${libname}_next.abi.tar.gz)
223+ add_custom_target(abi-check-${libname}
224+ COMMAND abi-compliance-checker -l ${libname} -old "${OLD_ABI_DUMP}" -new "${NEW_ABI_DUMP}" -check-implementation
225+ DEPENDS abi-dump-${libname}
226+ )
227+endmacro(_define_abi_check_for)
228+
229+set(the_libs mirserver mirclient mircommon mirplatform)
230+
231+foreach(libname ${the_libs})
232+ _define_abi_dump_for(${libname})
233+ _define_abi_check_for(${libname})
234+ list(APPEND abi-dump-list abi-dump-${libname})
235+ list(APPEND abi-dump-base-list abi-dump-base-${libname})
236+ list(APPEND abi-check-list abi-check-${libname})
237+endforeach(libname)
238+
239+add_custom_target(abi-dump DEPENDS ${abi-dump-list})
240+add_custom_target(abi-dump-base DEPENDS ${abi-dump-base-list})
241+add_custom_target(abi-check DEPENDS ${abi-check-list})
242
243=== modified file 'cmake/MirCommon.cmake'
244--- cmake/MirCommon.cmake 2014-08-26 14:59:57 +0000
245+++ cmake/MirCommon.cmake 2014-10-10 13:43:10 +0000
246@@ -16,6 +16,12 @@
247 OFF
248 )
249
250+option(
251+ MIR_USE_PRECOMPILED_HEADERS
252+ "Use precompiled headers"
253+ ON
254+)
255+
256 if(ENABLE_MEMCHECK_OPTION)
257 find_program(
258 VALGRIND_EXECUTABLE
259@@ -117,3 +123,33 @@
260 endif()
261 endif()
262 endfunction()
263+
264+function (mir_precompiled_header TARGET HEADER)
265+ if (MIR_USE_PRECOMPILED_HEADERS)
266+ get_property(TARGET_COMPILE_FLAGS TARGET ${TARGET} PROPERTY COMPILE_FLAGS)
267+ get_property(TARGET_INCLUDE_DIRECTORIES TARGET ${TARGET} PROPERTY INCLUDE_DIRECTORIES)
268+ foreach(dir ${TARGET_INCLUDE_DIRECTORIES})
269+ if (${dir} MATCHES "usr/include")
270+ set(TARGET_INCLUDE_DIRECTORIES_STRING "${TARGET_INCLUDE_DIRECTORIES_STRING} -isystem ${dir}")
271+ else()
272+ set(TARGET_INCLUDE_DIRECTORIES_STRING "${TARGET_INCLUDE_DIRECTORIES_STRING} -I${dir}")
273+ endif()
274+ endforeach()
275+
276+ separate_arguments(
277+ PCH_CXX_FLAGS UNIX_COMMAND
278+ "${CMAKE_CXX_FLAGS} ${TARGET_COMPILE_FLAGS} ${TARGET_INCLUDE_DIRECTORIES_STRING}"
279+ )
280+
281+ add_custom_command(
282+ OUTPUT ${TARGET}_precompiled.hpp.gch
283+ DEPENDS ${HEADER}
284+ COMMAND ${CMAKE_CXX_COMPILER} ${PCH_CXX_FLAGS} -x c++-header -c ${HEADER} -o ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_precompiled.hpp.gch
285+ )
286+
287+ set_property(TARGET ${TARGET} APPEND_STRING PROPERTY COMPILE_FLAGS " -include ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_precompiled.hpp -Winvalid-pch ")
288+
289+ add_custom_target(${TARGET}_pch DEPENDS ${TARGET}_precompiled.hpp.gch)
290+ add_dependencies(${TARGET} ${TARGET}_pch)
291+ endif()
292+endfunction()
293
294=== modified file 'common-ABI-sha1sums'
295--- common-ABI-sha1sums 2014-08-27 19:35:36 +0000
296+++ common-ABI-sha1sums 2014-10-10 13:43:10 +0000
297@@ -1,45 +1,18 @@
298-6ad1f35928df9ffd917fbf17cbcdd533a8b5b27d include/shared/mir/basic_observers.h
299-3329ada91412ded2f127aee9a92f065e57b81cb2 include/shared/mir/cached_ptr.h
300-691278e8b89265fa7f11db78dc8a9b530cef6e99 include/shared/mir/default_configuration.h
301-82ff9499ef62739379616e02164dc98f9914c329 include/shared/mir/fd.h
302-15dd88e8de39d195c3a4e7c166678cd9b6951994 include/shared/mir/frontend/client_constants.h
303-b399dc08514751c86e23824612a52378dd9b1e23 include/shared/mir/geometry/dimensions.h
304-7031270546292995d38e6de165600db21ff51c68 include/shared/mir/geometry/displacement.h
305-283cb0ecf9d544300681fc2ab86bec568e2d20ff include/shared/mir/geometry/forward.h
306-bfd87d9fb800c1c1b528c00185570abac569caf2 include/shared/mir/geometry/length.h
307-d954464ef2d20c2876db68c94512a443186da09b include/shared/mir/geometry/point.h
308-65148c6d432950fb07589b6348afc4aab8b5079a include/shared/mir/geometry/rectangle.h
309-1b6632a6ee0a8758201739fb16c4eb1ce196344a include/shared/mir/geometry/rectangles.h
310-7d3ede2c85e9febc1c4951a342939e3a6dacb99e include/shared/mir/geometry/size.h
311-76d576231de039e25f4cf30829504552dcb9fc53 include/shared/mir/graphics/android/android_driver_interpreter.h
312-c02a1e68d5a8ccfd8710440e166c9e32bc974f1e include/shared/mir/graphics/android/android_native_buffer.h
313-05e7b043ccf49582a78e880967b3bc1f3512e010 include/shared/mir/graphics/android/fence.h
314-0168b68dea12355c22cd39fbfc50bca0e21fd6e5 include/shared/mir/graphics/android/mir_native_window.h
315-8f6d9dc681f3e0d212e6a74f9170ea7b3eb2607f include/shared/mir/graphics/android/native_buffer.h
316-424d1ff5b9bc299fc43f0afe961c4dafc3227992 include/shared/mir/graphics/android/sync_fence.h
317-e1be9faee8b844ca2ce617f8fd82c9ee08d56bed include/shared/mir/graphics/native_buffer.h
318-ec29bd74becf1c4f1004797e71d4e49d376dbfc8 include/shared/mir/input/android/android_input_lexicon.h
319-dcf8b8982f138bdde39a241825c610e955cd5e33 include/shared/mir/input/input_platform.h
320-de92c0e3f7a1cf204330cd29847e7524a3af00cd include/shared/mir/input/input_receiver_report.h
321-208cd6aed5ef5f8f39b3eb86604e4133cb840485 include/shared/mir/input/input_receiver_thread.h
322-3829a4722360d794658ed4db4af005c79f6504c5 include/shared/mir/input/null_input_receiver_report.h
323-2801f1a4fa975a1d8f9388192da2408d2bb472f4 include/shared/mir/input/xkb_mapper.h
324-be7d58c9fde2ce91cc66dd6144b76e08b536266b include/shared/mir/int_wrapper.h
325-2319b60bf87801a93af636d3bbfbae420f6776a4 include/shared/mir/logging/dumb_console_logger.h
326-52cb642982f7f4fa623cf041b11eca126a3df0f4 include/shared/mir/logging/input_timestamp.h
327-72e20902d70588af73bea7a524337264b853bf0a include/shared/mir/logging/logger.h
328-f199066a30882b22be901de0c4e6aa62e320e593 include/shared/mir/protobuf/google_protobuf_guard.h
329-4b4b8d7ae1cd870aeec6399afd6dbd56205c80b2 include/shared/mir/raii.h
330-bb27ec04b2861d128f420698491941f71e1aefc0 include/shared/mir/recursive_read_write_mutex.h
331-903210453b98267e47c03ab2920c1db047ba0457 include/shared/mir/report/lttng/mir_tracepoint.h
332-52b6b60543a361e91dbeaa2549114239f57b6b4e include/shared/mir/report/lttng/tracepoint_provider.h
333-dc80f8a57f133276dd5a72f4d0360a7b71154d16 include/shared/mir/shared_library.h
334-b4e96264b9a57a1f2ceceb700c5379658905ded7 include/shared/mir/thread_name.h
335-9907751d046e4aea81881cf19e5df52c7a6a813e include/shared/mir_toolkit/client_types.h
336-183d9e5e6cfe48b3d9145a28541dd4202ff6137b include/shared/mir_toolkit/common.h
337-fce4c1a9e0d037244f7e9e96ea2d8eaab4fc404c include/shared/mir_toolkit/cursors.h
338-bdaceadd56e41d2cb708f7c4da97acf84dfc75b7 include/shared/mir_toolkit/event.h
339-99ef5f3bf548508fae24c60f74be1dea018a6e8c include/shared/mir_toolkit/mesa/native_display.h
340-101017c17714a57db57d79b7b5e7df40a3568236 include/shared/mir_toolkit/mir_native_buffer.h
341-9f646fa12eaca5fc3b7a8fde6208673c071c8ef3 include/shared/mir/udev/wrapper.h
342-9fd77ab693cc4c9a200e44804f5493733528a674 include/shared/mir/variable_length_array.h
343+3329ada91412ded2f127aee9a92f065e57b81cb2 include/common/mir/cached_ptr.h
344+82ff9499ef62739379616e02164dc98f9914c329 include/common/mir/fd.h
345+b399dc08514751c86e23824612a52378dd9b1e23 include/common/mir/geometry/dimensions.h
346+d954464ef2d20c2876db68c94512a443186da09b include/common/mir/geometry/point.h
347+dc7c62d3916eec025e8e7deaf57e06077ce38928 include/common/mir/geometry/rectangle.h
348+5161774957e3ca4f5fa4e7db025d0978d2bbef06 include/common/mir/geometry/rectangles.h
349+42646c2367b9821e3aa71feff6e31cf50526acaa include/common/mir/geometry/size.h
350+e1be9faee8b844ca2ce617f8fd82c9ee08d56bed include/common/mir/graphics/native_buffer.h
351+dcf8b8982f138bdde39a241825c610e955cd5e33 include/common/mir/input/input_platform.h
352+208cd6aed5ef5f8f39b3eb86604e4133cb840485 include/common/mir/input/input_receiver_thread.h
353+be7d58c9fde2ce91cc66dd6144b76e08b536266b include/common/mir/int_wrapper.h
354+48015c67ddc4998ed5a2e8bb04ff3a4bfdd6a613 include/common/mir/time/clock.h
355+9907751d046e4aea81881cf19e5df52c7a6a813e include/common/mir_toolkit/client_types.h
356+183d9e5e6cfe48b3d9145a28541dd4202ff6137b include/common/mir_toolkit/common.h
357+fce4c1a9e0d037244f7e9e96ea2d8eaab4fc404c include/common/mir_toolkit/cursors.h
358+bdaceadd56e41d2cb708f7c4da97acf84dfc75b7 include/common/mir_toolkit/event.h
359+99ef5f3bf548508fae24c60f74be1dea018a6e8c include/common/mir_toolkit/mesa/native_display.h
360+101017c17714a57db57d79b7b5e7df40a3568236 include/common/mir_toolkit/mir_native_buffer.h
361
362=== modified file 'cross-compile-chroot.sh'
363--- cross-compile-chroot.sh 2014-03-26 05:48:59 +0000
364+++ cross-compile-chroot.sh 2014-10-10 13:43:10 +0000
365@@ -24,9 +24,11 @@
366 case $OPTNAME in
367 c )
368 clean_build_dir ${BUILD_DIR}
369+ shift
370 ;;
371 u )
372 _do_update_chroot=1
373+ shift
374 ;;
375 h )
376 usage
377@@ -78,6 +80,6 @@
378 -DMIR_PLATFORM=android\;mesa \
379 ..
380
381- make -j${NUM_JOBS}
382+ make -j${NUM_JOBS} $@
383
384 popd > /dev/null
385
386=== modified file 'debian/changelog'
387--- debian/changelog 2014-09-18 14:54:51 +0000
388+++ debian/changelog 2014-10-10 13:43:10 +0000
389@@ -1,3 +1,98 @@
390+mir (0.8.0-0ubuntu1) UNRELEASED; urgency=medium
391+
392+ * New upstream release 0.8.0 (https://launchpad.net/mir/+milestone/0.8.0)
393+ - Enhancements:
394+ . Less sensitivity to ABI breaks - many headers unused by external
395+ projects are now hidden and not installed by -dev packaes. If you
396+ require any headers that are missing, just ask.
397+ . Touchspots: --enable-touchspots to servers; visually shows touch
398+ locations (warning: This affects performance LP: #1373692).
399+ . Client performance reporting: Any Mir client can now get accurate
400+ performance information (frame rate, render time, buffer lag etc)
401+ logged to stdout. Just set env MIR_CLIENT_PERF_REPORT=log
402+ . Further improved touch responsiveness, with less lag and smoother
403+ scrolling (so long as you don't enable touchspots).
404+ . Slightly faster builds using precompiled headers.
405+ . Turn hardware overlays on by default. When in use, this halves the
406+ CPU usage of a Mir server. Already enabled in unity-system-compositor.
407+ . More scripting to detect ABI breaks.
408+ . Improved src/ tree consistency (renamed "src/shared" to "src/common").
409+ . Improved fatal signal design: Changed from SIGTERM to SIGHUP delivered
410+ to clients on unexpected server disconnection.
411+ . Improved library/package design to allow concurrent installations
412+ of different Mir versions without conflicts.
413+ . Fd reception code is now common to client and server.
414+ - ABI summary: Servers need rebuilding, but clients do not;
415+ . Mirclient ABI unchanged at 8
416+ . Mircommon ABI bumped to 2
417+ . Mirplatform ABI bumped to 3
418+ . Mirserver ABI bumped to 26
419+ - API changes between Mir 0.7 and 0.8:
420+ . Lots of headers removed from the public SDK! We have only hidden
421+ headers not known to be used by any known projects. Please let us
422+ know if anything is missing - https://bugs.launchpad.net/mir/+filebug
423+ . graphics::Platform - interface changed significantly.
424+ . Lots of server API changes to support touchspots.
425+ . File descriptors now passed as type Fd instead of int32_t.
426+ - Bug fixes:
427+ . [regression] Mir deb packages with versioned names cannot be installed
428+ simultaneously any more (LP: #1293944)
429+ . A frozen client can hang the whole server (LP: #1350207)
430+ . QtMir FTBFS: fatal error: mir/input/input_channel.h: No such file or
431+ directory (LP: #1365934)
432+ . [regression] platform-api fails to build against Mir 0.8 (LP: #1368354)
433+ . Mir FTBFS with gcc 4.9.1-14 (utopic update):
434+ auto_unblock_thread.h:44:46: error: no matching function for call to
435+ ‘std::thread::thread(<brace-enclosed initializer list>)’ (LP: #1369389)
436+ . [regression] Compositing is jerky and stutters during touch events
437+ (LP: #1372850)
438+ . unit test fails: AndroidInputReceiverSetup.slow_raw_input_doesnt_cause_
439+ frameskipping (LP: #1373826)
440+ . intermittent hang in TestClientInput (LP: #1338612)
441+ . TestClientInput.scene_obscure_motion_events_by_stacking fails
442+ intermittently (LP: #1361757)
443+ . [regression] First frame is composited as black (even though the client
444+ has provided a non-black frame) (LP: #1362444)
445+ . Some mali drivers crash after repeatedly creating/destroying the mir
446+ compositor threads (LP: #1362841)
447+ . [android] SIGTERM to server with connected client causes crash
448+ (LP: #1364637)
449+ . [regression] acceptance tests fails in
450+ ServerDisconnect.causes_client_to_terminate_by_default (LP: #1364772)
451+ . [regression] symbol lookup error:
452+ /usr/lib/arm-linux-gnueabihf/libmirserver.so.24: undefined symbol:
453+ _ZTIN7android7RefBaseE (libmirserver 0.6.1 doesn't work with
454+ libmircommon 0.7.0) (LP: #1364890)
455+ . [regression] Mir FTBFS with g++-4.8 [error: ISO C++ forbids casting
456+ between pointer-to-function and pointer-to-object] (LP: #1366134)
457+ . Intermittent CI failure in DemoPrivateProtobuf.client_calls_server
458+ (LP: #1367353)
459+ . Overly strict libmirplatform* dependencies are blocking CI
460+ (LP: #1370866)
461+ . [regression] mir demo servers segfault on shutdown (LP: #1371619)
462+ . Nested server crashes with SIGSEGV on shutdown in eglDestroyContext()
463+ (LP: #1372276)
464+ . [regression] Moving/resizing clients in a nested server is very
465+ jerky/stuttery (LP: #1372300)
466+ . [regression] Bypass/overlays are toggling constantly (LP: #1373689)
467+ . [regression] Mir server uses too much CPU during touch scrolling
468+ (LP: #1373809)
469+ . Intermittent test failures in TestClientCursorAPI.* (LP: #1342567)
470+ . clang emits lots of warnings about lttng headers (LP: #1348472)
471+ . [enhancement] Draw input event location (LP: #1323522)
472+ . demo shell: Keep colours consistent, regardless of the physical pixel
473+ format of your framebuffer (LP: #1375660)
474+ . tests: Fix SharedLibraryProber test runs on i386. (LP: #1375829)
475+ . Touchspots rendered as squares on some devices (LP: #1373698)
476+ . The headers needed to use features shown in the acceptance tests are
477+ not published (LP: #1375301)
478+ . update-all-ABI-sha1sums.sh and install_on_android.sh are no longer
479+ executable. (LP: #1376547)
480+ . Fix arm64 package by adding arm64 to the shared library prober test.
481+ (LP: #1379478)
482+
483+ -- Daniel van Vugt <daniel.van.vugt@canonical.com> Tue, 30 Sep 2014 16:08:44 +0800
484+
485 mir (0.7.3+14.10.20140918.1-0ubuntu1) utopic; urgency=medium
486
487 [ Andreas Pokorny ]
488
489=== modified file 'debian/control'
490--- debian/control 2014-09-18 06:04:10 +0000
491+++ debian/control 2014-10-10 13:43:10 +0000
492@@ -19,6 +19,7 @@
493 libboost-program-options-dev,
494 libboost-system-dev,
495 libboost-iostreams-dev,
496+ libboost-filesystem-dev,
497 protobuf-compiler,
498 libdrm-dev,
499 libegl1-mesa-dev,
500@@ -44,22 +45,21 @@
501 # just go ahead. ~mir-team will notice and sync up the code again.
502 Vcs-Bzr: https://code.launchpad.net/~mir-team/mir/trunk
503
504-Package: libmirserver25
505+Package: libmirserver26
506 Section: libs
507 Architecture: i386 amd64 armhf arm64
508 Multi-Arch: same
509 Pre-Depends: ${misc:Pre-Depends}
510 Depends: ${misc:Depends},
511 ${shlibs:Depends},
512- libmirplatformgraphics-mesa (= ${binary:Version}) |
513- libmirplatformgraphics-android (= ${binary:Version}),
514+ libmirplatform3driver-mesa | libmirplatform3driver-android,
515 Description: Display server for Ubuntu - server library
516 Mir is a display server running on linux systems, with a focus on efficiency,
517 robust operation and a well-defined driver model.
518 .
519 Contains the shared library needed by server applications for Mir.
520
521-Package: libmirplatform2
522+Package: libmirplatform3
523 Section: libs
524 Architecture: i386 amd64 armhf arm64
525 Multi-Arch: same
526@@ -73,7 +73,7 @@
527 Contains the shared libraries required for the Mir server to interact with
528 the underlying hardware platform.
529
530-Package: libmirplatformgraphics-mesa
531+Package: libmirplatform3driver-mesa
532 Section: libs
533 Architecture: i386 amd64 armhf arm64
534 Multi-Arch: same
535@@ -87,7 +87,7 @@
536 Contains the shared libraries required for the Mir server to interact with
537 the hardware platform using the Mesa drivers.
538
539-Package: libmirplatformgraphics-android
540+Package: libmirplatform3driver-android
541 Section: libs
542 Architecture: i386 amd64 armhf
543 Multi-Arch: same
544@@ -106,7 +106,7 @@
545 Architecture: i386 amd64 armhf arm64
546 Multi-Arch: same
547 Pre-Depends: ${misc:Pre-Depends}
548-Depends: libmircommon1 (= ${binary:Version}),
549+Depends: libmircommon2 (= ${binary:Version}),
550 libprotobuf-dev (>= 2.4.1),
551 ${misc:Depends},
552 Breaks: mircommon-dev (<< 0.6)
553@@ -122,7 +122,7 @@
554 Architecture: i386 amd64 armhf arm64
555 Multi-Arch: same
556 Pre-Depends: ${misc:Pre-Depends}
557-Depends: libmirplatform2 (= ${binary:Version}),
558+Depends: libmirplatform3 (= ${binary:Version}),
559 libmircommon-dev,
560 libboost-program-options-dev,
561 ${misc:Depends},
562@@ -139,7 +139,7 @@
563 Architecture: i386 amd64 armhf arm64
564 Multi-Arch: same
565 Pre-Depends: ${misc:Pre-Depends}
566-Depends: libmirserver25 (= ${binary:Version}),
567+Depends: libmirserver26 (= ${binary:Version}),
568 libmirplatform-dev (= ${binary:Version}),
569 libmircommon-dev (= ${binary:Version}),
570 libglm-dev,
571@@ -157,8 +157,7 @@
572 Pre-Depends: ${misc:Pre-Depends}
573 Depends: ${misc:Depends},
574 ${shlibs:Depends},
575- libmirclientplatform-mesa (= ${binary:Version}) |
576- libmirclientplatform-android (= ${binary:Version}),
577+ libmirclient8driver-mesa | libmirclient8driver-android,
578 Description: Display server for Ubuntu - client library
579 Mir is a display server running on linux systems, with a focus on efficiency,
580 robust operation and a well-defined driver model.
581@@ -180,14 +179,13 @@
582 .
583 Contains header files required to develop against Mir.
584
585-Package: libmirclientplatform-mesa
586+Package: libmirclient8driver-mesa
587 Section: libs
588 Architecture: i386 amd64 armhf arm64
589 Multi-Arch: same
590 Pre-Depends: ${misc:Pre-Depends}
591 Depends: ${misc:Depends},
592 ${shlibs:Depends}
593-Replaces: libmirclientplatform
594 Description: Display server for Ubuntu - client platform library for Mesa
595 Mir is a display server running on linux systems, with a focus on efficiency,
596 robust operation and a well-defined driver model.
597@@ -195,14 +193,13 @@
598 Contains the shared libraries required for the Mir clients to interact with
599 the underlying hardware platform using the Mesa drivers.
600
601-Package: libmirclientplatform-android
602+Package: libmirclient8driver-android
603 Section: libs
604 Architecture: i386 amd64 armhf
605 Multi-Arch: same
606 Pre-Depends: ${misc:Pre-Depends}
607 Depends: ${misc:Depends},
608 ${shlibs:Depends}
609-Replaces: libmirclientplatform
610 Description: Display server for Ubuntu - client platform library for Android
611 Mir is a display server running on linux systems, with a focus on efficiency,
612 robust operation and a well-defined driver model.
613@@ -250,7 +247,7 @@
614 .
615 Contains a tool for stress testing the Mir display server
616
617-Package: libmircommon1
618+Package: libmircommon2
619 Section: libs
620 Architecture: i386 amd64 armhf arm64
621 Multi-Arch: same
622
623=== modified file 'debian/copyright'
624--- debian/copyright 2013-08-28 03:41:48 +0000
625+++ debian/copyright 2014-10-10 13:43:10 +0000
626@@ -50,7 +50,7 @@
627 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
628 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
629
630-Files: include/client/* include/shared/* src/client/* src/shared/* 3rd_party/android-deps/std/*
631+Files: include/client/* include/common/* src/client/* src/common/* 3rd_party/android-deps/std/*
632 Copyright: 2012-2013, Canonical Ltd.
633 License: LGPL-3
634 This program is free software: you can redistribute it and/or modify
635
636=== modified file 'debian/create_postinst_prerm_scripts.sh'
637--- debian/create_postinst_prerm_scripts.sh 2014-04-15 15:02:05 +0000
638+++ debian/create_postinst_prerm_scripts.sh 2014-10-10 13:43:10 +0000
639@@ -6,7 +6,7 @@
640 deb_host_arch=$1
641 deb_host_multiarch=$2
642
643-mir_platform_types="platformgraphics clientplatform"
644+mir_platform_types="${PLATFORM_DRIVER} ${CLIENT_DRIVER}"
645 case $deb_host_arch in
646 arm64)
647 mir_platforms="mesa"
648
649=== modified file 'debian/install_ld_so_conf.sh'
650--- debian/install_ld_so_conf.sh 2014-04-15 15:02:05 +0000
651+++ debian/install_ld_so_conf.sh 2014-10-10 13:43:10 +0000
652@@ -5,7 +5,7 @@
653 DEB_HOST_ARCH=$1
654 DEB_HOST_MULTIARCH=$2
655
656-mir_platform_types="platformgraphics clientplatform"
657+mir_platform_types="${PLATFORM_DRIVER} ${CLIENT_DRIVER}"
658 case $DEB_HOST_ARCH in
659 arm64)
660 mir_platforms="mesa"
661
662=== renamed file 'debian/libmirclientplatform-android.install' => 'debian/libmirclient8driver-android.install'
663--- debian/libmirclientplatform-android.install 2014-02-14 08:43:47 +0000
664+++ debian/libmirclient8driver-android.install 2014-10-10 13:43:10 +0000
665@@ -1,1 +1,1 @@
666-usr/lib/*/mir/clientplatform/android/*
667+usr/lib/*/mir/client*driver/android/*
668
669=== renamed file 'debian/libmirclientplatform-mesa.install' => 'debian/libmirclient8driver-mesa.install'
670--- debian/libmirclientplatform-mesa.install 2014-02-14 08:43:47 +0000
671+++ debian/libmirclient8driver-mesa.install 2014-10-10 13:43:10 +0000
672@@ -1,1 +1,1 @@
673-usr/lib/*/mir/clientplatform/mesa/*
674+usr/lib/*/mir/client*driver/mesa/*
675
676=== renamed file 'debian/libmircommon1.install' => 'debian/libmircommon2.install'
677--- debian/libmircommon1.install 2014-08-26 14:59:57 +0000
678+++ debian/libmircommon2.install 2014-10-10 13:43:10 +0000
679@@ -1,1 +1,1 @@
680-usr/lib/*/libmircommon.so.1
681+usr/lib/*/libmircommon.so.2
682
683=== renamed file 'debian/libmirplatform2.install' => 'debian/libmirplatform3.install'
684--- debian/libmirplatform2.install 2014-08-26 14:41:22 +0000
685+++ debian/libmirplatform3.install 2014-10-10 13:43:10 +0000
686@@ -1,1 +1,1 @@
687-usr/lib/*/libmirplatform.so.2
688+usr/lib/*/libmirplatform.so.3
689
690=== renamed file 'debian/libmirplatformgraphics-android.install' => 'debian/libmirplatform3driver-android.install'
691--- debian/libmirplatformgraphics-android.install 2014-02-14 08:43:47 +0000
692+++ debian/libmirplatform3driver-android.install 2014-10-10 13:43:10 +0000
693@@ -1,1 +1,1 @@
694-usr/lib/*/mir/platformgraphics/android/*
695+usr/lib/*/mir/platform*driver/android/*
696
697=== renamed file 'debian/libmirplatformgraphics-mesa.install' => 'debian/libmirplatform3driver-mesa.install'
698--- debian/libmirplatformgraphics-mesa.install 2014-02-14 08:43:47 +0000
699+++ debian/libmirplatform3driver-mesa.install 2014-10-10 13:43:10 +0000
700@@ -1,1 +1,1 @@
701-usr/lib/*/mir/platformgraphics/mesa/*
702+usr/lib/*/mir/platform*driver/mesa/*
703
704=== renamed file 'debian/libmirserver25.install' => 'debian/libmirserver26.install'
705--- debian/libmirserver25.install 2014-08-26 14:41:22 +0000
706+++ debian/libmirserver26.install 2014-10-10 13:43:10 +0000
707@@ -1,1 +1,1 @@
708-usr/lib/*/libmirserver.so.25
709+usr/lib/*/libmirserver.so.26
710
711=== modified file 'debian/rules'
712--- debian/rules 2014-08-27 19:34:09 +0000
713+++ debian/rules 2014-10-10 13:43:10 +0000
714@@ -13,6 +13,9 @@
715 export CC=$(DEB_HOST_GNU_TYPE)-gcc-4.9
716 export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9
717
718+export PLATFORM_DRIVER = platform3driver
719+export CLIENT_DRIVER = client8driver
720+
721 %:
722 dh $@ --parallel --fail-missing
723
724@@ -49,8 +52,8 @@
725
726 override_dh_install:
727 dh_install --fail-missing \
728- -Xusr/lib/$(DEB_HOST_MULTIARCH)/libmirplatformgraphics.so \
729- -Xusr/lib/$(DEB_HOST_MULTIARCH)/libmirclientplatform.so
730+ -Xusr/lib/$(DEB_HOST_MULTIARCH)/libmir$(PLATFORM_DRIVER).so \
731+ -Xusr/lib/$(DEB_HOST_MULTIARCH)/libmir$(CLIENT_DRIVER).so
732 sh debian/install_ld_so_conf.sh $(DEB_HOST_ARCH) $(DEB_HOST_MULTIARCH)
733
734 override_dh_installdeb:
735
736=== added file 'doc/abi_compatibility_tools.md'
737--- doc/abi_compatibility_tools.md 1970-01-01 00:00:00 +0000
738+++ doc/abi_compatibility_tools.md 2014-10-10 13:43:10 +0000
739@@ -0,0 +1,82 @@
740+Tools to track ABI compatibility {#abi_compatibility_tools}
741+================================
742+
743+We have created a few build targets to help us track ABI compatibility across
744+different Mir versions and ensure we increase the ABI version properly. These
745+target use the abi-compliance-checker tool to create and check the ABI dumps.
746+
747+The targets are:
748+
749+* **make abi-dump** (or abi-dump-<library> for a specific library, e.g., abi-dump-mirclient)
750+
751+ Produces ABI dumps for the public versioned libraries shipped by Mir. The
752+ resulting ABI dump for each library is saved as
753+ <build-dir>/abi_dumps/<arch>/<libname>_next.abi.tar.gz.
754+
755+ By default, this target also builds the libraries needed for create the
756+ requested ABI dumps. The environment variable `MIR_ABI_DUMP_PREBUILT_LIBDIR`
757+ can be set **at configuration time** (i.e., when invoking cmake) to a path
758+ containing pre-built libraries to use instead.
759+
760+ _N.B: the path set with MIR_ABI_DUMP_PREBUILT_LIBDIR is expected to contain
761+ *.so files, not only *.so.X files._
762+
763+* **make abi-dump-base** (or abi-dump-base-<library> for a specific library,
764+ e.g., abi-dump-base-mirclient)
765+
766+ Similar to make abi-dump, but saves the ABI dump as
767+ <build-dir>/abi_dumps/<arch>/<libname>_base.abi.tar.gz (note the 'base' vs
768+ 'next' in the file name).
769+
770+* **make abi-check** (or abi-check-<library>, for a specific library)
771+ e.g., abi-check-mirclient)
772+
773+ Produces ABI dumps (this target depends on the abi-dump target), and checks
774+ them against a set of base ABI dumps. The base ABI dumps are assumed to be
775+ located in <build-dir>/abi_dumps/<arch>/, i.e., where make abi-dump-base
776+ would normally place the files.
777+
778+ The environment variable `MIR_ABI_CHECK_BASE_DIR` can be set **at
779+ configuration time** (i.e., when invoking cmake) to set a different directory
780+ for the base ABI dumps. The supplied directory must **not** contain the
781+ <arch> portion of the path (e.g., just build_dir/abi_dumps, not
782+ build_dir/abi_dumps/x86_64-linux-gnu).
783+
784+ Since this target depends on the abi-dump target, the
785+ `MIR_ABI_DUMP_PREBUILT_LIBDIR` environment variable can be set to use
786+ pre-built libraries instead of building them.
787+
788+Sample usage
789+------------
790+
791+A common scenario is to check the ABI of the development version against the
792+latest archive version. This is one way to perform the check:
793+
794+### Step 1: Produce the ABI dumps for the installed version
795+
796+Start by download the source corresponding to the installed version:
797+
798+ $ apt-get source mir
799+ $ cd mir-<version>
800+
801+At this point we can select whether to build the libraries from scratch:
802+
803+ $ debian/rules override_dh_auto_configure
804+
805+... or to reuse the pre-built libraries, assuming they are installed (we
806+need their -dev packages too!):
807+
808+ $ MIR_ABI_DUMP_PREBUILT_LIBDIR=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) debian/rules override_dh_auto_configure
809+
810+Now we can create the ABI dumps:
811+
812+ $ cd <build-dir> && make abi-dump-base
813+
814+This will create base ABI dump files which we can use in the next step.
815+
816+### Step 2: Check the ABI of the development version against the produced base ABI dumps
817+
818+ $ bzr branch lp:mir && cd mir
819+ $ MIR_ABI_CHECK_BASE_DIR=/path/to/base/abi/dumps debian/rules override_dh_auto_configure
820+ $ cd <build-dir>
821+ $ make abi-check
822
823=== added file 'doc/dso_versioning_guide.md'
824--- doc/dso_versioning_guide.md 1970-01-01 00:00:00 +0000
825+++ doc/dso_versioning_guide.md 2014-10-10 13:43:10 +0000
826@@ -0,0 +1,195 @@
827+A brief guide for versioning symbols in the Mir DSOs {#dso_versioning_guide}
828+====================================================
829+
830+So, what do I have to do?
831+-------------------------
832+
833+There are more detailed descriptions below, but as a general rule:
834+
835+ - If you add a new symbol, add it to a _new_ dotted-decimal version stanza,
836+   like `MIR_CLIENT_8.1`, `MIR_CLIENT_8.2`, etc.
837+ - If you change the behaviour or signature of a symbol and not change SONAME,
838+ see "Change symbols without breaking ABI" below
839+ - If you change SONAME, collect all previous symbol version stanzas into a
840+ single labelled with the new SOVER. For example, remove the `MIR_CLIENT_8`,
841+ `MIR_CLIENT_8.1`, and `MIR_CLIENT_8.2` stanzas and consolidate their
842+ contents into a single new `MIR_CLIENT_9` stanza.
843+
844+Can I have some details?
845+------------------------
846+
847+Sure.
848+
849+Mir is a set of libraries, one C++ library for writing display-
850+server/compositor/shells and one C library for writing clients (or, more
851+usually, toolkits for clients) that use a Mir display-server for output. Mir
852+also has internal dynamic libraries for platform support - drivers - and may in
853+future allow the same with extensions to the core functionality. As such, the
854+ABI of these interfaces is important to keep in mind.
855+
856+Mir uses the ELF symbol versioning support. This provides three advantages:
857+
858+ - Consumers of the Mir libraries can know at load time rather than symbol
859+ resolution time whether the library exposes all the symbols they expect.
860+ - We can drop or change the behaviour of symbols without breaking ABI by
861+ exposing multiple different implementations under different versions, and
862+ - We can (modulo protobuf singletons in our current implementation, and with
863+ some care) safely load multiple different versions of Mir libraries into the
864+ same process.
865+
866+When should I bump SONAME?
867+--------------------------
868+
869+There are varying standards for when to bump SONAME. In Mir we choose to bump
870+the SONAME of a library whenever we make a change that could cause a binary
871+linked to the library to fail _as long as_ the binary is using only public
872+interfaces and (where applicable) relying on documented behaviour. In general,
873+changes that make an interface work as described by its documentation will not
874+result in SONAME bumps.
875+
876+With that explanation, you _should_ bump SONAME when:
877+
878+ - You remove a public symbol from a library
879+ - You change the signature of a public symbol _without_ retaining the previous
880+ signature exposed under the old versioning.
881+ - You change the behaviour of a public symbol _without_ retaining the previous
882+ behaviour exposed with the old versioning.
883+
884+If you are changing the behaviour of an interface, think about whether it's easy
885+to maintain the old interface in parallel. If it is, you should consider
886+providing both under different versions. This should become easier over time as
887+the Mir ABI becomes more stable and also more valuable over time as the Mir
888+libraries become more widely used.
889+
890+Load-time version detection
891+---------------------------
892+
893+When using versioned symbols the linker adds an extra, special symbol containing
894+the version(s) exported from the library. Consumers of the library resolve this
895+on library load. For example:
896+
897+ $ objdump -C -T lib/libmirclient.so
898+ …
899+ 00000000002a2080 w DO .data.rel.ro 0000000000000080 MIR_CLIENT_8 vtable for mir::client::DefaultConnectionConfiguration
900+ 0000000000000000 g DO *ABS* 0000000000000000 MIR_CLIENT_8 MIR_CLIENT_8
901+ 0000000000030ed2 g DF .text 0000000000000098 MIR_CLIENT_8 mir::client::DefaultConnectionConfiguration::the_rpc_report()
902+ …
903+
904+This shows the special `MIR_CLIENT_8` symbol of the current libmirclient, along
905+with a versioned symbol in the read-only data segment (the vtable for
906+`mir::client::DefaultConnectionConfiguration`) and a versioned symbol in the
907+text segment (the implementation of
908+`mir::client::DefaultConnectionConfiguration::the_rpc_report()`). If a client
909+needed a symbol versioned with `MIR_CLIENT_9`, it would try to resolve this at
910+load time and fail, rather than failing when the symbol was first referenced -
911+possibly much later, and more confusingly.
912+
913+### So what do I have to do to make this work?
914+
915+When you add new symbols, add them to a new `version` block in the relevant
916+`symbols.map` file, like so:
917+
918+ MIR_CLIENT_8 {
919+ global:
920+ mir_connect_sync;
921+ ...
922+ /* Other symbols go here */
923+ };
924+
925+ MIR_CLIENT_8.1 {
926+ global:
927+ mir_connect_new_symbol;
928+ local:
929+ *;
930+ } MIR_CLIENT_8;
931+
932+Note that the script is read top to bottom; wildcards are greedily bound when
933+first encountered, so to avoid surprises you should only have a wildcard in the
934+final stanza.
935+
936+Change symbols without breaking ABI
937+-----------------------------------
938+
939+ELF DSOs can have multiple implementations for the same symbol with different
940+versions. This means that you can change the signature or behaviour of a symbol
941+without breaking dependants that use the old behaviour. While there can be as
942+many different implementations with different versions as you want, there can
943+only be one default implementation - this is what the linker will resolve to
944+when building a dependant project.
945+
946+Binding different implementations to the versioned symbol is done with `__asm__`
947+directives in the relevant source file(s). The default implementation is
948+specified with `symbol_name@@VERSION`; other versions are specified with
949+`symbol_name@VERSION`.
950+
951+Note that this does _not_ require a change in SONAME. Binaries that have been
952+linked against the old library will continue to work and resolve to the old
953+implementation. Binaries linked against the new library will resolve to the new
954+(default) implementation.
955+
956+### So, what do I have to do to make this work?
957+For example, if you wanted to change the signature of
958+`mir_connection_create_surface` to take a new parameter:
959+
960+`mir_connection_api.cpp`:
961+
962+ __asm__(".symver old_mir_connection_create_surface,mir_connection_create_surface@MIR_CLIENT_8");
963+
964+ MirWaitHandle* old_mir_connection_create_surface(...)
965+ /* The old implementation */
966+
967+ /* The @@ specifies that this is the default version */
968+ __asm__(".symver mir_connection_create_surface,mir_connection_create_surface@@@MIR_CLIENT_8.1");
969+ MirWaitHandle* mir_connection_create_surface(...)
970+ /* The new implementation */
971+
972+`symbols.map`:
973+
974+ MIR_CLIENT_8 {
975+ global:
976+ ...
977+ mir_connection_create_surface;
978+ ...
979+ };
980+
981+ MIR_CLIENT_8.1 {
982+ global:
983+ ...
984+ mir_connection_create_surface;
985+ ...
986+ local:
987+ *;
988+ } MIR_CLIENT_8;
989+
990+Safely load multiple versions of a library into the same address space
991+----------------------------------------------------------------------
992+
993+This benefit is currently theoretical, as there seems to be a Protobuf singleton
994+that aborts if we try this. But should that be resolved, it's theoretically
995+possible and of some benefit...
996+
997+This situation will come about - the Qtmir plugin links to libmirclient and also
998+libEGL, and libEGL will link to libmirclient itself. There is no guarantee that
999+Qtmir and libEGL will link to the same SONAME, and so a process can end up
1000+trying to load both `libmirclient.so.8` and `libmirclient.so.9` into its address
1001+space. Without symbol versioning this is potentially broken - there's no
1002+mechanism for libEGL to only resolve symbols from `libmirclient.so.8` and Qtmir
1003+to only resolve symbols from `libmirclient.so.9`, so in cases where symbols have
1004+changed use of those symbols will break.
1005+
1006+By versioning the symbols we ensure that code always gets exactly the symbol
1007+implementation it expects, even when multiple library versions are loaded.
1008+
1009+### So, what do I have to do to make this work?
1010+
1011+Ensure that different implementations of a symbol have different versions.
1012+
1013+Additionally there's the complication of passing objects between different
1014+versions. For the moment, we can not bother trying to make this work.
1015+
1016+
1017+See also:
1018+---------
1019+[Binutils manual](https://sourceware.org/binutils/docs/ld/VERSION.html)
1020+
1021+[Former glibc maintainer's DSO guide](http://www.akkadia.org/drepper/dsohowto.pdf)
1022
1023=== modified file 'doc/mainpage.md'
1024--- doc/mainpage.md 2014-08-29 13:20:26 +0000
1025+++ doc/mainpage.md 2014-10-10 13:43:10 +0000
1026@@ -85,3 +85,5 @@
1027 - \ref md_HACKING "Mir hacking guide"
1028 - \subpage android_new_device_bringup "New android device bringup"
1029 - \ref component_reports
1030+ - \ref dso_versioning_guide
1031+ - \ref abi_compatibility_tools
1032
1033=== modified file 'examples/CMakeLists.txt'
1034--- examples/CMakeLists.txt 2014-08-08 17:04:36 +0000
1035+++ examples/CMakeLists.txt 2014-10-10 13:43:10 +0000
1036@@ -1,12 +1,14 @@
1037
1038-#its a bit troubling that these need to be included for demo_input_filter
1039-include_directories(${MIR_3RD_PARTY_INCLUDE_DIRECTORIES})
1040-include_directories(${MIR_ANDROID_INCLUDE_DIRECTORIES})
1041 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -fno-strict-aliasing -Wextra")
1042
1043 add_library(eglapp STATIC
1044 eglapp.c
1045 )
1046+
1047+add_library(exampleserverconfig STATIC
1048+ server_configuration.cpp
1049+)
1050+
1051 target_link_libraries(eglapp
1052 mirclient
1053 ${EGL_LIBRARIES}
1054@@ -121,35 +123,13 @@
1055 ${Boost_LIBRARIES}
1056 )
1057
1058-add_executable(mir_demo_standalone_render_overlays
1059- render_overlays.cpp
1060-)
1061-
1062-target_link_libraries(mir_demo_standalone_render_overlays
1063- mirserver
1064- mirtestdraw
1065- mircommon
1066-)
1067-
1068-set(RENDER_SURFACES_SOURCES
1069- render_surfaces.cpp
1070- buffer_render_target.cpp
1071- image_renderer.cpp
1072- server_configuration.cpp
1073-)
1074-add_executable(mir_demo_standalone_render_surfaces ${RENDER_SURFACES_SOURCES})
1075-target_link_libraries(mir_demo_standalone_render_surfaces
1076- mirserver
1077- ${Boost_LIBRARIES}
1078-)
1079-
1080 add_executable(mir_demo_standalone_input_filter
1081 demo_input_filter.cpp
1082- server_configuration.cpp
1083 )
1084
1085 target_link_libraries(mir_demo_standalone_input_filter
1086 mirserver
1087+ exampleserverconfig
1088 )
1089
1090 set (INSTALL_DEMOS
1091@@ -159,6 +139,7 @@
1092 mir_demo_client_eglflash
1093 mir_demo_client_egltriangle
1094 mir_demo_client_eglplasma
1095+ mir_demo_client_eglcounter
1096 mir_demo_client_fingerpaint
1097 mir_demo_client_multiwin
1098 mir_demo_client_display_config
1099@@ -166,23 +147,18 @@
1100 mir_demo_client_prompt_session
1101 mir_demo_standalone_input_filter
1102 mir_demo_standalone_render_to_fb
1103- mir_demo_standalone_render_surfaces
1104 )
1105
1106-add_subdirectory(demo-inprocess-surface-client)
1107-add_subdirectory(demo-shell)
1108-add_subdirectory(testdraw)
1109-
1110 install(TARGETS ${INSTALL_DEMOS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
1111
1112 add_executable(mir_demo_server_basic
1113 basic_server.cpp
1114 basic_server_configuration.cpp
1115- server_configuration.cpp
1116 )
1117
1118 target_link_libraries(mir_demo_server_basic
1119 mirserver
1120+ exampleserverconfig
1121 ${Boost_LIBRARIES}
1122 )
1123
1124@@ -201,14 +177,30 @@
1125 translucent_server_configuration.cpp
1126 pixel_format_selector.cpp
1127 basic_server_configuration.cpp
1128- server_configuration.cpp
1129 )
1130
1131 target_link_libraries(mir_demo_server_translucent
1132 mirserver
1133+ exampleserverconfig
1134 ${Boost_LIBRARIES}
1135 )
1136
1137 install(TARGETS mir_demo_server_translucent
1138 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1139 )
1140+
1141+add_executable(mir_demo_standalone_render_overlays
1142+ render_overlays.cpp
1143+)
1144+
1145+target_link_libraries(mir_demo_standalone_render_overlays
1146+ mirserver
1147+ mirtestdraw
1148+ mircommon
1149+)
1150+
1151+install(TARGETS mir_demo_standalone_render_overlays
1152+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1153+)
1154+
1155+add_subdirectory(testdraw/)
1156
1157=== modified file 'examples/basic_server_configuration.cpp'
1158--- examples/basic_server_configuration.cpp 2014-03-06 06:05:17 +0000
1159+++ examples/basic_server_configuration.cpp 2014-10-10 13:43:10 +0000
1160@@ -20,7 +20,6 @@
1161 #include "mir/options/default_configuration.h"
1162
1163 #include "mir/abnormal_exit.h"
1164-#include "mir/frontend/connector.h"
1165 #include "mir/options/option.h"
1166
1167 #include <cstdlib>
1168@@ -54,9 +53,6 @@
1169 {
1170 if (the_options()->is_set(launch_child_opt))
1171 {
1172- char buffer[128] = {0};
1173- sprintf(buffer, "fd://%d", the_connector()->client_socket_fd());
1174- setenv("MIR_SOCKET", buffer, 1);
1175 auto ignore = std::system((the_options()->get<std::string>(launch_child_opt) + "&").c_str());
1176 (void)ignore;
1177 }
1178
1179=== modified file 'examples/demo_input_filter.cpp'
1180--- examples/demo_input_filter.cpp 2014-03-06 06:05:17 +0000
1181+++ examples/demo_input_filter.cpp 2014-10-10 13:43:10 +0000
1182@@ -84,7 +84,6 @@
1183 }
1184
1185
1186-#include <std/MirLog.h>
1187 void my_write_to_log(int /*prio*/, char const* buffer)
1188 {
1189 printf("%s\n", buffer);
1190@@ -94,7 +93,6 @@
1191 try
1192 {
1193 DemoServerConfiguration config(argc, argv);
1194- mir::write_to_log = my_write_to_log;
1195
1196 mir::run_mir(config, [](mir::DisplayServer&) {/* empty init */});
1197 return 0;
1198
1199=== modified file 'examples/eglapp.c'
1200--- examples/eglapp.c 2014-07-08 16:27:24 +0000
1201+++ examples/eglapp.c 2014-10-10 13:43:10 +0000
1202@@ -70,12 +70,6 @@
1203
1204 void mir_eglapp_swap_buffers(void)
1205 {
1206- static time_t lasttime = 0;
1207- static int lastcount = 0;
1208- static int count = 0;
1209- time_t now = time(NULL);
1210- time_t dtime;
1211- int dcount;
1212 EGLint width, height;
1213
1214 if (!running)
1215@@ -83,16 +77,6 @@
1216
1217 eglSwapBuffers(egldisplay, eglsurface);
1218
1219- count++;
1220- dcount = count - lastcount;
1221- dtime = now - lasttime;
1222- if (dtime)
1223- {
1224- printf("%d FPS\n", dcount);
1225- lasttime = now;
1226- lastcount = count;
1227- }
1228-
1229 /*
1230 * Querying the surface (actually the current buffer) dimensions here is
1231 * the only truly safe way to be sure that the dimensions we think we
1232@@ -404,6 +388,7 @@
1233
1234 signal(SIGINT, shutdown);
1235 signal(SIGTERM, shutdown);
1236+ signal(SIGHUP, shutdown);
1237
1238 *width = surfaceparm.width;
1239 *height = surfaceparm.height;
1240
1241=== modified file 'examples/fingerpaint.c'
1242--- examples/fingerpaint.c 2014-07-21 03:35:31 +0000
1243+++ examples/fingerpaint.c 2014-10-10 13:43:10 +0000
1244@@ -403,6 +403,7 @@
1245 {
1246 signal(SIGINT, shutdown);
1247 signal(SIGTERM, shutdown);
1248+ signal(SIGHUP, shutdown);
1249
1250 clear_region(&canvas, &background);
1251 redraw(surf, &canvas);
1252
1253=== modified file 'examples/flicker.c'
1254--- examples/flicker.c 2014-03-06 06:05:17 +0000
1255+++ examples/flicker.c 2014-10-10 13:43:10 +0000
1256@@ -156,10 +156,6 @@
1257 uint32_t pattern[2] = {0};
1258 fill_pattern(pattern, pixel_format);
1259
1260- time_t lasttime = 0;
1261- int lastcount = 0;
1262- int count = 0;
1263-
1264 MirGraphicsRegion graphics_region;
1265 int i=0;
1266 while (1)
1267@@ -168,15 +164,6 @@
1268 i++;
1269 render_pattern(&graphics_region, pattern[i & 1]);
1270 mir_surface_swap_buffers_sync(surface);
1271-
1272- count++;
1273- time_t now = time(NULL);
1274- if (now != lasttime)
1275- {
1276- printf("%d FPS\n", count - lastcount);
1277- lasttime = now;
1278- lastcount = count;
1279- }
1280 }
1281
1282 mir_surface_release_sync(surface);
1283
1284=== modified file 'examples/multiwin.c'
1285--- examples/multiwin.c 2014-07-11 03:33:03 +0000
1286+++ examples/multiwin.c 2014-10-10 13:43:10 +0000
1287@@ -218,6 +218,7 @@
1288
1289 signal(SIGINT, shutdown);
1290 signal(SIGTERM, shutdown);
1291+ signal(SIGHUP, shutdown);
1292
1293 while (running)
1294 {
1295
1296=== modified file 'examples/pixel_format_selector.cpp'
1297--- examples/pixel_format_selector.cpp 2014-03-26 05:48:59 +0000
1298+++ examples/pixel_format_selector.cpp 2014-10-10 13:43:10 +0000
1299@@ -19,11 +19,18 @@
1300 #include "pixel_format_selector.h"
1301
1302 #include "mir/graphics/display_configuration.h"
1303-#include "mir/graphics/pixel_format_utils.h"
1304
1305 #include <stdexcept>
1306 #include <algorithm>
1307
1308+namespace
1309+{
1310+bool contains_alpha(MirPixelFormat format)
1311+{
1312+ return (format == mir_pixel_format_abgr_8888 ||
1313+ format == mir_pixel_format_argb_8888);
1314+}
1315+}
1316
1317 namespace mir
1318 {
1319@@ -48,7 +55,7 @@
1320 conf_output.pixel_formats.end(),
1321 [&](MirPixelFormat format) -> bool
1322 {
1323- return graphics::contains_alpha(format) == with_alpha;
1324+ return contains_alpha(format) == with_alpha;
1325 }
1326 );
1327
1328
1329=== modified file 'examples/progressbar.c'
1330--- examples/progressbar.c 2014-03-06 06:05:17 +0000
1331+++ examples/progressbar.c 2014-10-10 13:43:10 +0000
1332@@ -268,6 +268,7 @@
1333
1334 signal(SIGINT, shutdown);
1335 signal(SIGTERM, shutdown);
1336+ signal(SIGHUP, shutdown);
1337
1338 while (running)
1339 {
1340
1341=== modified file 'examples/render_overlays.cpp'
1342--- examples/render_overlays.cpp 2014-07-09 07:54:29 +0000
1343+++ examples/render_overlays.cpp 2014-10-10 13:43:10 +0000
1344@@ -115,11 +115,6 @@
1345 return client->last_rendered();
1346 }
1347
1348- bool alpha_enabled() const override
1349- {
1350- return false;
1351- }
1352-
1353 geom::Rectangle screen_position() const override
1354 {
1355 return position;
1356
1357=== modified file 'examples/testdraw/mesa_graphics_region_factory.cpp'
1358--- examples/testdraw/mesa_graphics_region_factory.cpp 2014-07-22 13:42:01 +0000
1359+++ examples/testdraw/mesa_graphics_region_factory.cpp 2014-10-10 13:43:10 +0000
1360@@ -16,7 +16,7 @@
1361 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
1362 */
1363
1364-#include "examples/testdraw/graphics_region_factory.h"
1365+#include "graphics_region_factory.h"
1366 #include <boost/throw_exception.hpp>
1367 #include <stdexcept>
1368
1369
1370=== renamed directory 'include/shared' => 'include/common'
1371=== modified file 'include/common/mir/geometry/rectangle.h'
1372--- include/shared/mir/geometry/rectangle.h 2014-07-21 03:35:31 +0000
1373+++ include/common/mir/geometry/rectangle.h 2014-10-10 13:43:10 +0000
1374@@ -20,7 +20,7 @@
1375 #ifndef MIR_GEOMETRY_RECTANGLE_H_
1376 #define MIR_GEOMETRY_RECTANGLE_H_
1377
1378-#include "point.h"
1379+#include "mir/geometry/point.h"
1380 #include "size.h"
1381
1382 #include <iosfwd>
1383
1384=== modified file 'include/common/mir/geometry/rectangles.h'
1385--- include/shared/mir/geometry/rectangles.h 2013-08-28 03:41:48 +0000
1386+++ include/common/mir/geometry/rectangles.h 2014-10-10 13:43:10 +0000
1387@@ -14,13 +14,16 @@
1388 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1389 *
1390 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
1391+ *
1392+ * XXX This header is only used externally in one location in QtMir. It could
1393+ * possibly be made private with only minor changes.
1394 */
1395
1396 #ifndef MIR_GEOMETRY_RECTANGLES_H_
1397 #define MIR_GEOMETRY_RECTANGLES_H_
1398
1399-#include "point.h"
1400-#include "rectangle.h"
1401+#include "mir/geometry/point.h"
1402+#include "mir/geometry/rectangle.h"
1403
1404 #include <vector>
1405 #include <initializer_list>
1406
1407=== modified file 'include/common/mir/geometry/size.h'
1408--- include/shared/mir/geometry/size.h 2014-03-06 06:05:17 +0000
1409+++ include/common/mir/geometry/size.h 2014-10-10 13:43:10 +0000
1410@@ -19,7 +19,7 @@
1411 #ifndef MIR_GEOMETRY_SIZE_H_
1412 #define MIR_GEOMETRY_SIZE_H_
1413
1414-#include "dimensions.h"
1415+#include "mir/geometry/dimensions.h"
1416 #include <iosfwd>
1417
1418 namespace mir
1419
1420=== added directory 'include/common/mir/time'
1421=== renamed file 'include/server/mir/time/clock.h' => 'include/common/mir/time/clock.h'
1422--- include/server/mir/time/clock.h 2014-03-06 06:05:17 +0000
1423+++ include/common/mir/time/clock.h 2014-10-10 13:43:10 +0000
1424@@ -2,15 +2,15 @@
1425 * Copyright © 2012 Canonical Ltd.
1426 *
1427 * This program is free software: you can redistribute it and/or modify it
1428- * under the terms of the GNU General Public License version 3,
1429+ * under the terms of the GNU Lesser General Public License version 3,
1430 * as published by the Free Software Foundation.
1431 *
1432 * This program is distributed in the hope that it will be useful,
1433 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1434 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1435- * GNU General Public License for more details.
1436+ * GNU Lesser General Public License for more details.
1437 *
1438- * You should have received a copy of the GNU General Public License
1439+ * You should have received a copy of the GNU Lesser General Public License
1440 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1441 *
1442 * Authored by: Thomas Voss <thomas.voss@canonical.com>
1443@@ -27,6 +27,7 @@
1444 {
1445
1446 typedef std::chrono::high_resolution_clock::time_point Timestamp;
1447+typedef std::chrono::high_resolution_clock::duration Duration;
1448
1449 class Clock
1450 {
1451
1452=== modified file 'include/platform/mir/graphics/display_configuration.h'
1453--- include/platform/mir/graphics/display_configuration.h 2014-06-02 17:07:02 +0000
1454+++ include/platform/mir/graphics/display_configuration.h 2014-10-10 13:43:10 +0000
1455@@ -23,7 +23,6 @@
1456 #include "mir/geometry/size.h"
1457 #include "mir/geometry/rectangle.h"
1458 #include "mir/geometry/point.h"
1459-#include "mir/graphics/pixel_format_utils.h"
1460 #include "mir_toolkit/common.h"
1461
1462 #include <functional>
1463
1464=== modified file 'include/platform/mir/graphics/native_platform.h'
1465--- include/platform/mir/graphics/native_platform.h 2014-06-16 23:37:57 +0000
1466+++ include/platform/mir/graphics/native_platform.h 2014-10-10 13:43:10 +0000
1467@@ -19,6 +19,7 @@
1468 #define MIR_GRAPHICS_NATIVE_PLATFORM_H_
1469
1470 #include "mir/graphics/platform.h"
1471+#include "mir/graphics/platform_ipc_operations.h"
1472 #include <memory>
1473 #include <functional>
1474
1475@@ -34,8 +35,9 @@
1476 class BufferInitializer;
1477 class PlatformIPCPackage;
1478 class InternalClient;
1479-class BufferIPCPacker;
1480+class BufferIpcMessage;
1481 class Buffer;
1482+class BufferWriter;
1483 class DisplayReport;
1484 class NestedContext;
1485
1486@@ -49,15 +51,17 @@
1487 virtual std::shared_ptr<GraphicBufferAllocator> create_buffer_allocator(
1488 std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0;
1489
1490- virtual std::shared_ptr<PlatformIPCPackage> get_ipc_package() = 0;
1491+ virtual std::shared_ptr<PlatformIPCPackage> connection_ipc_package() = 0;
1492
1493 virtual std::shared_ptr<InternalClient> create_internal_client() = 0;
1494
1495 virtual void fill_buffer_package(
1496- BufferIPCPacker* packer,
1497+ BufferIpcMessage* message,
1498 Buffer const* buffer,
1499 BufferIpcMsgType msg_type) const = 0;
1500
1501+ virtual std::shared_ptr<BufferWriter> make_buffer_writer() = 0;
1502+
1503 virtual ~NativePlatform() = default;
1504 NativePlatform(NativePlatform const&) = delete;
1505 NativePlatform& operator=(NativePlatform const&) = delete;
1506
1507=== modified file 'include/platform/mir/graphics/platform.h'
1508--- include/platform/mir/graphics/platform.h 2014-06-19 15:44:20 +0000
1509+++ include/platform/mir/graphics/platform.h 2014-10-10 13:43:10 +0000
1510@@ -42,10 +42,8 @@
1511 /// the graphics environment.
1512 namespace graphics
1513 {
1514-class BufferIPCPacker;
1515 class Buffer;
1516 class Display;
1517-struct PlatformIPCPackage;
1518 class BufferInitializer;
1519 class InternalClient;
1520 class DisplayReport;
1521@@ -53,12 +51,9 @@
1522 class GraphicBufferAllocator;
1523 class GLConfig;
1524 class GLProgramFactory;
1525+class PlatformIpcOperations;
1526+class BufferWriter;
1527
1528-enum class BufferIpcMsgType
1529-{
1530- full_msg, //pack the full ipc representation of the buffer
1531- update_msg //assume the client has a full representation, and pack only updates to the buffer
1532-};
1533 /**
1534 * \defgroup platform_enablement Mir platform enablement
1535 *
1536@@ -86,6 +81,8 @@
1537
1538 virtual std::shared_ptr<GraphicBufferAllocator> create_buffer_allocator(
1539 std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0;
1540+
1541+ virtual std::shared_ptr<BufferWriter> make_buffer_writer() = 0;
1542
1543 /**
1544 * Creates the display subsystem.
1545@@ -96,28 +93,10 @@
1546 std::shared_ptr<GLConfig> const& gl_config) = 0;
1547
1548 /**
1549- * Gets the IPC package for the platform.
1550- *
1551- * The IPC package will be sent to clients when they connect.
1552- */
1553- virtual std::shared_ptr<PlatformIPCPackage> get_ipc_package() = 0;
1554-
1555- /**
1556- * Arranges the IPC package for a buffer that is to be sent through
1557- * the frontend. This should be called every time a buffer is to be
1558- * sent cross-process.
1559- *
1560- * The Buffer IPC package will be sent to clients when receiving a buffer.
1561- * The implementation must use the provided packer object to perform the packing.
1562- *
1563- * \param [in] packer the object providing the packing functionality
1564- * \param [in] buffer the buffer to fill the IPC package for
1565- * \param [in] ipc_type what sort of ipc message is needed
1566- */
1567- virtual void fill_buffer_package(
1568- BufferIPCPacker* packer,
1569- Buffer const* buffer,
1570- BufferIpcMsgType msg_type) const = 0;
1571+ * Creates an object capable of doing platform specific processing of buffers
1572+ * before they are sent or after they are recieved accross IPC
1573+ */
1574+ virtual std::shared_ptr<PlatformIpcOperations> make_ipc_operations() const = 0;
1575
1576 /**
1577 * Creates the in-process client support object.
1578
1579=== added file 'include/platform/mir/graphics/platform_ipc_operations.h'
1580--- include/platform/mir/graphics/platform_ipc_operations.h 1970-01-01 00:00:00 +0000
1581+++ include/platform/mir/graphics/platform_ipc_operations.h 2014-10-10 13:43:10 +0000
1582@@ -0,0 +1,81 @@
1583+/*
1584+ * Copyright © 2014 Canonical Ltd.
1585+ *
1586+ * This program is free software: you can redistribute it and/or modify it
1587+ * under the terms of the GNU Lesser General Public License version 3,
1588+ * as published by the Free Software Foundation.
1589+ *
1590+ * This program is distributed in the hope that it will be useful,
1591+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1592+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1593+ * GNU Lesser General Public License for more details.
1594+ *
1595+ * You should have received a copy of the GNU Lesser General Public License
1596+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1597+ *
1598+ * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
1599+ */
1600+
1601+#ifndef MIR_GRAPHICS_PLATFORM_IPC_OPERATIONS_H_
1602+#define MIR_GRAPHICS_PLATFORM_IPC_OPERATIONS_H_
1603+
1604+#include <memory>
1605+
1606+namespace mir
1607+{
1608+namespace graphics
1609+{
1610+enum class BufferIpcMsgType
1611+{
1612+ full_msg, //pack the full ipc representation of the buffer
1613+ update_msg //assume the client has a full representation, and pack only updates to the buffer
1614+};
1615+class Buffer;
1616+class BufferIpcMessage;
1617+struct PlatformIPCPackage;
1618+
1619+class PlatformIpcOperations
1620+{
1621+public:
1622+ virtual ~PlatformIpcOperations() = default;
1623+ /**
1624+ * Arranges the IPC package for a buffer that is to be sent through
1625+ * the frontend from server to client. This should be called every
1626+ * time a buffer is to be sent cross-process.
1627+ *
1628+ * Pack the platform specific contents of Buffer into BufferIpcMessage for sending to the client
1629+ *
1630+ * \param [in] message the message that will be sent
1631+ * \param [in] buffer the buffer to be put in the message
1632+ * \param [in] ipc_type what sort of ipc message is needed
1633+ */
1634+ virtual void pack_buffer(BufferIpcMessage& message, Buffer const& buffer, BufferIpcMsgType msg_type) const = 0;
1635+
1636+ /**
1637+ * Arranges the IPC package for a buffer that was sent over IPC
1638+ * client to server. This must be called every time a buffer is
1639+ * received, as some platform specific processing has to be done on
1640+ * the incoming buffer.
1641+ * \param [in] message the message that was sent to the server
1642+ * \param [in] buffer the buffer associated with the message
1643+ */
1644+ virtual void unpack_buffer(BufferIpcMessage& message, Buffer const& buffer) const = 0;
1645+
1646+ /**
1647+ * Gets the connection package for the platform.
1648+ *
1649+ * The IPC package will be sent to clients when they connect.
1650+ */
1651+ virtual std::shared_ptr<PlatformIPCPackage> connection_ipc_package() = 0;
1652+
1653+protected:
1654+ PlatformIpcOperations() = default;
1655+ PlatformIpcOperations(PlatformIpcOperations const&) = delete;
1656+ PlatformIpcOperations& operator=(PlatformIpcOperations const&) = delete;
1657+
1658+};
1659+
1660+}
1661+}
1662+
1663+#endif /* MIR_GRAPHICS_BUFFER_IPC_PACKER_H_ */
1664
1665=== modified file 'include/platform/mir/graphics/renderable.h'
1666--- include/platform/mir/graphics/renderable.h 2014-07-09 07:54:29 +0000
1667+++ include/platform/mir/graphics/renderable.h 2014-10-10 13:43:10 +0000
1668@@ -48,7 +48,6 @@
1669 */
1670 virtual std::shared_ptr<Buffer> buffer() const = 0;
1671
1672- virtual bool alpha_enabled() const = 0;
1673 virtual geometry::Rectangle screen_position() const = 0;
1674
1675 // These are from the old CompositingCriteria. There is a little bit
1676
1677=== modified file 'include/platform/mir/options/configuration.h'
1678--- include/platform/mir/options/configuration.h 2014-08-08 17:06:49 +0000
1679+++ include/platform/mir/options/configuration.h 2014-10-10 13:43:10 +0000
1680@@ -19,7 +19,7 @@
1681 #ifndef MIR_OPTIONS_CONFIGURATION_H_
1682 #define MIR_OPTIONS_CONFIGURATION_H_
1683
1684-#include "mir/options/program_option.h"
1685+#include "mir/options/option.h"
1686
1687 #include <memory>
1688
1689@@ -41,6 +41,7 @@
1690 extern char const* const input_report_opt;
1691 extern char const* const host_socket_opt;
1692 extern char const* const frontend_threads_opt;
1693+extern char const* const touchspots_opt;
1694 extern char const* const fatal_abort_opt;
1695
1696 extern char const* const name_opt;
1697
1698=== modified file 'include/platform/mir/options/default_configuration.h'
1699--- include/platform/mir/options/default_configuration.h 2014-08-08 17:03:03 +0000
1700+++ include/platform/mir/options/default_configuration.h 2014-10-10 13:43:10 +0000
1701@@ -20,7 +20,8 @@
1702 #define MIR_OPTIONS_DEFAULT_CONFIGURATION_H_
1703
1704 #include "mir/options/configuration.h"
1705-
1706+#include "mir/options/program_option.h"
1707+#include <boost/program_options/options_description.hpp>
1708
1709 namespace mir
1710 {
1711
1712=== modified file 'include/platform/mir/options/program_option.h'
1713--- include/platform/mir/options/program_option.h 2014-08-08 17:03:03 +0000
1714+++ include/platform/mir/options/program_option.h 2014-10-10 13:43:10 +0000
1715@@ -20,7 +20,7 @@
1716 #ifndef MIR_OPTIONS_PROGRAM_OPTION_H_
1717 #define MIR_OPTIONS_PROGRAM_OPTION_H_
1718
1719-#include "option.h"
1720+#include "mir/options/option.h"
1721
1722 #include <boost/program_options/variables_map.hpp>
1723 #include <boost/program_options/options_description.hpp>
1724
1725=== removed directory 'include/platform/mir/udev'
1726=== modified file 'include/server/mir/compositor/scene_element.h'
1727--- include/server/mir/compositor/scene_element.h 2014-06-20 17:57:16 +0000
1728+++ include/server/mir/compositor/scene_element.h 2014-10-10 13:43:10 +0000
1729@@ -19,7 +19,7 @@
1730 #ifndef MIR_COMPOSITOR_SCENE_ELEMENT_H_
1731 #define MIR_COMPOSITOR_SCENE_ELEMENT_H_
1732
1733-#include "compositor_id.h"
1734+#include "mir/compositor/compositor_id.h"
1735 #include <memory>
1736
1737 namespace mir
1738@@ -39,6 +39,10 @@
1739 virtual std::shared_ptr<graphics::Renderable> renderable() const = 0;
1740 virtual void rendered_in(CompositorID cid) = 0;
1741 virtual void occluded_in(CompositorID cid) = 0;
1742+
1743+ // Query whether the SceneElement represents a window-surface, which at the discretion of the compositor
1744+ // may be eligible for window decoration.
1745+ virtual bool is_a_surface() const = 0;
1746
1747 protected:
1748 SceneElement() = default;
1749
1750=== modified file 'include/server/mir/default_server_configuration.h'
1751--- include/server/mir/default_server_configuration.h 2014-08-08 17:06:49 +0000
1752+++ include/server/mir/default_server_configuration.h 2014-10-10 13:43:10 +0000
1753@@ -105,6 +105,7 @@
1754 class BufferInitializer;
1755 class DisplayReport;
1756 class GraphicBufferAllocator;
1757+class BufferWriter;
1758 class Cursor;
1759 class CursorImage;
1760 class GLConfig;
1761@@ -114,7 +115,7 @@
1762 namespace input
1763 {
1764 class InputReport;
1765-class InputTargets;
1766+class Scene;
1767 class InputManager;
1768 class CompositeEventFilter;
1769 class InputChannelFactory;
1770@@ -214,6 +215,7 @@
1771 * dependencies of compositor on the rest of the Mir
1772 * @{ */
1773 virtual std::shared_ptr<graphics::GraphicBufferAllocator> the_buffer_allocator();
1774+ virtual std::shared_ptr<graphics::BufferWriter> the_buffer_writer();
1775 virtual std::shared_ptr<compositor::Scene> the_scene();
1776 virtual std::shared_ptr<compositor::FrameDroppingPolicyFactory> the_frame_dropping_policy_factory();
1777 /** @} */
1778@@ -291,7 +293,7 @@
1779 virtual std::shared_ptr<input::InputReport> the_input_report();
1780 virtual std::shared_ptr<input::CompositeEventFilter> the_composite_event_filter();
1781 virtual std::shared_ptr<shell::InputTargeter> the_input_targeter();
1782- virtual std::shared_ptr<input::InputTargets> the_input_targets();
1783+ virtual std::shared_ptr<input::Scene> the_input_scene();
1784 virtual std::shared_ptr<input::CursorListener> the_cursor_listener();
1785 virtual std::shared_ptr<input::TouchVisualizer> the_touch_visualizer();
1786 virtual std::shared_ptr<input::InputRegion> the_input_region();
1787@@ -359,6 +361,7 @@
1788 CachedPtr<graphics::NativePlatform> graphics_native_platform;
1789 CachedPtr<graphics::BufferInitializer> buffer_initializer;
1790 CachedPtr<graphics::GraphicBufferAllocator> buffer_allocator;
1791+ CachedPtr<graphics::BufferWriter> buffer_writer;
1792 CachedPtr<graphics::Display> display;
1793 CachedPtr<graphics::Cursor> cursor;
1794 CachedPtr<graphics::CursorImage> default_cursor_image;
1795
1796=== modified file 'include/server/mir/frontend/session_mediator_report.h'
1797--- include/server/mir/frontend/session_mediator_report.h 2014-07-21 03:35:31 +0000
1798+++ include/server/mir/frontend/session_mediator_report.h 2014-10-10 13:43:10 +0000
1799@@ -40,6 +40,8 @@
1800
1801 virtual void session_next_buffer_called(std::string const& app_name) = 0;
1802
1803+ virtual void session_exchange_buffer_called(std::string const& app_name) = 0;
1804+
1805 virtual void session_release_surface_called(std::string const& app_name) = 0;
1806
1807 virtual void session_disconnect_called(std::string const& app_name) = 0;
1808
1809=== removed directory 'include/server/mir/graphics'
1810=== removed directory 'include/server/mir/input/android'
1811=== modified file 'include/server/mir/input/cursor_listener.h'
1812--- include/server/mir/input/cursor_listener.h 2013-04-30 20:44:31 +0000
1813+++ include/server/mir/input/cursor_listener.h 2014-10-10 13:43:10 +0000
1814@@ -35,8 +35,8 @@
1815
1816 protected:
1817 CursorListener() = default;
1818- CursorListener(const CursorListener&) = delete;
1819- CursorListener& operator=(const CursorListener&) = delete;
1820+ CursorListener(CursorListener const&) = delete;
1821+ CursorListener& operator=(CursorListener const&) = delete;
1822 };
1823
1824 }
1825
1826=== modified file 'include/server/mir/input/touch_visualizer.h'
1827--- include/server/mir/input/touch_visualizer.h 2014-08-08 17:01:17 +0000
1828+++ include/server/mir/input/touch_visualizer.h 2014-10-10 13:43:10 +0000
1829@@ -39,11 +39,15 @@
1830 {
1831 geometry::Point touch_location;
1832
1833- // If pressure is non-zero, it indicates a press at the spot, as
1834- // opposed to a hover.
1835+ // If pressure is zero, the touch-point can be interpreted as a hover.
1836 float pressure;
1837 };
1838
1839+ // Toggle visualization of touches
1840+ virtual void enable() = 0;
1841+ virtual void disable() = 0;
1842+
1843+ // Visualize a given set of touches statelessly.
1844 virtual void visualize_touches(std::vector<Spot> const& touches) = 0;
1845
1846 protected:
1847
1848=== removed directory 'include/server/mir/logging'
1849=== removed directory 'include/server/mir/report'
1850=== removed directory 'include/server/mir/report/logging'
1851=== modified file 'include/server/mir/scene/observer.h'
1852--- include/server/mir/scene/observer.h 2014-06-02 17:07:02 +0000
1853+++ include/server/mir/scene/observer.h 2014-10-10 13:43:10 +0000
1854@@ -36,6 +36,10 @@
1855 virtual void surface_added(Surface* surface) = 0;
1856 virtual void surface_removed(Surface* surface) = 0;
1857 virtual void surfaces_reordered() = 0;
1858+
1859+ // Used to indicate the scene has changed in some way beyond the present surfaces
1860+ // and will require full recomposition.
1861+ virtual void scene_changed() = 0;
1862
1863 // Called at observer registration to notify of already existing surfaces.
1864 virtual void surface_exists(Surface* surface) = 0;
1865
1866=== removed directory 'include/server/mir/thread'
1867=== removed file 'include/server/mir/thread/basic_thread_pool.h'
1868--- include/server/mir/thread/basic_thread_pool.h 2014-09-09 18:14:19 +0000
1869+++ include/server/mir/thread/basic_thread_pool.h 1970-01-01 00:00:00 +0000
1870@@ -1,63 +0,0 @@
1871-/*
1872- * Copyright © 2014 Canonical Ltd.
1873- *
1874- * This program is free software: you can redistribute it and/or modify it
1875- * under the terms of the GNU General Public License version 3,
1876- * as published by the Free Software Foundation.
1877- *
1878- * This program is distributed in the hope that it will be useful,
1879- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1880- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1881- * GNU General Public License for more details.
1882- *
1883- * You should have received a copy of the GNU General Public License
1884- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1885- *
1886- * Authored by: Alberto Aguirre <alberto.aguirre@canonical.com>
1887- */
1888-
1889-#ifndef MIR_THREAD_BASIC_THREAD_POOL_H_
1890-#define MIR_THREAD_BASIC_THREAD_POOL_H_
1891-
1892-#include <functional>
1893-#include <future>
1894-#include <vector>
1895-#include <memory>
1896-#include <mutex>
1897-
1898-namespace mir
1899-{
1900-namespace thread
1901-{
1902-
1903-class WorkerThread;
1904-class BasicThreadPool
1905-{
1906-public:
1907- BasicThreadPool(int min_threads);
1908- ~BasicThreadPool();
1909-
1910- std::future<void> run(std::function<void()> const& task);
1911-
1912- typedef void const* TaskId;
1913- std::future<void> run(std::function<void()> const& task, TaskId id);
1914-
1915- void shrink();
1916-
1917-private:
1918- BasicThreadPool(BasicThreadPool const&) = delete;
1919- BasicThreadPool& operator=(BasicThreadPool const&) = delete;
1920-
1921- std::future<void> run(WorkerThread* t, std::function<void()> const& task, TaskId id);
1922- WorkerThread *find_thread_by(TaskId id);
1923- WorkerThread *find_idle_thread();
1924-
1925- std::mutex mutex;
1926- int const min_threads;
1927- std::vector<std::unique_ptr<WorkerThread>> threads;
1928-};
1929-
1930-}
1931-}
1932-
1933-#endif
1934
1935=== removed directory 'include/shared/mir/frontend'
1936=== removed directory 'include/shared/mir/graphics/android'
1937=== removed directory 'include/shared/mir/input/android'
1938=== removed directory 'include/shared/mir/logging'
1939=== removed directory 'include/shared/mir/protobuf'
1940=== removed directory 'include/shared/mir/raii'
1941=== removed directory 'include/shared/mir/report'
1942=== removed directory 'include/shared/mir/report/lttng'
1943=== removed directory 'include/shared/mir/udev'
1944=== removed file 'include/test/mir_test_framework/input_testing_client_configuration.h'
1945--- include/test/mir_test_framework/input_testing_client_configuration.h 2014-05-27 10:35:07 +0000
1946+++ include/test/mir_test_framework/input_testing_client_configuration.h 1970-01-01 00:00:00 +0000
1947@@ -1,69 +0,0 @@
1948-/*
1949- * Copyright © 2013 Canonical Ltd.
1950- *
1951- * This program is free software: you can redistribute it and/or modify it
1952- * under the terms of the GNU General Public License version 3,
1953- * as published by the Free Software Foundation.
1954- *
1955- * This program is distributed in the hope that it will be useful,
1956- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1957- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1958- * GNU General Public License for more details.
1959- *
1960- * You should have received a copy of the GNU General Public License
1961- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1962- *
1963- * Authored by: Robert Carr <robert.carr@canonical.com>n
1964- */
1965-
1966-#ifndef MIR_TEST_FRAMEWORK_INPUT_TESTING_CLIENT_CONFIGURATION
1967-#define MIR_TEST_FRAMEWORK_INPUT_TESTING_CLIENT_CONFIGURATION
1968-
1969-#include "mir_test_framework/testing_client_configuration.h"
1970-#include "mir_test/barrier.h"
1971-
1972-#include <mir_toolkit/event.h>
1973-
1974-#include <gmock/gmock.h>
1975-
1976-#include <string>
1977-
1978-namespace mir { namespace test { class WaitCondition; } }
1979-namespace mir_test_framework
1980-{
1981-
1982-/// A fixture to be used with InputTestingServerConfiguration for input acceptance testing scenarios.
1983-/// By default, the client will connect and a surface will be created.
1984-/// The framework ensures the server will not send events before client is ready through CrossProcessSync.
1985-class InputTestingClientConfiguration : public TestingClientConfiguration
1986-{
1987-public:
1988- InputTestingClientConfiguration(std::string const& client_name, mir::test::Barrier& input_cb_setup_fence);
1989- virtual ~InputTestingClientConfiguration() = default;
1990-
1991- void exec();
1992-
1993- struct MockInputHandler
1994- {
1995- MOCK_METHOD1(handle_input, void(MirEvent const*));
1996- };
1997- // This function will be called at an appropriate time for input expectations to be set.
1998- // on handler. It is expected that mt::WakeUp(all_events_received) will be triggered by
1999- // the last expectation, as this is what triggers the verification of the Mock and
2000- // termination of the testing client.
2001- virtual void expect_input(MockInputHandler &handler, mir::test::WaitCondition& all_events_received) = 0;
2002-
2003- // This fixture is intended to be used with InputTestingServer
2004- // which allows for setting surface sizes as part of the
2005- // input-testing shell.
2006- static int const surface_width = 100;
2007- static int const surface_height = 100;
2008-
2009- std::string connect_string;
2010-private:
2011- std::string const client_name;
2012- mir::test::Barrier& input_cb_setup_fence;
2013-};
2014-
2015-}
2016-#endif /* MIR_TEST_FRAMEWORK_INPUT_TESTING_CLIENT_CONFIGURATION */
2017
2018=== modified file 'platform-ABI-sha1sums'
2019--- platform-ABI-sha1sums 2014-08-27 19:35:36 +0000
2020+++ platform-ABI-sha1sums 2014-10-10 13:43:10 +0000
2021@@ -1,89 +1,46 @@
2022+3329ada91412ded2f127aee9a92f065e57b81cb2 include/common/mir/cached_ptr.h
2023+82ff9499ef62739379616e02164dc98f9914c329 include/common/mir/fd.h
2024+b399dc08514751c86e23824612a52378dd9b1e23 include/common/mir/geometry/dimensions.h
2025+d954464ef2d20c2876db68c94512a443186da09b include/common/mir/geometry/point.h
2026+dc7c62d3916eec025e8e7deaf57e06077ce38928 include/common/mir/geometry/rectangle.h
2027+5161774957e3ca4f5fa4e7db025d0978d2bbef06 include/common/mir/geometry/rectangles.h
2028+42646c2367b9821e3aa71feff6e31cf50526acaa include/common/mir/geometry/size.h
2029+e1be9faee8b844ca2ce617f8fd82c9ee08d56bed include/common/mir/graphics/native_buffer.h
2030+dcf8b8982f138bdde39a241825c610e955cd5e33 include/common/mir/input/input_platform.h
2031+208cd6aed5ef5f8f39b3eb86604e4133cb840485 include/common/mir/input/input_receiver_thread.h
2032+be7d58c9fde2ce91cc66dd6144b76e08b536266b include/common/mir/int_wrapper.h
2033+48015c67ddc4998ed5a2e8bb04ff3a4bfdd6a613 include/common/mir/time/clock.h
2034+9907751d046e4aea81881cf19e5df52c7a6a813e include/common/mir_toolkit/client_types.h
2035+183d9e5e6cfe48b3d9145a28541dd4202ff6137b include/common/mir_toolkit/common.h
2036+fce4c1a9e0d037244f7e9e96ea2d8eaab4fc404c include/common/mir_toolkit/cursors.h
2037+bdaceadd56e41d2cb708f7c4da97acf84dfc75b7 include/common/mir_toolkit/event.h
2038+99ef5f3bf548508fae24c60f74be1dea018a6e8c include/common/mir_toolkit/mesa/native_display.h
2039+101017c17714a57db57d79b7b5e7df40a3568236 include/common/mir_toolkit/mir_native_buffer.h
2040 871e609c0fed0d566ddbaaa8ac2d7cd5c06dd09a include/platform/mir/abnormal_exit.h
2041-498d728ea1052cb6cadb9de7828ae48eb5a201df include/platform/mir/emergency_cleanup_registry.h
2042 8f47feb6d983aa5c9ebd58e9d1524361c9f5e651 include/platform/mir/fatal.h
2043 e9e97ba2db4c6aeb269630547bf5a558da17d896 include/platform/mir/graphics/basic_platform.h
2044 05c154bbfa81e16795c18f27000711741d5592e0 include/platform/mir/graphics/buffer_basic.h
2045 54328767ca330ba166160a486bd0688406ab0222 include/platform/mir/graphics/buffer.h
2046 5875f13f5b029a4b5291e9baec3ae434b72be27c include/platform/mir/graphics/buffer_id.h
2047-827cbc0ecbcea21dd794ab4b8119a5710bb266d3 include/platform/mir/graphics/buffer_initializer.h
2048-d7507a326f8cfcc4707c1eb28cf7b666420f92fb include/platform/mir/graphics/buffer_ipc_packer.h
2049 748f5c2aab11189aa02c4a89ab900561548e7304 include/platform/mir/graphics/buffer_properties.h
2050 ffa857f624f1c8cbd50a190107137346fc3204d6 include/platform/mir/graphics/cursor.h
2051 fe2b5f13ccd3ec6b78d90d3abbb7d88b48238578 include/platform/mir/graphics/cursor_image.h
2052 986f5d0d8ea2c6a42cc320f468e682f81fec46ae include/platform/mir/graphics/display_buffer.h
2053-4a55160c58cb4f82316ec9f5892fa99a00587963 include/platform/mir/graphics/display_configuration.h
2054+f53a0020b8f1bd4a941a201eb26271cffee0a7dd include/platform/mir/graphics/display_configuration.h
2055 6fe08da318c920b0d20ea8b8f560f5ac7ed389fe include/platform/mir/graphics/display_configuration_policy.h
2056 41ea906d208b761e3d5d5056095de9de2d4ffa17 include/platform/mir/graphics/display.h
2057-5b2618fba338ea028c27df77d05b033dd8a57818 include/platform/mir/graphics/display_report.h
2058-fc9b3cfa80a1ac57dedb4e8d180c62ae15c0ace8 include/platform/mir/graphics/drm_authenticator.h
2059-9fe4e4b1572cec5fda7660480979b13aaf37f901 include/platform/mir/graphics/egl_extensions.h
2060-17bfa016a2a9d6672bfd335a4c1b147c2ddca5b5 include/platform/mir/graphics/egl_resources.h
2061 815405c5aee8000bc18c1c9480bac620a451b416 include/platform/mir/graphics/event_handler_register.h
2062 5dc095474ef3e294c0aa4008e9ed997bdb21d34c include/platform/mir/graphics/gl_config.h
2063 d0442a5d5d88a4be6e3e1f99e433c1c43a86bfce include/platform/mir/graphics/gl_context.h
2064-b8ceb6c770340f63e0114496d4ad102d787fa6f5 include/platform/mir/graphics/gl_primitive.h
2065-06c153f3e867812a42f41d0fe288524d91d183a6 include/platform/mir/graphics/gl_program_factory.h
2066-f62525771ca2612959ff88498883630458513235 include/platform/mir/graphics/gl_program.h
2067-7e0da0260a80a1b074b994293d5808c7330638da include/platform/mir/graphics/gl_texture_cache.h
2068-6c1d54bc0a77a1e67c6beff097dc4f1527010e67 include/platform/mir/graphics/gl_texture.h
2069 979d2c1ac723ccef538d9a378228a02b0f173bd7 include/platform/mir/graphics/graphic_buffer_allocator.h
2070 f90a35371e236a6cfec8e9a8474dbb3305c7621e include/platform/mir/graphics/internal_client.h
2071 c9730cac4a3a101f9706ec6f444958abe047fd88 include/platform/mir/graphics/internal_surface.h
2072-222160aa8176a111ce05711d90a372c38591ccdb include/platform/mir/graphics/native_platform.h
2073-590572a9d86a9481b4531ad44414c6f76352fe7a include/platform/mir/graphics/nested_context.h
2074-27807b8ba288590f3749cfb32512eda4d0de6c7d include/platform/mir/graphics/overlapping_output_grouping.h
2075-32c70ee44b8dc9372dec0c54471aa8d831adcb1c include/platform/mir/graphics/pixel_format_utils.h
2076-656a7e1ae3b246930431a6174526fbdc2c76649e include/platform/mir/graphics/platform.h
2077+b4aaa941df9c0a6f9342629b26542700876f3aaa include/platform/mir/graphics/native_platform.h
2078+f47dac961f060eb29a44ed3c8c18a49a3d353bb1 include/platform/mir/graphics/platform.h
2079+1fbe488b4581486fd01e2f03e504f31b72c09040 include/platform/mir/graphics/platform_ipc_operations.h
2080 9c7712af84b6fde1970ff802ad2ea78f892c7b7e include/platform/mir/graphics/platform_ipc_package.h
2081-15f201741a465de33e55ffc1ea775b507a5be950 include/platform/mir/graphics/renderable.h
2082-4b640ec72b04cc2de7671afd7c78942fb9e775a7 include/platform/mir/graphics/tessellation_helpers.h
2083-8f172d1449f9aa7bbcb1eebb463b0cab4cab38fe include/platform/mir/options/configuration.h
2084-3a961c5e85b0b9d20eadddd938677776288c06c6 include/platform/mir/options/default_configuration.h
2085+84c063346b3bd51b4624d9f940008d4c3f8be066 include/platform/mir/graphics/renderable.h
2086+f5746dab3336266cfd410ce4e4d01333df6e5b99 include/platform/mir/options/configuration.h
2087+47007c783c174f8e94d332c4b13c6b01358b48fb include/platform/mir/options/default_configuration.h
2088 b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h
2089-1133726e66a246bd3988616e205e186278a64731 include/platform/mir/options/program_option.h
2090-5d0213652adc4821a2a180ced74808ca0bbf2c45 include/platform/mir/shared_library_loader.h
2091-6ad1f35928df9ffd917fbf17cbcdd533a8b5b27d include/shared/mir/basic_observers.h
2092-3329ada91412ded2f127aee9a92f065e57b81cb2 include/shared/mir/cached_ptr.h
2093-691278e8b89265fa7f11db78dc8a9b530cef6e99 include/shared/mir/default_configuration.h
2094-82ff9499ef62739379616e02164dc98f9914c329 include/shared/mir/fd.h
2095-15dd88e8de39d195c3a4e7c166678cd9b6951994 include/shared/mir/frontend/client_constants.h
2096-b399dc08514751c86e23824612a52378dd9b1e23 include/shared/mir/geometry/dimensions.h
2097-7031270546292995d38e6de165600db21ff51c68 include/shared/mir/geometry/displacement.h
2098-283cb0ecf9d544300681fc2ab86bec568e2d20ff include/shared/mir/geometry/forward.h
2099-bfd87d9fb800c1c1b528c00185570abac569caf2 include/shared/mir/geometry/length.h
2100-d954464ef2d20c2876db68c94512a443186da09b include/shared/mir/geometry/point.h
2101-65148c6d432950fb07589b6348afc4aab8b5079a include/shared/mir/geometry/rectangle.h
2102-1b6632a6ee0a8758201739fb16c4eb1ce196344a include/shared/mir/geometry/rectangles.h
2103-7d3ede2c85e9febc1c4951a342939e3a6dacb99e include/shared/mir/geometry/size.h
2104-76d576231de039e25f4cf30829504552dcb9fc53 include/shared/mir/graphics/android/android_driver_interpreter.h
2105-c02a1e68d5a8ccfd8710440e166c9e32bc974f1e include/shared/mir/graphics/android/android_native_buffer.h
2106-05e7b043ccf49582a78e880967b3bc1f3512e010 include/shared/mir/graphics/android/fence.h
2107-0168b68dea12355c22cd39fbfc50bca0e21fd6e5 include/shared/mir/graphics/android/mir_native_window.h
2108-8f6d9dc681f3e0d212e6a74f9170ea7b3eb2607f include/shared/mir/graphics/android/native_buffer.h
2109-424d1ff5b9bc299fc43f0afe961c4dafc3227992 include/shared/mir/graphics/android/sync_fence.h
2110-e1be9faee8b844ca2ce617f8fd82c9ee08d56bed include/shared/mir/graphics/native_buffer.h
2111-ec29bd74becf1c4f1004797e71d4e49d376dbfc8 include/shared/mir/input/android/android_input_lexicon.h
2112-dcf8b8982f138bdde39a241825c610e955cd5e33 include/shared/mir/input/input_platform.h
2113-de92c0e3f7a1cf204330cd29847e7524a3af00cd include/shared/mir/input/input_receiver_report.h
2114-208cd6aed5ef5f8f39b3eb86604e4133cb840485 include/shared/mir/input/input_receiver_thread.h
2115-3829a4722360d794658ed4db4af005c79f6504c5 include/shared/mir/input/null_input_receiver_report.h
2116-2801f1a4fa975a1d8f9388192da2408d2bb472f4 include/shared/mir/input/xkb_mapper.h
2117-be7d58c9fde2ce91cc66dd6144b76e08b536266b include/shared/mir/int_wrapper.h
2118-2319b60bf87801a93af636d3bbfbae420f6776a4 include/shared/mir/logging/dumb_console_logger.h
2119-52cb642982f7f4fa623cf041b11eca126a3df0f4 include/shared/mir/logging/input_timestamp.h
2120-72e20902d70588af73bea7a524337264b853bf0a include/shared/mir/logging/logger.h
2121-f199066a30882b22be901de0c4e6aa62e320e593 include/shared/mir/protobuf/google_protobuf_guard.h
2122-4b4b8d7ae1cd870aeec6399afd6dbd56205c80b2 include/shared/mir/raii.h
2123-bb27ec04b2861d128f420698491941f71e1aefc0 include/shared/mir/recursive_read_write_mutex.h
2124-903210453b98267e47c03ab2920c1db047ba0457 include/shared/mir/report/lttng/mir_tracepoint.h
2125-52b6b60543a361e91dbeaa2549114239f57b6b4e include/shared/mir/report/lttng/tracepoint_provider.h
2126-dc80f8a57f133276dd5a72f4d0360a7b71154d16 include/shared/mir/shared_library.h
2127-b4e96264b9a57a1f2ceceb700c5379658905ded7 include/shared/mir/thread_name.h
2128-9907751d046e4aea81881cf19e5df52c7a6a813e include/shared/mir_toolkit/client_types.h
2129-183d9e5e6cfe48b3d9145a28541dd4202ff6137b include/shared/mir_toolkit/common.h
2130-fce4c1a9e0d037244f7e9e96ea2d8eaab4fc404c include/shared/mir_toolkit/cursors.h
2131-bdaceadd56e41d2cb708f7c4da97acf84dfc75b7 include/shared/mir_toolkit/event.h
2132-99ef5f3bf548508fae24c60f74be1dea018a6e8c include/shared/mir_toolkit/mesa/native_display.h
2133-101017c17714a57db57d79b7b5e7df40a3568236 include/shared/mir_toolkit/mir_native_buffer.h
2134-9f646fa12eaca5fc3b7a8fde6208673c071c8ef3 include/shared/mir/udev/wrapper.h
2135-9fd77ab693cc4c9a200e44804f5493733528a674 include/shared/mir/variable_length_array.h
2136+3c37cc31e8b290b89c311d82f02e07d342766451 include/platform/mir/options/program_option.h
2137
2138=== added directory 'playground'
2139=== added file 'playground/CMakeLists.txt'
2140--- playground/CMakeLists.txt 1970-01-01 00:00:00 +0000
2141+++ playground/CMakeLists.txt 2014-10-10 13:43:10 +0000
2142@@ -0,0 +1,26 @@
2143+
2144+include_directories(
2145+ ${PROJECT_SOURCE_DIR}/src/include/server
2146+ ${PROJECT_SOURCE_DIR}/src/include/platform
2147+ ${PROJECT_SOURCE_DIR}/include/client
2148+ ${PROJECT_SOURCE_DIR}/include/server
2149+ ${PROJECT_SOURCE_DIR}/include/platform
2150+ ${PROJECT_SOURCE_DIR}/examples/
2151+)
2152+
2153+set(RENDER_SURFACES_SOURCES
2154+ render_surfaces.cpp
2155+ buffer_render_target.cpp
2156+ image_renderer.cpp
2157+)
2158+add_executable(mir_demo_standalone_render_surfaces ${RENDER_SURFACES_SOURCES})
2159+target_link_libraries(mir_demo_standalone_render_surfaces
2160+ mirserver
2161+ exampleserverconfig
2162+ ${Boost_LIBRARIES}
2163+)
2164+
2165+install(TARGETS mir_demo_standalone_render_surfaces RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2166+
2167+add_subdirectory(demo-shell/)
2168+add_subdirectory(demo-inprocess-surface-client/)
2169
2170=== added file 'playground/README'
2171--- playground/README 1970-01-01 00:00:00 +0000
2172+++ playground/README 2014-10-10 13:43:10 +0000
2173@@ -0,0 +1,6 @@
2174+The Playground
2175+
2176+These are mir demos that excercise private in-flux mir functionality.
2177+As such functionality matures, related headers become public and the playground
2178+code may become an example of how to use such feature.
2179+
2180
2181=== renamed file 'examples/buffer_render_target.cpp' => 'playground/buffer_render_target.cpp'
2182=== renamed file 'examples/buffer_render_target.h' => 'playground/buffer_render_target.h'
2183=== renamed directory 'examples/demo-inprocess-surface-client' => 'playground/demo-inprocess-surface-client'
2184=== modified file 'playground/demo-inprocess-surface-client/CMakeLists.txt'
2185--- examples/demo-inprocess-surface-client/CMakeLists.txt 2013-08-28 03:41:48 +0000
2186+++ playground/demo-inprocess-surface-client/CMakeLists.txt 2014-10-10 13:43:10 +0000
2187@@ -1,14 +1,12 @@
2188-include_directories(..)
2189-
2190 add_executable(mir_demo_standalone_inprocess_egl
2191 demo_inprocess_surface_client.cpp
2192 inprocess_egl_client.cpp
2193 example_egl_helper.cpp
2194- ../server_configuration.cpp
2195 )
2196
2197 target_link_libraries(mir_demo_standalone_inprocess_egl
2198 mirserver
2199 mirdraw
2200+ exampleserverconfig
2201 )
2202 # TODO Install this demo?
2203
2204=== modified file 'playground/demo-inprocess-surface-client/demo_inprocess_surface_client.cpp'
2205--- examples/demo-inprocess-surface-client/demo_inprocess_surface_client.cpp 2014-03-06 06:05:17 +0000
2206+++ playground/demo-inprocess-surface-client/demo_inprocess_surface_client.cpp 2014-10-10 13:43:10 +0000
2207@@ -19,7 +19,7 @@
2208 #include "inprocess_egl_client.h"
2209
2210 #include "mir/run_mir.h"
2211-#include "../server_configuration.h"
2212+#include "server_configuration.h"
2213
2214 #include "mir/report_exception.h"
2215
2216
2217=== renamed directory 'examples/demo-shell' => 'playground/demo-shell'
2218=== modified file 'playground/demo-shell/CMakeLists.txt'
2219--- examples/demo-shell/CMakeLists.txt 2014-08-26 14:39:46 +0000
2220+++ playground/demo-shell/CMakeLists.txt 2014-10-10 13:43:10 +0000
2221@@ -3,7 +3,6 @@
2222 demo_renderer.cpp
2223 fullscreen_placement_strategy.cpp
2224 window_manager.cpp
2225- ../server_configuration.cpp
2226 )
2227
2228 add_executable(mir_demo_server_shell
2229@@ -13,6 +12,7 @@
2230 target_link_libraries(mir_demo_server_shell
2231 demo-shell
2232 mirserver
2233+ exampleserverconfig
2234 )
2235
2236 install(TARGETS mir_demo_server_shell RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2237
2238=== modified file 'playground/demo-shell/demo_compositor.cpp'
2239--- examples/demo-shell/demo_compositor.cpp 2014-08-29 13:16:11 +0000
2240+++ playground/demo-shell/demo_compositor.cpp 2014-10-10 13:43:10 +0000
2241@@ -66,6 +66,8 @@
2242 //the elements should be notified if they are rendered or not
2243 bool nonrenderlist_elements{false};
2244 mg::RenderableList renderable_list;
2245+ std::unordered_set<mg::Renderable::ID> decoration_skip_list;
2246+
2247 auto elements = scene->scene_elements_for(this);
2248 for(auto const& it : elements)
2249 {
2250@@ -73,6 +75,9 @@
2251 auto const& view_area = display_buffer.view_area();
2252 auto embellished = renderer.would_embellish(*renderable, view_area);
2253 auto any_part_drawn = (view_area.overlaps(renderable->screen_position()) || embellished);
2254+
2255+ if (!it->is_a_surface())
2256+ decoration_skip_list.insert(renderable->id());
2257 if (renderable->visible() && any_part_drawn)
2258 {
2259 renderable_list.push_back(renderable);
2260@@ -96,7 +101,7 @@
2261 display_buffer.make_current();
2262
2263 renderer.set_rotation(display_buffer.orientation());
2264- renderer.begin();
2265+ renderer.begin(std::move(decoration_skip_list));
2266 renderer.render(renderable_list);
2267 display_buffer.post_update();
2268 renderer.end();
2269
2270=== modified file 'playground/demo-shell/demo_renderer.cpp'
2271--- examples/demo-shell/demo_renderer.cpp 2014-08-26 14:48:55 +0000
2272+++ playground/demo-shell/demo_renderer.cpp 2014-10-10 13:43:10 +0000
2273@@ -171,27 +171,29 @@
2274 glDeleteTextures(1, &titlebar_corner_tex);
2275 }
2276
2277-void DemoRenderer::begin() const
2278+void DemoRenderer::begin(std::unordered_set<graphics::Renderable::ID> decoration_skip_list_) const
2279 {
2280 bool const opaque = destination_alpha() == compositor::DestinationAlpha::opaque;
2281- if (opaque)
2282- glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
2283- else
2284- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
2285+ glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
2286
2287 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
2288 glClear(GL_COLOR_BUFFER_BIT);
2289
2290 if (opaque)
2291 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE);
2292+
2293+ decoration_skip_list = decoration_skip_list_;
2294 }
2295
2296 void DemoRenderer::tessellate(std::vector<graphics::GLPrimitive>& primitives,
2297 graphics::Renderable const& renderable) const
2298 {
2299 GLRenderer::tessellate(primitives, renderable);
2300- tessellate_shadow(primitives, renderable, shadow_radius);
2301- tessellate_frame(primitives, renderable, titlebar_height);
2302+ if (decoration_skip_list.find(renderable.id()) == decoration_skip_list.end())
2303+ {
2304+ tessellate_shadow(primitives, renderable, shadow_radius);
2305+ tessellate_frame(primitives, renderable, titlebar_height);
2306+ }
2307 }
2308
2309 void DemoRenderer::tessellate_shadow(std::vector<graphics::GLPrimitive>& primitives,
2310
2311=== modified file 'playground/demo-shell/demo_renderer.h'
2312--- examples/demo-shell/demo_renderer.h 2014-08-26 14:39:46 +0000
2313+++ playground/demo-shell/demo_renderer.h 2014-10-10 13:43:10 +0000
2314@@ -21,6 +21,8 @@
2315
2316 #include "mir/compositor/gl_renderer.h"
2317
2318+#include <unordered_set>
2319+
2320 namespace mir
2321 {
2322 namespace examples
2323@@ -37,7 +39,9 @@
2324 float const shadow_radius);
2325 ~DemoRenderer();
2326
2327- void begin() const override;
2328+ void begin() const override { GLRenderer::begin(); }
2329+ void begin(std::unordered_set<graphics::Renderable::ID> renderables_not_to_decorate) const;
2330+
2331 void tessellate(
2332 std::vector<graphics::GLPrimitive>& primitives,
2333 graphics::Renderable const& renderable) const override;
2334@@ -59,6 +63,8 @@
2335 float const corner_radius;
2336 GLuint shadow_corner_tex;
2337 GLuint titlebar_corner_tex;
2338+
2339+ mutable std::unordered_set<graphics::Renderable::ID> decoration_skip_list;
2340 };
2341
2342 } // namespace examples
2343
2344=== modified file 'playground/demo-shell/demo_shell.cpp'
2345--- examples/demo-shell/demo_shell.cpp 2014-07-23 20:59:29 +0000
2346+++ playground/demo-shell/demo_shell.cpp 2014-10-10 13:43:10 +0000
2347@@ -21,7 +21,7 @@
2348 #include "demo_compositor.h"
2349 #include "window_manager.h"
2350 #include "fullscreen_placement_strategy.h"
2351-#include "../server_configuration.h"
2352+#include "server_configuration.h"
2353
2354 #include "mir/options/default_configuration.h"
2355 #include "mir/run_mir.h"
2356
2357=== modified file 'playground/demo-shell/window_manager.cpp'
2358--- examples/demo-shell/window_manager.cpp 2014-07-21 03:35:31 +0000
2359+++ playground/demo-shell/window_manager.cpp 2014-10-10 13:43:10 +0000
2360@@ -27,7 +27,6 @@
2361 #include "mir/compositor/compositor.h"
2362
2363 #include <linux/input.h>
2364-#include <android/keycodes.h> // TODO remove this dependency
2365
2366 #include <cassert>
2367 #include <cstdlib>
2368@@ -124,6 +123,7 @@
2369 assert(compositor);
2370
2371 bool handled = false;
2372+ static int const ANDROID_KEYCODE_POWER = 26;
2373
2374 if (event.key.type == mir_event_type_key &&
2375 event.key.action == mir_key_action_down)
2376@@ -136,7 +136,7 @@
2377 }
2378 else if ((event.key.modifiers & mir_key_modifier_alt &&
2379 event.key.scan_code == KEY_P) ||
2380- (event.key.key_code == AKEYCODE_POWER))
2381+ (event.key.key_code == ANDROID_KEYCODE_POWER))
2382 {
2383 compositor->stop();
2384 auto conf = display->configuration();
2385
2386=== renamed file 'examples/image_renderer.cpp' => 'playground/image_renderer.cpp'
2387=== renamed file 'examples/image_renderer.h' => 'playground/image_renderer.h'
2388=== renamed file 'examples/render_surfaces.cpp' => 'playground/render_surfaces.cpp'
2389=== modified file 'server-ABI-sha1sums'
2390--- server-ABI-sha1sums 2014-08-27 19:35:36 +0000
2391+++ server-ABI-sha1sums 2014-10-10 13:43:10 +0000
2392@@ -1,78 +1,62 @@
2393+3329ada91412ded2f127aee9a92f065e57b81cb2 include/common/mir/cached_ptr.h
2394+82ff9499ef62739379616e02164dc98f9914c329 include/common/mir/fd.h
2395+b399dc08514751c86e23824612a52378dd9b1e23 include/common/mir/geometry/dimensions.h
2396+d954464ef2d20c2876db68c94512a443186da09b include/common/mir/geometry/point.h
2397+dc7c62d3916eec025e8e7deaf57e06077ce38928 include/common/mir/geometry/rectangle.h
2398+5161774957e3ca4f5fa4e7db025d0978d2bbef06 include/common/mir/geometry/rectangles.h
2399+42646c2367b9821e3aa71feff6e31cf50526acaa include/common/mir/geometry/size.h
2400+e1be9faee8b844ca2ce617f8fd82c9ee08d56bed include/common/mir/graphics/native_buffer.h
2401+dcf8b8982f138bdde39a241825c610e955cd5e33 include/common/mir/input/input_platform.h
2402+208cd6aed5ef5f8f39b3eb86604e4133cb840485 include/common/mir/input/input_receiver_thread.h
2403+be7d58c9fde2ce91cc66dd6144b76e08b536266b include/common/mir/int_wrapper.h
2404+48015c67ddc4998ed5a2e8bb04ff3a4bfdd6a613 include/common/mir/time/clock.h
2405+9907751d046e4aea81881cf19e5df52c7a6a813e include/common/mir_toolkit/client_types.h
2406+183d9e5e6cfe48b3d9145a28541dd4202ff6137b include/common/mir_toolkit/common.h
2407+fce4c1a9e0d037244f7e9e96ea2d8eaab4fc404c include/common/mir_toolkit/cursors.h
2408+bdaceadd56e41d2cb708f7c4da97acf84dfc75b7 include/common/mir_toolkit/event.h
2409+99ef5f3bf548508fae24c60f74be1dea018a6e8c include/common/mir_toolkit/mesa/native_display.h
2410+101017c17714a57db57d79b7b5e7df40a3568236 include/common/mir_toolkit/mir_native_buffer.h
2411 871e609c0fed0d566ddbaaa8ac2d7cd5c06dd09a include/platform/mir/abnormal_exit.h
2412-498d728ea1052cb6cadb9de7828ae48eb5a201df include/platform/mir/emergency_cleanup_registry.h
2413 8f47feb6d983aa5c9ebd58e9d1524361c9f5e651 include/platform/mir/fatal.h
2414 e9e97ba2db4c6aeb269630547bf5a558da17d896 include/platform/mir/graphics/basic_platform.h
2415 05c154bbfa81e16795c18f27000711741d5592e0 include/platform/mir/graphics/buffer_basic.h
2416 54328767ca330ba166160a486bd0688406ab0222 include/platform/mir/graphics/buffer.h
2417 5875f13f5b029a4b5291e9baec3ae434b72be27c include/platform/mir/graphics/buffer_id.h
2418-827cbc0ecbcea21dd794ab4b8119a5710bb266d3 include/platform/mir/graphics/buffer_initializer.h
2419-d7507a326f8cfcc4707c1eb28cf7b666420f92fb include/platform/mir/graphics/buffer_ipc_packer.h
2420 748f5c2aab11189aa02c4a89ab900561548e7304 include/platform/mir/graphics/buffer_properties.h
2421 ffa857f624f1c8cbd50a190107137346fc3204d6 include/platform/mir/graphics/cursor.h
2422 fe2b5f13ccd3ec6b78d90d3abbb7d88b48238578 include/platform/mir/graphics/cursor_image.h
2423 986f5d0d8ea2c6a42cc320f468e682f81fec46ae include/platform/mir/graphics/display_buffer.h
2424-4a55160c58cb4f82316ec9f5892fa99a00587963 include/platform/mir/graphics/display_configuration.h
2425+f53a0020b8f1bd4a941a201eb26271cffee0a7dd include/platform/mir/graphics/display_configuration.h
2426 6fe08da318c920b0d20ea8b8f560f5ac7ed389fe include/platform/mir/graphics/display_configuration_policy.h
2427 41ea906d208b761e3d5d5056095de9de2d4ffa17 include/platform/mir/graphics/display.h
2428-5b2618fba338ea028c27df77d05b033dd8a57818 include/platform/mir/graphics/display_report.h
2429-fc9b3cfa80a1ac57dedb4e8d180c62ae15c0ace8 include/platform/mir/graphics/drm_authenticator.h
2430-9fe4e4b1572cec5fda7660480979b13aaf37f901 include/platform/mir/graphics/egl_extensions.h
2431-17bfa016a2a9d6672bfd335a4c1b147c2ddca5b5 include/platform/mir/graphics/egl_resources.h
2432 815405c5aee8000bc18c1c9480bac620a451b416 include/platform/mir/graphics/event_handler_register.h
2433 5dc095474ef3e294c0aa4008e9ed997bdb21d34c include/platform/mir/graphics/gl_config.h
2434 d0442a5d5d88a4be6e3e1f99e433c1c43a86bfce include/platform/mir/graphics/gl_context.h
2435-b8ceb6c770340f63e0114496d4ad102d787fa6f5 include/platform/mir/graphics/gl_primitive.h
2436-06c153f3e867812a42f41d0fe288524d91d183a6 include/platform/mir/graphics/gl_program_factory.h
2437-f62525771ca2612959ff88498883630458513235 include/platform/mir/graphics/gl_program.h
2438-7e0da0260a80a1b074b994293d5808c7330638da include/platform/mir/graphics/gl_texture_cache.h
2439-6c1d54bc0a77a1e67c6beff097dc4f1527010e67 include/platform/mir/graphics/gl_texture.h
2440 979d2c1ac723ccef538d9a378228a02b0f173bd7 include/platform/mir/graphics/graphic_buffer_allocator.h
2441 f90a35371e236a6cfec8e9a8474dbb3305c7621e include/platform/mir/graphics/internal_client.h
2442 c9730cac4a3a101f9706ec6f444958abe047fd88 include/platform/mir/graphics/internal_surface.h
2443-222160aa8176a111ce05711d90a372c38591ccdb include/platform/mir/graphics/native_platform.h
2444-590572a9d86a9481b4531ad44414c6f76352fe7a include/platform/mir/graphics/nested_context.h
2445-27807b8ba288590f3749cfb32512eda4d0de6c7d include/platform/mir/graphics/overlapping_output_grouping.h
2446-32c70ee44b8dc9372dec0c54471aa8d831adcb1c include/platform/mir/graphics/pixel_format_utils.h
2447-656a7e1ae3b246930431a6174526fbdc2c76649e include/platform/mir/graphics/platform.h
2448+b4aaa941df9c0a6f9342629b26542700876f3aaa include/platform/mir/graphics/native_platform.h
2449+f47dac961f060eb29a44ed3c8c18a49a3d353bb1 include/platform/mir/graphics/platform.h
2450+1fbe488b4581486fd01e2f03e504f31b72c09040 include/platform/mir/graphics/platform_ipc_operations.h
2451 9c7712af84b6fde1970ff802ad2ea78f892c7b7e include/platform/mir/graphics/platform_ipc_package.h
2452-15f201741a465de33e55ffc1ea775b507a5be950 include/platform/mir/graphics/renderable.h
2453-4b640ec72b04cc2de7671afd7c78942fb9e775a7 include/platform/mir/graphics/tessellation_helpers.h
2454-8f172d1449f9aa7bbcb1eebb463b0cab4cab38fe include/platform/mir/options/configuration.h
2455-3a961c5e85b0b9d20eadddd938677776288c06c6 include/platform/mir/options/default_configuration.h
2456+84c063346b3bd51b4624d9f940008d4c3f8be066 include/platform/mir/graphics/renderable.h
2457+f5746dab3336266cfd410ce4e4d01333df6e5b99 include/platform/mir/options/configuration.h
2458+47007c783c174f8e94d332c4b13c6b01358b48fb include/platform/mir/options/default_configuration.h
2459 b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h
2460-1133726e66a246bd3988616e205e186278a64731 include/platform/mir/options/program_option.h
2461-5d0213652adc4821a2a180ced74808ca0bbf2c45 include/platform/mir/shared_library_loader.h
2462-505444aeb61d0f55893a7ba0998b25c2041f76c4 include/server/mir/asio_main_loop.h
2463-a4c8f0b0c30784ea6930a8ee6651f1d6efa47231 include/server/mir/compositor/buffer_stream.h
2464+3c37cc31e8b290b89c311d82f02e07d342766451 include/platform/mir/options/program_option.h
2465 f4030e400baf8baa9c38e7c6ec6b4a5ad7134aeb include/server/mir/compositor/compositor.h
2466 a9f284ba4b05d58fd3eeb628d1f56fe4ac188526 include/server/mir/compositor/compositor_id.h
2467-a3e8658107c0c13d41eaf2ca6a1be71d1dc59df6 include/server/mir/compositor/compositor_report.h
2468-eebcdfaf8894b387d1a5acd22c2f1bc09b3c2b95 include/server/mir/compositor/destination_alpha.h
2469-98fe6bde01fb8b25b1bacafcdf572f24c3ade3c3 include/server/mir/compositor/display_buffer_compositor_factory.h
2470-c7328ef5ea4531c0fa981b3e15a69ea5c8162d09 include/server/mir/compositor/display_buffer_compositor.h
2471-561e7fdc22c48cf39a19e6f7c2db5e8c1feee772 include/server/mir/compositor/frame_dropping_policy_factory.h
2472-e787879afa46d9c8257ff1f4ae8c7900d4b5f1a4 include/server/mir/compositor/frame_dropping_policy.h
2473-e2e3e914a331a7611032860e3c64274aa42339aa include/server/mir/compositor/gl_renderer.h
2474-4088fb037aa1bbae897145caca99314ea6cc2aa6 include/server/mir/compositor/recently_used_cache.h
2475-e0860c43bf5196a792ffd7216826925e16275d07 include/server/mir/compositor/renderer_factory.h
2476-51391bd29f7499f8cbb89e4ba33acf2b72d93592 include/server/mir/compositor/renderer.h
2477-686a839fd0cd5fa469344dc49190ff9d578efc25 include/server/mir/compositor/scene_element.h
2478+5205e30c5fdb5b5d8803064fc1abd102db59c4e7 include/server/mir/compositor/scene_element.h
2479 4fcf34e424128b87ddc76733594e32e09ebbd486 include/server/mir/compositor/scene.h
2480-f102d38fd8afd63b636d76005f9b80f3adda0858 include/server/mir/default_server_configuration.h
2481-bbb15c910dbc8d7c9a4cc982890486b7e16197e4 include/server/mir/default_server_status_listener.h
2482-215f6cf88826381cd3ec37a6d2179a70093c0bc5 include/server/mir/display_changer.h
2483+ef0b6f26fb40a72e4a4744e4d9c4bd044142de47 include/server/mir/default_server_configuration.h
2484 af1ff0714be973ac76d56006a2e5991f68cd1dec include/server/mir/display_server.h
2485 a35c5495d8fd28fc0e375b17495fc5caab51b329 include/server/mir/emergency_cleanup.h
2486-fc7f9b93d6c12c6866a8752a1558c6dd19369864 include/server/mir/frontend/connection_context.h
2487 65db331f1c0e956eced5c9fc73a2b2122dbc8dc7 include/server/mir/frontend/connection_creator.h
2488 e6e92642301fc9bb85e1d38087a5dd84e5d30fd7 include/server/mir/frontend/connections.h
2489-24e0ff92e7deb204f68a82de973f51c0ae07c935 include/server/mir/frontend/connector.h
2490-d21356fe32066c1d6146730c198683d1ad5786bd include/server/mir/frontend/connector_report.h
2491 938de641cb0e01e1098b007b39b151a7dfe4adc1 include/server/mir/frontend/display_changer.h
2492 46b9a4c7794c29b4bd7822671f9626fc8fc33333 include/server/mir/frontend/event_sink.h
2493 bdb89184f400bb04625db5835d38576f99f52684 include/server/mir/frontend/fd_sets.h
2494 4f1303065e300d26acb148c3dd9f7183dc3c4443 include/server/mir/frontend/message_processor.h
2495-e43a044d70ad48fd41d74a176223e3e75b9b53b8 include/server/mir/frontend/message_processor_report.h
2496 59d6703def2a0ff840e5eb75390a5af76fd93f58 include/server/mir/frontend/prompt_session.h
2497 cb1f73934d150f21e60d4d8de3f15918d993dd98 include/server/mir/frontend/protobuf_connection_creator.h
2498 7fc88a2e39f6b87ecbd89a264612138e8fcfb10a include/server/mir/frontend/protobuf_message_sender.h
2499@@ -80,51 +64,33 @@
2500 b729a7710c37d9f1fba56a6f8e8eae1c2559f57a include/server/mir/frontend/session_authorizer.h
2501 34ce482df448fd2fc5f0c4ae5ac8b7fecbd228c9 include/server/mir/frontend/session_credentials.h
2502 e5ea465ed7e05f0e1d6a837d0d6b3a04c2d7fc19 include/server/mir/frontend/session.h
2503-0452fd9e7ccf081baf7635d8f699de47c52372ea include/server/mir/frontend/session_mediator_report.h
2504+d754e5bb057f3018d7228170cf9a0c66d75d8cc2 include/server/mir/frontend/session_mediator_report.h
2505 68468aa2298c4e2cdc1bbb7cb5f250a914ae16c9 include/server/mir/frontend/shell.h
2506 f67b9788943a4b9121b3891dfbe979d57922ea78 include/server/mir/frontend/surface.h
2507 618b43a84cce0ad671ed68fe2ba796fbc7b79e31 include/server/mir/frontend/surface_id.h
2508 5aa4c4db5468d9b9fe8e98a64444538aadd6e17b include/server/mir/frontend/template_protobuf_message_processor.h
2509-ba79552edce545fafc9a4f401411c44d0cb3b2cf include/server/mir/graphics/gl_extensions_base.h
2510-2489a0e7922b6c7abe383726a30e17edbee51048 include/server/mir/graphics/surfaceless_egl_context.h
2511-36ad5c3d722a5c8f252eb7538a5fb2bff46d2189 include/server/mir/input/android/default_android_input_configuration.h
2512 f95c2bddf13d15993ef5d6a0ad7b9106ae550b87 include/server/mir/input/composite_event_filter.h
2513 67719acb03b35d383dfefd65e8dfb872c42bcc11 include/server/mir/input/cursor_images.h
2514-c1e96c372d7856d59947f3145d273b1285b569bc include/server/mir/input/cursor_listener.h
2515+cef18b7215fbe00550d18c0aa0f79b641cff494e include/server/mir/input/cursor_listener.h
2516 2331fc402686e862809bf24714a8746cdde97cb1 include/server/mir/input/event_filter.h
2517-75d676ad8b49f6883317373b90cb22ebf407a977 include/server/mir/input/input_channel_factory.h
2518 78862dda41d56c6b937a1ed197982e5fa37f50df include/server/mir/input/input_channel.h
2519 574c11e234ba26924ccae8e005fb6f3db921441d include/server/mir/input/input_configuration.h
2520 6f1d9cf83bbb1256f0b4d1ba1d94d95af98c52f0 include/server/mir/input/input_dispatcher.h
2521 443aa3f7ab31409f4cc4496aff344f8b9978aca6 include/server/mir/input/input_manager.h
2522 b2ec497c6bec1b3a67c991f31cc7b7c51050ecbb include/server/mir/input/input_reception_mode.h
2523-901b7ef0889385e88c77e9b4f6724c3c56ecdb7a include/server/mir/input/input_region.h
2524-b703ac51f94b6f9c9edcd6a4587e33d6e2d54269 include/server/mir/input/input_report.h
2525-3918c61bb2404b1fe8ba3d4a0573deb67065f8c0 include/server/mir/input/input_sender.h
2526-51cda18e314f1e36177a7ebfab0d1dd12867cdf0 include/server/mir/input/input_send_observer.h
2527-59e757018c337db25df0c68556664eb7536e4321 include/server/mir/input/input_targets.h
2528 15119bf95b4512c8b91df7c20edf56a3c0734957 include/server/mir/input/surface.h
2529-d647ce6beffdc31a597769587bb3ab17ec679491 include/server/mir/input/touch_visualizer.h
2530-204089f848c4d63ade96f92a0b8cfc1c33f1ce63 include/server/mir/input/vt_filter.h
2531-5ba863e9bb4dc9802aa74a7864f576df25142c2d include/server/mir/logging/glog_logger.h
2532+036f3967757873751fcacaa768ca11a52001c225 include/server/mir/input/touch_visualizer.h
2533 964069b241f1e8211386bb8735ee0f752b666949 include/server/mir/main_loop.h
2534 edd5a0a6be0be57ef64c5af89fc5a65dc558648c include/server/mir/report_exception.h
2535-11ce453c51c4276c18062750976e9f2e86da7f9d include/server/mir/report/legacy_input_report.h
2536 8192727cf5fa0b2b5798b2211c2c8a4ad65c9f60 include/server/mir/run_mir.h
2537-a94e06b5746f6b12ef4cc13249bb041852babf18 include/server/mir/scene/buffer_stream_factory.h
2538 71d9082681aa39d652c88ad3b54665695b521d24 include/server/mir/scene/depth_id.h
2539-8a409388cfaf6b8f960303a9e5d0e31e4fbac097 include/server/mir/scene/legacy_scene_change_notification.h
2540-f7b42034a65b5a3b2bf9349b97f7d95515029f40 include/server/mir/scene/null_observer.h
2541-dc5b52c9631f91ca08487737aef808e087a17c97 include/server/mir/scene/null_prompt_session_listener.h
2542-cacb23805002e87fc6c4cb3e28bc77e800854cf1 include/server/mir/scene/null_session_listener.h
2543 4e4e563ab429a13ddca7eead16f2b6cefb8edff6 include/server/mir/scene/null_surface_observer.h
2544-08f2e4f35cc9649004f2f118ebe85a8d3f1f1ae8 include/server/mir/scene/observer.h
2545+d5273f3363b0b776427d5e3f1af99f0f2bcf3fa6 include/server/mir/scene/observer.h
2546 10db25fbaefcabb3b191177ed70f5972df7f05f0 include/server/mir/scene/placement_strategy.h
2547 74f7f66ffc3e15c428082fb961e748cb4f39dafc include/server/mir/scene/prompt_session_creation_parameters.h
2548 4e8269c822ad2daddd92115cbe5332caaa9ef4cc include/server/mir/scene/prompt_session.h
2549 79adf11e2b1778897ed97d1713ba4c3d34eb1f31 include/server/mir/scene/prompt_session_listener.h
2550 27f614f98ad7c249d9b12dcca30a324220cdd25b include/server/mir/scene/prompt_session_manager.h
2551-6729761e5f7abaae52cbc23f67bf6d6774f4256a include/server/mir/scene/scene_report.h
2552 5edf446380070f567500069e422d293e88468ee5 include/server/mir/scene/session_coordinator.h
2553 f148a69caa39756d43cfaf7cc868ad681bda9ef6 include/server/mir/scene/session.h
2554 ee94083f10f890e24c0e0bbdb94842e2dd788deb include/server/mir/scene/session_listener.h
2555@@ -133,8 +99,6 @@
2556 bbc9e2e2bb71634cd6f1c5c0430093e10e74fa23 include/server/mir/scene/surface_configurator.h
2557 e5e4dd7bcaf186810043fa0f05be42d7e49b0843 include/server/mir/scene/surface_coordinator.h
2558 dd8f054f786b9746d9e513f2656e931234b5283a include/server/mir/scene/surface_creation_parameters.h
2559-d84b0cb897519c4e6dfd2a447bfef3a5147f9c61 include/server/mir/scene/surface_event_source.h
2560-e343cef9f90a0a01f660936b890084ffce02710b include/server/mir/scene/surface_factory.h
2561 791624081fa86523f51f444d2b28d7ab32dde1a4 include/server/mir/scene/surface.h
2562 993e9f458ffc4288d304413f3fa0b1dcc95a093d include/server/mir/scene/surface_observer.h
2563 7ef3e99901168cda296d74d05a979f47bf9c3ff1 include/server/mir/server_action_queue.h
2564@@ -148,51 +112,4 @@
2565 82bc93ea53f03399cb143b9ce936bb51d4366be6 include/server/mir/shell/session_coordinator_wrapper.h
2566 18e869c5b87ab8be4bc185d2cd55a93d699cde72 include/server/mir/shell/surface_coordinator_wrapper.h
2567 c3fdfa84a3ae97a0d1057635c5bfcedcf29d007c include/server/mir/time/alarm.h
2568-bfacab3544a6b1339e6f45353033bdab3c226db7 include/server/mir/time/clock.h
2569-3476f05e60e00fd637b36fb1e4417762082e0486 include/server/mir/time/high_resolution_clock.h
2570 a134c7b86e9c3b191f1004abe7bbdceed8ac42ee include/server/mir/time/timer.h
2571-6ad1f35928df9ffd917fbf17cbcdd533a8b5b27d include/shared/mir/basic_observers.h
2572-3329ada91412ded2f127aee9a92f065e57b81cb2 include/shared/mir/cached_ptr.h
2573-691278e8b89265fa7f11db78dc8a9b530cef6e99 include/shared/mir/default_configuration.h
2574-82ff9499ef62739379616e02164dc98f9914c329 include/shared/mir/fd.h
2575-15dd88e8de39d195c3a4e7c166678cd9b6951994 include/shared/mir/frontend/client_constants.h
2576-b399dc08514751c86e23824612a52378dd9b1e23 include/shared/mir/geometry/dimensions.h
2577-7031270546292995d38e6de165600db21ff51c68 include/shared/mir/geometry/displacement.h
2578-283cb0ecf9d544300681fc2ab86bec568e2d20ff include/shared/mir/geometry/forward.h
2579-bfd87d9fb800c1c1b528c00185570abac569caf2 include/shared/mir/geometry/length.h
2580-d954464ef2d20c2876db68c94512a443186da09b include/shared/mir/geometry/point.h
2581-65148c6d432950fb07589b6348afc4aab8b5079a include/shared/mir/geometry/rectangle.h
2582-1b6632a6ee0a8758201739fb16c4eb1ce196344a include/shared/mir/geometry/rectangles.h
2583-7d3ede2c85e9febc1c4951a342939e3a6dacb99e include/shared/mir/geometry/size.h
2584-76d576231de039e25f4cf30829504552dcb9fc53 include/shared/mir/graphics/android/android_driver_interpreter.h
2585-c02a1e68d5a8ccfd8710440e166c9e32bc974f1e include/shared/mir/graphics/android/android_native_buffer.h
2586-05e7b043ccf49582a78e880967b3bc1f3512e010 include/shared/mir/graphics/android/fence.h
2587-0168b68dea12355c22cd39fbfc50bca0e21fd6e5 include/shared/mir/graphics/android/mir_native_window.h
2588-8f6d9dc681f3e0d212e6a74f9170ea7b3eb2607f include/shared/mir/graphics/android/native_buffer.h
2589-424d1ff5b9bc299fc43f0afe961c4dafc3227992 include/shared/mir/graphics/android/sync_fence.h
2590-e1be9faee8b844ca2ce617f8fd82c9ee08d56bed include/shared/mir/graphics/native_buffer.h
2591-ec29bd74becf1c4f1004797e71d4e49d376dbfc8 include/shared/mir/input/android/android_input_lexicon.h
2592-dcf8b8982f138bdde39a241825c610e955cd5e33 include/shared/mir/input/input_platform.h
2593-de92c0e3f7a1cf204330cd29847e7524a3af00cd include/shared/mir/input/input_receiver_report.h
2594-208cd6aed5ef5f8f39b3eb86604e4133cb840485 include/shared/mir/input/input_receiver_thread.h
2595-3829a4722360d794658ed4db4af005c79f6504c5 include/shared/mir/input/null_input_receiver_report.h
2596-2801f1a4fa975a1d8f9388192da2408d2bb472f4 include/shared/mir/input/xkb_mapper.h
2597-be7d58c9fde2ce91cc66dd6144b76e08b536266b include/shared/mir/int_wrapper.h
2598-2319b60bf87801a93af636d3bbfbae420f6776a4 include/shared/mir/logging/dumb_console_logger.h
2599-52cb642982f7f4fa623cf041b11eca126a3df0f4 include/shared/mir/logging/input_timestamp.h
2600-72e20902d70588af73bea7a524337264b853bf0a include/shared/mir/logging/logger.h
2601-f199066a30882b22be901de0c4e6aa62e320e593 include/shared/mir/protobuf/google_protobuf_guard.h
2602-4b4b8d7ae1cd870aeec6399afd6dbd56205c80b2 include/shared/mir/raii.h
2603-bb27ec04b2861d128f420698491941f71e1aefc0 include/shared/mir/recursive_read_write_mutex.h
2604-903210453b98267e47c03ab2920c1db047ba0457 include/shared/mir/report/lttng/mir_tracepoint.h
2605-52b6b60543a361e91dbeaa2549114239f57b6b4e include/shared/mir/report/lttng/tracepoint_provider.h
2606-dc80f8a57f133276dd5a72f4d0360a7b71154d16 include/shared/mir/shared_library.h
2607-b4e96264b9a57a1f2ceceb700c5379658905ded7 include/shared/mir/thread_name.h
2608-9907751d046e4aea81881cf19e5df52c7a6a813e include/shared/mir_toolkit/client_types.h
2609-183d9e5e6cfe48b3d9145a28541dd4202ff6137b include/shared/mir_toolkit/common.h
2610-fce4c1a9e0d037244f7e9e96ea2d8eaab4fc404c include/shared/mir_toolkit/cursors.h
2611-bdaceadd56e41d2cb708f7c4da97acf84dfc75b7 include/shared/mir_toolkit/event.h
2612-99ef5f3bf548508fae24c60f74be1dea018a6e8c include/shared/mir_toolkit/mesa/native_display.h
2613-101017c17714a57db57d79b7b5e7df40a3568236 include/shared/mir_toolkit/mir_native_buffer.h
2614-9f646fa12eaca5fc3b7a8fde6208673c071c8ef3 include/shared/mir/udev/wrapper.h
2615-9fd77ab693cc4c9a200e44804f5493733528a674 include/shared/mir/variable_length_array.h
2616
2617=== modified file 'src/CMakeLists.txt'
2618--- src/CMakeLists.txt 2014-08-27 19:44:04 +0000
2619+++ src/CMakeLists.txt 2014-10-10 13:43:10 +0000
2620@@ -1,5 +1,5 @@
2621 set(MIR_GENERATED_INCLUDE_DIRECTORIES)
2622-add_subdirectory(shared/)
2623+add_subdirectory(common/)
2624 include_directories(${MIR_GENERATED_INCLUDE_DIRECTORIES})
2625
2626 add_subdirectory(platform/)
2627
2628=== modified file 'src/client/CMakeLists.txt'
2629--- src/client/CMakeLists.txt 2014-08-05 14:03:25 +0000
2630+++ src/client/CMakeLists.txt 2014-10-10 13:43:10 +0000
2631@@ -1,3 +1,10 @@
2632+set(MIRCLIENT_ABI 8)
2633+set(CLIENT_DRIVER client${MIRCLIENT_ABI}driver)
2634+set(MIR_CLIENT_DRIVER mir${CLIENT_DRIVER})
2635+set(MIR_CLIENT_DRIVER_BINARY lib${MIR_CLIENT_DRIVER}.so
2636+ CACHE STRING "File name of Mir client drivers")
2637+add_definitions(-DMIR_CLIENT_DRIVER_BINARY="${MIR_CLIENT_DRIVER_BINARY}")
2638+
2639 set(PREFIX "${CMAKE_INSTALL_PREFIX}")
2640 set(EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")
2641 set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
2642@@ -44,6 +51,7 @@
2643 mir_surface_api.cpp
2644 logging/rpc_report.cpp
2645 logging/input_receiver_report.cpp
2646+ logging/perf_report.cpp
2647 default_connection_configuration.cpp
2648 surface_map.cpp
2649 lifecycle_control.cpp
2650@@ -54,6 +62,7 @@
2651 mir_prompt_session.cpp
2652 mir_prompt_session_api.cpp
2653 mir_event_distributor.cpp
2654+ periodic_perf_report.cpp
2655 )
2656
2657 add_library(
2658@@ -62,7 +71,6 @@
2659 $<TARGET_OBJECTS:mirclientobjects>
2660 )
2661
2662-set(MIRCLIENT_ABI 8)
2663 set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)
2664
2665 set_target_properties(
2666
2667=== modified file 'src/client/android/CMakeLists.txt'
2668--- src/client/android/CMakeLists.txt 2014-08-27 19:44:04 +0000
2669+++ src/client/android/CMakeLists.txt 2014-10-10 13:43:10 +0000
2670@@ -23,7 +23,7 @@
2671
2672 set_target_properties(
2673 mirclientplatformandroid PROPERTIES
2674- OUTPUT_NAME mirclientplatform
2675+ OUTPUT_NAME ${MIR_CLIENT_DRIVER}
2676 LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/android
2677 LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}"
2678 )
2679@@ -35,19 +35,19 @@
2680 ${LIBHARDWARE_LIBRARIES}
2681 )
2682
2683-install(TARGETS mirclientplatformandroid LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mir/clientplatform/android)
2684+install(TARGETS mirclientplatformandroid LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mir/${CLIENT_DRIVER}/android)
2685
2686 if (MIR_TEST_PLATFORM STREQUAL "android")
2687 add_custom_command(TARGET mirclientplatformandroid
2688 POST_BUILD
2689- COMMAND ${CMAKE_COMMAND} -E remove libmirclientplatform.so
2690- COMMAND ${CMAKE_COMMAND} -E create_symlink android/$<TARGET_FILE_NAME:mirclientplatformandroid> libmirclientplatform.so
2691+ COMMAND ${CMAKE_COMMAND} -E remove ${MIR_CLIENT_DRIVER_BINARY}
2692+ COMMAND ${CMAKE_COMMAND} -E create_symlink android/$<TARGET_FILE_NAME:mirclientplatformandroid> ${MIR_CLIENT_DRIVER_BINARY}
2693 WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
2694 )
2695
2696 install(CODE
2697 "execute_process(
2698- COMMAND ln -sf mir/clientplatform/android/libmirclientplatform.so
2699+ COMMAND ln -sf mir/${CLIENT_DRIVER}/android/${MIR_CLIENT_DRIVER_BINARY}
2700 WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
2701 )"
2702 )
2703
2704=== modified file 'src/client/default_connection_configuration.cpp'
2705--- src/client/default_connection_configuration.cpp 2014-09-12 07:56:37 +0000
2706+++ src/client/default_connection_configuration.cpp 2014-10-10 13:43:10 +0000
2707@@ -26,13 +26,17 @@
2708 #include "mir/input/null_input_receiver_report.h"
2709 #include "logging/rpc_report.h"
2710 #include "logging/input_receiver_report.h"
2711+#include "mir/logging/shared_library_prober_report.h"
2712+#include "mir/logging/null_shared_library_prober_report.h"
2713 #include "lttng/rpc_report.h"
2714 #include "lttng/input_receiver_report.h"
2715+#include "lttng/shared_library_prober_report.h"
2716 #include "connection_surface_map.h"
2717 #include "lifecycle_control.h"
2718 #include "mir/shared_library.h"
2719 #include "client_platform_factory.h"
2720 #include "mir_event_distributor.h"
2721+#include "mir/shared_library_prober.h"
2722
2723 #include <dlfcn.h>
2724
2725@@ -43,7 +47,7 @@
2726 std::string const off_opt_val{"off"};
2727 std::string const log_opt_val{"log"};
2728 std::string const lttng_opt_val{"lttng"};
2729-std::string const default_platform_lib{"libmirclientplatform.so"};
2730+std::string const default_platform_lib{MIR_CLIENT_DRIVER_BINARY};
2731
2732 // Hack around the way Qt loads mir:
2733 // qtmir and therefore Mir are loaded via dlopen(..., RTLD_LOCAL).
2734@@ -200,6 +204,22 @@
2735 });
2736 }
2737
2738+std::shared_ptr<mir::SharedLibraryProberReport> mir::client::DefaultConnectionConfiguration::the_shared_library_prober_report()
2739+{
2740+ return shared_library_prober_report(
2741+ [this] () -> std::shared_ptr<mir::SharedLibraryProberReport>
2742+ {
2743+ auto val_raw = getenv("MIR_CLIENT_SHARED_LIBRARY_PROBER_REPORT");
2744+ std::string const val{val_raw ? val_raw : off_opt_val};
2745+ if (val == log_opt_val)
2746+ return std::make_shared<mir::logging::SharedLibraryProberReport>(the_logger());
2747+ else if (val == lttng_opt_val)
2748+ return std::make_shared<mcl::lttng::SharedLibraryProberReport>();
2749+ else
2750+ return std::make_shared<mir::logging::NullSharedLibraryProberReport>();
2751+ });
2752+}
2753+
2754 std::shared_ptr<mir::SharedLibrary> mcl::DefaultConnectionConfiguration::the_platform_library()
2755 {
2756 if (!platform_library)
2757@@ -209,6 +229,5 @@
2758 std::string const libname{val_raw ? val_raw : default_platform_lib};
2759 platform_library = std::make_shared<mir::SharedLibrary>(libname);
2760 }
2761-
2762 return platform_library;
2763 }
2764
2765=== modified file 'src/client/default_connection_configuration.h'
2766--- src/client/default_connection_configuration.h 2014-08-29 13:12:16 +0000
2767+++ src/client/default_connection_configuration.h 2014-10-10 13:43:10 +0000
2768@@ -27,6 +27,8 @@
2769
2770 namespace mir
2771 {
2772+class SharedLibraryProberReport;
2773+
2774 namespace input
2775 {
2776 namespace receiver
2777@@ -57,6 +59,7 @@
2778 std::shared_ptr<LifecycleControl> the_lifecycle_control();
2779 std::shared_ptr<EventSink> the_event_sink();
2780 std::shared_ptr<EventHandlerRegister> the_event_handler_register();
2781+ std::shared_ptr<mir::SharedLibraryProberReport> the_shared_library_prober_report();
2782 std::shared_ptr<SharedLibrary> the_platform_library() override;
2783
2784 virtual std::string the_socket_file();
2785@@ -78,6 +81,7 @@
2786
2787 CachedPtr<rpc::RpcReport> rpc_report;
2788 CachedPtr<input::receiver::InputReceiverReport> input_receiver_report;
2789+ CachedPtr<mir::SharedLibraryProberReport> shared_library_prober_report;
2790
2791 private:
2792 std::string const socket_file;
2793
2794=== added file 'src/client/logging/perf_report.cpp'
2795--- src/client/logging/perf_report.cpp 1970-01-01 00:00:00 +0000
2796+++ src/client/logging/perf_report.cpp 2014-10-10 13:43:10 +0000
2797@@ -0,0 +1,53 @@
2798+/*
2799+ * Copyright © 2014 Canonical Ltd.
2800+ *
2801+ * This program is free software: you can redistribute it and/or modify it
2802+ * under the terms of the GNU Lesser General Public License version 3,
2803+ * as published by the Free Software Foundation.
2804+ *
2805+ * This program is distributed in the hope that it will be useful,
2806+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2807+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2808+ * GNU Lesser General Public License for more details.
2809+ *
2810+ * You should have received a copy of the GNU Lesser General Public License
2811+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2812+ *
2813+ * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
2814+ */
2815+
2816+#include "perf_report.h"
2817+#include "mir/logging/logger.h"
2818+#include "mir/time/high_resolution_clock.h"
2819+
2820+using namespace mir::client;
2821+
2822+namespace
2823+{
2824+const char * const component = "perf"; // Note context is already within client
2825+} // namespace
2826+
2827+logging::PerfReport::PerfReport(
2828+ std::shared_ptr<mir::logging::Logger> const& logger)
2829+ : PeriodicPerfReport(std::chrono::seconds(1),
2830+ std::make_shared<mir::time::HighResolutionClock>())
2831+ , logger(logger)
2832+{
2833+}
2834+
2835+void logging::PerfReport::display(const char *name, long fps100,
2836+ long rendertime_usec, long lag_usec,
2837+ int nbuffers) const
2838+{
2839+ char msg[256];
2840+ snprintf(msg, sizeof msg,
2841+ "%s: %2ld.%02ld FPS, render time %ld.%02ldms, buffer lag %ld.%02ldms (%d buffers)",
2842+ name,
2843+ fps100 / 100, fps100 % 100,
2844+ rendertime_usec / 1000, (rendertime_usec / 10) % 100,
2845+ lag_usec / 1000, (lag_usec / 10) % 100,
2846+ nbuffers
2847+ );
2848+
2849+ logger->log(mir::logging::Logger::informational, msg, component);
2850+}
2851
2852=== added file 'src/client/logging/perf_report.h'
2853--- src/client/logging/perf_report.h 1970-01-01 00:00:00 +0000
2854+++ src/client/logging/perf_report.h 2014-10-10 13:43:10 +0000
2855@@ -0,0 +1,48 @@
2856+/*
2857+ * Copyright © 2014 Canonical Ltd.
2858+ *
2859+ * This program is free software: you can redistribute it and/or modify it
2860+ * under the terms of the GNU Lesser General Public License version 3,
2861+ * as published by the Free Software Foundation.
2862+ *
2863+ * This program is distributed in the hope that it will be useful,
2864+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2865+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2866+ * GNU Lesser General Public License for more details.
2867+ *
2868+ * You should have received a copy of the GNU Lesser General Public License
2869+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2870+ *
2871+ * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
2872+ */
2873+
2874+#ifndef MIR_CLIENT_LOGGING_PERF_REPORT_H_
2875+#define MIR_CLIENT_LOGGING_PERF_REPORT_H_
2876+
2877+#include "../periodic_perf_report.h"
2878+#include <memory>
2879+
2880+namespace mir
2881+{
2882+namespace logging { class Logger; }
2883+
2884+namespace client
2885+{
2886+namespace logging
2887+{
2888+
2889+class PerfReport : public PeriodicPerfReport
2890+{
2891+public:
2892+ PerfReport(std::shared_ptr<mir::logging::Logger> const& logger);
2893+ void display(const char *name, long fps100, long rendertime_usec,
2894+ long lag_usec, int nbuffers) const override;
2895+private:
2896+ std::shared_ptr<mir::logging::Logger> const logger;
2897+};
2898+
2899+} // namespace logging
2900+} // namespace client
2901+} // namespace mir
2902+
2903+#endif // MIR_CLIENT_LOGGING_PERF_REPORT_H_
2904
2905=== modified file 'src/client/logging/rpc_report.cpp'
2906--- src/client/logging/rpc_report.cpp 2014-07-21 03:35:31 +0000
2907+++ src/client/logging/rpc_report.cpp 2014-10-10 13:43:10 +0000
2908@@ -147,7 +147,7 @@
2909
2910 void mcll::RpcReport::file_descriptors_received(
2911 google::protobuf::Message const& /*response*/,
2912- std::vector<int32_t> const& fds)
2913+ std::vector<Fd> const& fds)
2914 {
2915 std::stringstream ss;
2916 ss << "File descriptors received: ";
2917
2918=== modified file 'src/client/logging/rpc_report.h'
2919--- src/client/logging/rpc_report.h 2014-07-21 03:35:31 +0000
2920+++ src/client/logging/rpc_report.h 2014-10-10 13:43:10 +0000
2921@@ -60,7 +60,7 @@
2922 std::exception const& ex) override;
2923
2924 void file_descriptors_received(google::protobuf::Message const& response,
2925- std::vector<int32_t> const& fds) override;
2926+ std::vector<Fd> const& fds) override;
2927
2928 void connection_failure(std::exception const& ex) override;
2929
2930
2931=== modified file 'src/client/lttng/CMakeLists.txt'
2932--- src/client/lttng/CMakeLists.txt 2014-08-26 14:56:48 +0000
2933+++ src/client/lttng/CMakeLists.txt 2014-10-10 13:43:10 +0000
2934@@ -6,6 +6,7 @@
2935 client_tracepoint_provider.cpp
2936 rpc_report.cpp
2937 input_receiver_report.cpp
2938+ shared_library_prober_report.cpp
2939 )
2940
2941 add_library(mirclientlttng SHARED tracepoints.c)
2942
2943=== modified file 'src/client/lttng/input_receiver_report_tp.h'
2944--- src/client/lttng/input_receiver_report_tp.h 2014-03-26 05:48:59 +0000
2945+++ src/client/lttng/input_receiver_report_tp.h 2014-10-10 13:43:10 +0000
2946@@ -28,16 +28,6 @@
2947 #include <lttng/tracepoint.h>
2948 #include <stdint.h>
2949
2950-#ifdef __clang__
2951-/*
2952- * TRACEPOINT_EVENT defines functions; since we disable tracepoints under clang
2953- * these functions are unused and so generate fatal warnings.
2954- * (see mir_tracepoint.h and http://sourceware.org/bugzilla/show_bug.cgi?id=13974)
2955- */
2956-#pragma clang diagnostic push
2957-#pragma clang diagnostic warning "-Wunused-function"
2958-#endif
2959-
2960 TRACEPOINT_EVENT(
2961 mir_client_input_receiver,
2962 key_event,
2963@@ -88,10 +78,6 @@
2964 )
2965 )
2966
2967-#ifdef __clang__
2968-#pragma clang diagnostic pop
2969-#endif
2970-
2971 #endif /* MIR_CLIENT_LTTNG_INPUT_RECEIVER_REPORT_TP_H_ */
2972
2973 #include <lttng/tracepoint-event.h>
2974
2975=== modified file 'src/client/lttng/rpc_report.cpp'
2976--- src/client/lttng/rpc_report.cpp 2014-07-21 03:35:31 +0000
2977+++ src/client/lttng/rpc_report.cpp 2014-10-10 13:43:10 +0000
2978@@ -94,10 +94,15 @@
2979
2980 void mcl::lttng::RpcReport::file_descriptors_received(
2981 google::protobuf::Message const& /*response*/,
2982- std::vector<int32_t> const& fds)
2983+ std::vector<Fd> const& fds)
2984 {
2985+ std::unique_ptr<int[]> handles{new int[fds.size()]};
2986+ for (unsigned i = 0 ; i < fds.size() ; ++i)
2987+ {
2988+ handles[i] = fds[i];
2989+ }
2990 mir_tracepoint(mir_client_rpc, file_descriptors_received,
2991- fds.data(), fds.size());
2992+ handles.get(), fds.size());
2993 }
2994
2995 void mcl::lttng::RpcReport::connection_failure(std::exception const& /*ex*/)
2996
2997=== modified file 'src/client/lttng/rpc_report.h'
2998--- src/client/lttng/rpc_report.h 2014-07-21 03:35:31 +0000
2999+++ src/client/lttng/rpc_report.h 2014-10-10 13:43:10 +0000
3000@@ -51,7 +51,7 @@
3001 std::exception const& ex) override;
3002
3003 void file_descriptors_received(google::protobuf::Message const& response,
3004- std::vector<int32_t> const& fds) override;
3005+ std::vector<Fd> const& fds) override;
3006
3007 void connection_failure(std::exception const& ex) override;
3008
3009
3010=== modified file 'src/client/lttng/rpc_report_tp.h'
3011--- src/client/lttng/rpc_report_tp.h 2014-03-26 05:48:59 +0000
3012+++ src/client/lttng/rpc_report_tp.h 2014-10-10 13:43:10 +0000
3013@@ -28,16 +28,6 @@
3014 #include <lttng/tracepoint.h>
3015 #include <stdint.h>
3016
3017-#ifdef __clang__
3018-/*
3019- * TRACEPOINT_EVENT defines functions; since we disable tracepoints under clang
3020- * these functions are unused and so generate fatal warnings.
3021- * (see mir_tracepoint.h and http://sourceware.org/bugzilla/show_bug.cgi?id=13974)
3022- */
3023-#pragma clang diagnostic push
3024-#pragma clang diagnostic warning "-Wunused-function"
3025-#endif
3026-
3027 TRACEPOINT_EVENT(
3028 mir_client_rpc,
3029 invocation_requested,
3030@@ -94,10 +84,6 @@
3031 )
3032 )
3033
3034-#ifdef __clang__
3035-#pragma clang diagnostic pop
3036-#endif
3037-
3038 #endif /* MIR_CLIENT_LTTNG_RPC_REPORT_TP_H_ */
3039
3040 #include <lttng/tracepoint-event.h>
3041
3042=== added file 'src/client/lttng/shared_library_prober_report.cpp'
3043--- src/client/lttng/shared_library_prober_report.cpp 1970-01-01 00:00:00 +0000
3044+++ src/client/lttng/shared_library_prober_report.cpp 2014-10-10 13:43:10 +0000
3045@@ -0,0 +1,50 @@
3046+/*
3047+ * Copyright © 2014 Canonical Ltd.
3048+ *
3049+ * This program is free software: you can redistribute it and/or modify
3050+ * it under the terms of the GNU Lesser General Public License version 3 as
3051+ * published by the Free Software Foundation.
3052+ *
3053+ * This program is distributed in the hope that it will be useful,
3054+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3055+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3056+ * GNU Lesser General Public License for more details.
3057+ *
3058+ * You should have received a copy of the GNU Lesser General Public License
3059+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3060+ *
3061+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
3062+ */
3063+
3064+#include "shared_library_prober_report.h"
3065+#include "mir/report/lttng/mir_tracepoint.h"
3066+
3067+#define TRACEPOINT_DEFINE
3068+#define TRACEPOINT_PROBE_DYNAMIC_LINKAGE
3069+#include "shared_library_prober_report_tp.h"
3070+
3071+namespace mcl = mir::client;
3072+
3073+void mcl::lttng::SharedLibraryProberReport::probing_path(boost::filesystem::path const& path)
3074+{
3075+ mir_tracepoint(mir_client_shared_library_prober, probing_path,
3076+ path.string().c_str());
3077+}
3078+
3079+void mcl::lttng::SharedLibraryProberReport::probing_failed(boost::filesystem::path const& path, std::exception const& error)
3080+{
3081+ mir_tracepoint(mir_client_shared_library_prober, probing_failed,
3082+ path.string().c_str(), error.what());
3083+}
3084+
3085+void mcl::lttng::SharedLibraryProberReport::loading_library(boost::filesystem::path const& filename)
3086+{
3087+ mir_tracepoint(mir_client_shared_library_prober, loading_library,
3088+ filename.string().c_str());
3089+}
3090+
3091+void mcl::lttng::SharedLibraryProberReport::loading_failed(boost::filesystem::path const& filename, std::exception const& error)
3092+{
3093+ mir_tracepoint(mir_client_shared_library_prober, loading_failed,
3094+ filename.string().c_str(), error.what());
3095+}
3096
3097=== added file 'src/client/lttng/shared_library_prober_report.h'
3098--- src/client/lttng/shared_library_prober_report.h 1970-01-01 00:00:00 +0000
3099+++ src/client/lttng/shared_library_prober_report.h 2014-10-10 13:43:10 +0000
3100@@ -0,0 +1,55 @@
3101+/*
3102+ * Copyright © 2014 Canonical Ltd.
3103+ *
3104+ * This program is free software: you can redistribute it and/or modify
3105+ * it under the terms of the GNU Lesser General Public License version 3 as
3106+ * published by the Free Software Foundation.
3107+ *
3108+ * This program is distributed in the hope that it will be useful,
3109+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3110+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3111+ * GNU Lesser General Public License for more details.
3112+ *
3113+ * You should have received a copy of the GNU Lesser General Public License
3114+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3115+ *
3116+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
3117+ */
3118+
3119+#ifndef MIR_CLIENT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_H_
3120+#define MIR_CLIENT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_H_
3121+
3122+#include "mir/shared_library_prober_report.h"
3123+#include "client_tracepoint_provider.h"
3124+
3125+namespace mir
3126+{
3127+namespace client
3128+{
3129+namespace lttng
3130+{
3131+
3132+class SharedLibraryProberReport : public mir::SharedLibraryProberReport
3133+{
3134+public:
3135+ void probing_path(boost::filesystem::path const& path) override;
3136+ void probing_failed(boost::filesystem::path const& path, std::exception const& error) override;
3137+ void loading_library(boost::filesystem::path const& filename) override;
3138+ void loading_failed(boost::filesystem::path const& filename, std::exception const& error) override;
3139+
3140+private:
3141+ ClientTracepointProvider tp_provider;
3142+};
3143+
3144+}
3145+}
3146+}
3147+
3148+#endif /* MIR_CLIENT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_H_ */
3149+
3150+
3151+#ifndef SHARED_LIBRARY_PROBER_REPORT_H
3152+#define SHARED_LIBRARY_PROBER_REPORT_H
3153+
3154+
3155+#endif // SHARED_LIBRARY_PROBER_REPORT_H
3156
3157=== added file 'src/client/lttng/shared_library_prober_report_tp.h'
3158--- src/client/lttng/shared_library_prober_report_tp.h 1970-01-01 00:00:00 +0000
3159+++ src/client/lttng/shared_library_prober_report_tp.h 2014-10-10 13:43:10 +0000
3160@@ -0,0 +1,85 @@
3161+/*
3162+ * Copyright © 2014 Canonical Ltd.
3163+ *
3164+ * This program is free software: you can redistribute it and/or modify
3165+ * it under the terms of the GNU Lesser General Public License version 3 as
3166+ * published by the Free Software Foundation.
3167+ *
3168+ * This program is distributed in the hope that it will be useful,
3169+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3170+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3171+ * GNU Lesser General Public License for more details.
3172+ *
3173+ * You should have received a copy of the GNU Lesser General Public License
3174+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3175+ *
3176+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
3177+ */
3178+
3179+#undef TRACEPOINT_PROVIDER
3180+#define TRACEPOINT_PROVIDER mir_client_shared_library_prober
3181+
3182+#undef TRACEPOINT_INCLUDE
3183+#define TRACEPOINT_INCLUDE "./shared_library_prober_report_tp.h"
3184+
3185+#if !defined(MIR_CLIENT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ)
3186+#define MIR_CLIENT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_TP_H_
3187+
3188+#include <lttng/tracepoint.h>
3189+#include <stdint.h>
3190+
3191+#ifdef __clang__
3192+/*
3193+ * TRACEPOINT_EVENT defines functions; since we disable tracepoints under clang
3194+ * these functions are unused and so generate fatal warnings.
3195+ * (see mir_tracepoint.h and http://sourceware.org/bugzilla/show_bug.cgi?id=13974)
3196+ */
3197+#pragma clang diagnostic push
3198+#pragma clang diagnostic warning "-Wunused-function"
3199+#endif
3200+
3201+TRACEPOINT_EVENT(
3202+ mir_client_shared_library_prober,
3203+ probing_path,
3204+ TP_ARGS(const char*, path),
3205+ TP_FIELDS(
3206+ ctf_string(path, path)
3207+ )
3208+)
3209+
3210+TRACEPOINT_EVENT(
3211+ mir_client_shared_library_prober,
3212+ probing_failed,
3213+ TP_ARGS(const char*, path, const char*, message),
3214+ TP_FIELDS(
3215+ ctf_string(path, path)
3216+ ctf_string(message, message)
3217+ )
3218+)
3219+
3220+TRACEPOINT_EVENT(
3221+ mir_client_shared_library_prober,
3222+ loading_library,
3223+ TP_ARGS(const char*, path),
3224+ TP_FIELDS(
3225+ ctf_string(path, path)
3226+ )
3227+)
3228+
3229+TRACEPOINT_EVENT(
3230+ mir_client_shared_library_prober,
3231+ loading_failed,
3232+ TP_ARGS(const char*, path, const char*, message),
3233+ TP_FIELDS(
3234+ ctf_string(path, path)
3235+ ctf_string(message, message)
3236+ )
3237+)
3238+
3239+#ifdef __clang__
3240+#pragma clang diagnostic pop
3241+#endif
3242+
3243+#endif /* MIR_CLIENT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_TP_H_ */
3244+
3245+#include <lttng/tracepoint-event.h>
3246
3247=== modified file 'src/client/mesa/CMakeLists.txt'
3248--- src/client/mesa/CMakeLists.txt 2014-08-27 19:44:04 +0000
3249+++ src/client/mesa/CMakeLists.txt 2014-10-10 13:43:10 +0000
3250@@ -25,7 +25,7 @@
3251
3252 set_target_properties(
3253 mirclientplatformmesa PROPERTIES
3254- OUTPUT_NAME mirclientplatform
3255+ OUTPUT_NAME ${MIR_CLIENT_DRIVER}
3256 LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/mesa
3257 LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}"
3258 )
3259@@ -36,19 +36,19 @@
3260 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
3261 )
3262
3263-install(TARGETS mirclientplatformmesa LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mir/clientplatform/mesa)
3264+install(TARGETS mirclientplatformmesa LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mir/${CLIENT_DRIVER}/mesa)
3265
3266 if (MIR_TEST_PLATFORM STREQUAL "mesa")
3267 add_custom_command(TARGET mirclientplatformmesa
3268 POST_BUILD
3269- COMMAND ${CMAKE_COMMAND} -E remove libmirclientplatform.so
3270- COMMAND ${CMAKE_COMMAND} -E create_symlink mesa/$<TARGET_FILE_NAME:mirclientplatformmesa> libmirclientplatform.so
3271+ COMMAND ${CMAKE_COMMAND} -E remove ${MIR_CLIENT_DRIVER_BINARY}
3272+ COMMAND ${CMAKE_COMMAND} -E create_symlink mesa/$<TARGET_FILE_NAME:mirclientplatformmesa> ${MIR_CLIENT_DRIVER_BINARY}
3273 WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
3274 )
3275
3276 install(CODE
3277 "execute_process(
3278- COMMAND ln -sf mir/clientplatform/mesa/libmirclientplatform.so
3279+ COMMAND ln -sf mir/${CLIENT_DRIVER}/mesa/${MIR_CLIENT_DRIVER_BINARY}
3280 WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
3281 )"
3282 )
3283
3284=== modified file 'src/client/mir_connection.cpp'
3285--- src/client/mir_connection.cpp 2014-08-29 13:12:16 +0000
3286+++ src/client/mir_connection.cpp 2014-10-10 13:43:10 +0000
3287@@ -227,7 +227,7 @@
3288 * is dispatched to the process even if it's blocked in the current
3289 * thread.
3290 */
3291- kill(getpid(), SIGTERM);
3292+ kill(getpid(), SIGHUP);
3293 }
3294 }
3295 }
3296@@ -527,3 +527,8 @@
3297 {
3298 return server;
3299 }
3300+
3301+std::shared_ptr<mir::logging::Logger> const& MirConnection::the_logger() const
3302+{
3303+ return logger;
3304+}
3305
3306=== modified file 'src/client/mir_connection.h'
3307--- src/client/mir_connection.h 2014-08-29 13:12:16 +0000
3308+++ src/client/mir_connection.h 2014-10-10 13:43:10 +0000
3309@@ -134,6 +134,7 @@
3310 }
3311
3312 mir::protobuf::DisplayServer& display_server();
3313+ std::shared_ptr<mir::logging::Logger> const& the_logger() const;
3314
3315 private:
3316 // MUST be first data member so it is destroyed last.
3317
3318=== modified file 'src/client/mir_surface.cpp'
3319--- src/client/mir_surface.cpp 2014-08-04 16:58:57 +0000
3320+++ src/client/mir_surface.cpp 2014-10-10 13:43:10 +0000
3321@@ -24,6 +24,8 @@
3322 #include "mir_connection.h"
3323 #include "mir/input/input_receiver_thread.h"
3324 #include "mir/input/input_platform.h"
3325+#include "perf_report.h"
3326+#include "logging/perf_report.h"
3327
3328 #include <cassert>
3329 #include <unistd.h>
3330@@ -54,6 +56,18 @@
3331 buffer_depository(std::make_shared<mcl::ClientBufferDepository>(factory, mir::frontend::client_buffer_cache_size)),
3332 input_platform(input_platform)
3333 {
3334+ const char* report_target = getenv("MIR_CLIENT_PERF_REPORT");
3335+ if (report_target && !strcmp(report_target, "log"))
3336+ {
3337+ auto& logger = connection->the_logger();
3338+ perf_report = std::make_shared<mir::client::logging::PerfReport>(logger);
3339+ }
3340+ else
3341+ {
3342+ perf_report = std::make_shared<mir::client::NullPerfReport>();
3343+ }
3344+ perf_report->name_surface(params.name);
3345+
3346 for (int i = 0; i < mir_surface_attribs; i++)
3347 attrib_cache[i] = -1;
3348
3349@@ -159,6 +173,7 @@
3350 release_cpu_region();
3351 auto const id = &surface.id();
3352 auto const mutable_buffer = surface.mutable_buffer();
3353+ perf_report->end_frame(mutable_buffer->buffer_id());
3354 lock.unlock();
3355
3356 next_buffer_wait_handle.expect_result();
3357@@ -209,6 +224,7 @@
3358 buffer_depository->deposit_package(std::move(ipc_package),
3359 buffer.buffer_id(),
3360 surface_size, surface_pf);
3361+ perf_report->begin_frame(buffer.buffer_id());
3362 }
3363 catch (const std::runtime_error& err)
3364 {
3365
3366=== modified file 'src/client/mir_surface.h'
3367--- src/client/mir_surface.h 2014-07-21 03:35:31 +0000
3368+++ src/client/mir_surface.h 2014-10-10 13:43:10 +0000
3369@@ -47,6 +47,7 @@
3370 namespace client
3371 {
3372 class ClientBuffer;
3373+class PerfReport;
3374
3375 struct MemoryRegion;
3376 }
3377@@ -139,6 +140,7 @@
3378
3379 std::function<void(MirEvent const*)> handle_event_callback;
3380 std::shared_ptr<mir::input::receiver::InputReceiverThread> input_thread;
3381+ std::shared_ptr<mir::client::PerfReport> perf_report;
3382 };
3383
3384 #endif /* MIR_CLIENT_PRIVATE_MIR_WAIT_HANDLE_H_ */
3385
3386=== added file 'src/client/perf_report.h'
3387--- src/client/perf_report.h 1970-01-01 00:00:00 +0000
3388+++ src/client/perf_report.h 2014-10-10 13:43:10 +0000
3389@@ -0,0 +1,47 @@
3390+/*
3391+ * Copyright © 2014 Canonical Ltd.
3392+ *
3393+ * This program is free software: you can redistribute it and/or modify it
3394+ * under the terms of the GNU Lesser General Public License version 3,
3395+ * as published by the Free Software Foundation.
3396+ *
3397+ * This program is distributed in the hope that it will be useful,
3398+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3399+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3400+ * GNU Lesser General Public License for more details.
3401+ *
3402+ * You should have received a copy of the GNU Lesser General Public License
3403+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3404+ *
3405+ * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
3406+ */
3407+
3408+#ifndef MIR_CLIENT_PERF_REPORT_H_
3409+#define MIR_CLIENT_PERF_REPORT_H_
3410+
3411+namespace mir
3412+{
3413+namespace client
3414+{
3415+
3416+class PerfReport
3417+{
3418+public:
3419+ virtual ~PerfReport() = default;
3420+ virtual void name_surface(char const*) = 0;
3421+ virtual void begin_frame(int buffer_id) = 0;
3422+ virtual void end_frame(int buffer_id) = 0;
3423+};
3424+
3425+class NullPerfReport : public PerfReport
3426+{
3427+public:
3428+ virtual void name_surface(char const*) {}
3429+ void begin_frame(int) override {}
3430+ void end_frame(int) override {}
3431+};
3432+
3433+} // namespace client
3434+} // namespace mir
3435+
3436+#endif // MIR_CLIENT_PERF_REPORT_H_
3437
3438=== added file 'src/client/periodic_perf_report.cpp'
3439--- src/client/periodic_perf_report.cpp 1970-01-01 00:00:00 +0000
3440+++ src/client/periodic_perf_report.cpp 2014-10-10 13:43:10 +0000
3441@@ -0,0 +1,98 @@
3442+/*
3443+ * Copyright © 2014 Canonical Ltd.
3444+ *
3445+ * This program is free software: you can redistribute it and/or modify it
3446+ * under the terms of the GNU Lesser General Public License version 3,
3447+ * as published by the Free Software Foundation.
3448+ *
3449+ * This program is distributed in the hope that it will be useful,
3450+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3451+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3452+ * GNU Lesser General Public License for more details.
3453+ *
3454+ * You should have received a copy of the GNU Lesser General Public License
3455+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3456+ *
3457+ * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
3458+ */
3459+
3460+#include "periodic_perf_report.h"
3461+
3462+using namespace mir::client;
3463+
3464+PeriodicPerfReport::PeriodicPerfReport(mir::time::Duration period,
3465+ std::shared_ptr<mir::time::Clock> const& clock)
3466+ : clock(clock)
3467+ , report_interval(period)
3468+ , last_report_time(current_time())
3469+{
3470+}
3471+
3472+PeriodicPerfReport::Timestamp PeriodicPerfReport::current_time() const
3473+{
3474+ return clock->sample();
3475+}
3476+
3477+void PeriodicPerfReport::name_surface(char const* s)
3478+{
3479+ name = s ? s : "?";
3480+}
3481+
3482+void PeriodicPerfReport::begin_frame(int buffer_id)
3483+{
3484+ frame_begin_time = current_time();
3485+
3486+ if (buffer_end_time.find(buffer_id) != buffer_end_time.end())
3487+ {
3488+ // Estimate page flip (composition finished) time as the time we
3489+ // eventually get the same buffer back.
3490+ auto estimated_page_flip_time = frame_begin_time;
3491+ auto buffer_queue_latency = estimated_page_flip_time -
3492+ buffer_end_time[buffer_id];
3493+ buffer_queue_latency_sum += buffer_queue_latency;
3494+ }
3495+}
3496+
3497+void PeriodicPerfReport::end_frame(int buffer_id)
3498+{
3499+ auto now = buffer_end_time[buffer_id] = current_time();
3500+ auto render_time = now - frame_begin_time;
3501+ render_time_sum += render_time;
3502+ ++frame_count;
3503+
3504+ auto interval = now - last_report_time;
3505+
3506+ if (interval >= report_interval)
3507+ { // Precision matters. Don't use floats.
3508+ using namespace std::chrono;
3509+
3510+ // FPS x 100, remembering to keep millisecond accuracy.
3511+ long fps_100 = frame_count * 100000L /
3512+ duration_cast<milliseconds>(interval).count();
3513+
3514+ auto render_time_avg = render_time_sum / frame_count;
3515+ auto queue_lag_avg = buffer_queue_latency_sum / frame_count;
3516+
3517+ // Remove history of old buffer ids
3518+ auto i = buffer_end_time.begin();
3519+ while (i != buffer_end_time.end())
3520+ {
3521+ if ((now - i->second) >= report_interval)
3522+ i = buffer_end_time.erase(i);
3523+ else
3524+ ++i;
3525+ }
3526+ int nbuffers = buffer_end_time.size();
3527+
3528+ display(name.c_str(), fps_100,
3529+ duration_cast<microseconds>(render_time_avg).count(),
3530+ duration_cast<microseconds>(queue_lag_avg).count(),
3531+ nbuffers);
3532+
3533+ last_report_time = now;
3534+ frame_count = 0;
3535+ render_time_sum = render_time_sum.zero();
3536+ buffer_queue_latency_sum = buffer_queue_latency_sum.zero();
3537+ }
3538+}
3539+
3540
3541=== added file 'src/client/periodic_perf_report.h'
3542--- src/client/periodic_perf_report.h 1970-01-01 00:00:00 +0000
3543+++ src/client/periodic_perf_report.h 2014-10-10 13:43:10 +0000
3544@@ -0,0 +1,64 @@
3545+/*
3546+ * Copyright © 2014 Canonical Ltd.
3547+ *
3548+ * This program is free software: you can redistribute it and/or modify it
3549+ * under the terms of the GNU Lesser General Public License version 3,
3550+ * as published by the Free Software Foundation.
3551+ *
3552+ * This program is distributed in the hope that it will be useful,
3553+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3554+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3555+ * GNU Lesser General Public License for more details.
3556+ *
3557+ * You should have received a copy of the GNU Lesser General Public License
3558+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3559+ *
3560+ * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
3561+ */
3562+
3563+#ifndef MIR_CLIENT_PERIODIC_PERF_REPORT_H_
3564+#define MIR_CLIENT_PERIODIC_PERF_REPORT_H_
3565+
3566+#include "perf_report.h"
3567+#include "mir/time/clock.h"
3568+#include <chrono>
3569+#include <memory>
3570+#include <string>
3571+#include <unordered_map>
3572+
3573+namespace mir
3574+{
3575+namespace client
3576+{
3577+
3578+class PeriodicPerfReport : public PerfReport
3579+{
3580+public:
3581+ PeriodicPerfReport(mir::time::Duration period,
3582+ std::shared_ptr<mir::time::Clock> const& clock);
3583+ void name_surface(char const*) override;
3584+ void begin_frame(int buffer_id) override;
3585+ void end_frame(int buffer_id) override;
3586+ virtual void display(const char *name, long fps100,
3587+ long rendertime_usec, long lag_usec,
3588+ int nbuffers) const = 0;
3589+private:
3590+ typedef mir::time::Duration Duration;
3591+ typedef mir::time::Timestamp Timestamp;
3592+ Timestamp current_time() const;
3593+ std::shared_ptr<mir::time::Clock> const clock;
3594+ Duration const report_interval;
3595+ std::string name;
3596+ Timestamp last_report_time;
3597+ Timestamp frame_begin_time;
3598+ Timestamp frame_end_time;
3599+ Duration render_time_sum = Duration::zero();
3600+ Duration buffer_queue_latency_sum = Duration::zero();
3601+ int frame_count = 0;
3602+ std::unordered_map<int,Timestamp> buffer_end_time;
3603+};
3604+
3605+} // namespace client
3606+} // namespace mir
3607+
3608+#endif // MIR_CLIENT_PERIODIC_PERF_REPORT_H_
3609
3610=== modified file 'src/client/rpc/make_socket_rpc_channel.cpp'
3611--- src/client/rpc/make_socket_rpc_channel.cpp 2014-07-21 03:35:31 +0000
3612+++ src/client/rpc/make_socket_rpc_channel.cpp 2014-10-10 13:43:10 +0000
3613@@ -52,7 +52,7 @@
3614 if (fd_prefix.is_start_of(name))
3615 {
3616 auto const fd = atoi(name.c_str()+fd_prefix.size);
3617- transport = std::unique_ptr<mclr::StreamTransport>{new mclr::StreamSocketTransport{fd}};
3618+ transport = std::unique_ptr<mclr::StreamTransport>{new mclr::StreamSocketTransport{mir::Fd{fd}}};
3619 }
3620 else
3621 {
3622
3623=== modified file 'src/client/rpc/mir_protobuf_rpc_channel.cpp'
3624--- src/client/rpc/mir_protobuf_rpc_channel.cpp 2014-07-23 20:59:29 +0000
3625+++ src/client/rpc/mir_protobuf_rpc_channel.cpp 2014-10-10 13:43:10 +0000
3626@@ -93,7 +93,7 @@
3627
3628 if (response->fds_on_side_channel() > 0)
3629 {
3630- std::vector<int32_t> fds(response->fds_on_side_channel());
3631+ std::vector<mir::Fd> fds(response->fds_on_side_channel());
3632 transport->receive_data(dummy.data(), dummy.size(), fds);
3633 for (auto &fd: fds)
3634 response->add_fd(fd);
3635
3636=== modified file 'src/client/rpc/null_rpc_report.cpp'
3637--- src/client/rpc/null_rpc_report.cpp 2014-07-21 03:35:31 +0000
3638+++ src/client/rpc/null_rpc_report.cpp 2014-10-10 13:43:10 +0000
3639@@ -81,7 +81,7 @@
3640
3641 void mclr::NullRpcReport::file_descriptors_received(
3642 google::protobuf::Message const& /*response*/,
3643- std::vector<int32_t> const& /*fds*/)
3644+ std::vector<mir::Fd> const& /*fds*/)
3645 {
3646 }
3647
3648
3649=== modified file 'src/client/rpc/null_rpc_report.h'
3650--- src/client/rpc/null_rpc_report.h 2014-07-21 03:35:31 +0000
3651+++ src/client/rpc/null_rpc_report.h 2014-10-10 13:43:10 +0000
3652@@ -50,7 +50,7 @@
3653 std::exception const& ex) override;
3654
3655 void file_descriptors_received(google::protobuf::Message const& response,
3656- std::vector<int32_t> const& fds) override;
3657+ std::vector<Fd> const& fds) override;
3658
3659 void connection_failure(std::exception const& ex) override;
3660 };
3661
3662=== modified file 'src/client/rpc/rpc_report.h'
3663--- src/client/rpc/rpc_report.h 2014-07-21 03:35:31 +0000
3664+++ src/client/rpc/rpc_report.h 2014-10-10 13:43:10 +0000
3665@@ -19,9 +19,10 @@
3666 #ifndef MIR_CLIENT_RPC_RPC_REPORT_H_
3667 #define MIR_CLIENT_RPC_RPC_REPORT_H_
3668
3669-#include <mir_toolkit/event.h>
3670+#include "mir_toolkit/event.h"
3671 #include <boost/system/error_code.hpp>
3672 #include <google/protobuf/message.h>
3673+#include "mir/fd.h"
3674
3675 namespace mir
3676 {
3677@@ -64,7 +65,7 @@
3678 std::exception const& ex) = 0;
3679
3680 virtual void file_descriptors_received(google::protobuf::Message const& response,
3681- std::vector<int32_t> const& fds) = 0;
3682+ std::vector<mir::Fd> const& fds) = 0;
3683
3684 virtual void connection_failure(std::exception const& ex) = 0;
3685
3686
3687=== modified file 'src/client/rpc/stream_socket_transport.cpp'
3688--- src/client/rpc/stream_socket_transport.cpp 2014-07-17 08:06:31 +0000
3689+++ src/client/rpc/stream_socket_transport.cpp 2014-10-10 13:43:10 +0000
3690@@ -19,6 +19,7 @@
3691 #include "stream_socket_transport.h"
3692 #include "mir/variable_length_array.h"
3693 #include "mir/thread_name.h"
3694+#include "mir/fd_socket_transmission.h"
3695
3696 #include <system_error>
3697
3698@@ -32,41 +33,9 @@
3699 #include <boost/exception/errinfo_errno.hpp>
3700 #include <boost/throw_exception.hpp>
3701
3702-
3703-
3704 namespace mclr = mir::client::rpc;
3705
3706-namespace {
3707-class socket_error : public std::system_error
3708-{
3709-public:
3710- socket_error(std::string const& message)
3711- : std::system_error(errno, std::system_category(), message)
3712- {
3713- }
3714-};
3715-
3716-
3717-class socket_disconnected_error : public std::system_error
3718-{
3719-public:
3720- socket_disconnected_error(std::string const& message)
3721- : std::system_error(errno, std::system_category(), message)
3722- {
3723- }
3724-};
3725-
3726-class fd_reception_error : public std::runtime_error
3727-{
3728-public:
3729- fd_reception_error()
3730- : std::runtime_error("Invalid control message for receiving file descriptors")
3731- {
3732- }
3733-};
3734-}
3735-
3736-mclr::StreamSocketTransport::StreamSocketTransport(int fd)
3737+mclr::StreamSocketTransport::StreamSocketTransport(mir::Fd const& fd)
3738 : socket_fd{fd}
3739 {
3740 init();
3741@@ -94,11 +63,6 @@
3742 observers.push_back(observer);
3743 }
3744
3745-static bool socket_error_is_transient(int error_code)
3746-{
3747- return (error_code == EINTR);
3748-}
3749-
3750 void mclr::StreamSocketTransport::receive_data(void* buffer, size_t bytes_requested)
3751 {
3752 /*
3753@@ -165,91 +129,15 @@
3754 }
3755 }
3756
3757-void mclr::StreamSocketTransport::receive_data(void* buffer, size_t bytes_requested, std::vector<int>& fds)
3758-{
3759- if (bytes_requested == 0)
3760- {
3761- BOOST_THROW_EXCEPTION(std::logic_error("Attempted to receive 0 bytes"));
3762- }
3763- size_t bytes_read{0};
3764- unsigned fds_read{0};
3765- while (bytes_read < bytes_requested)
3766- {
3767- // Store the data in the buffer requested
3768- struct iovec iov;
3769- iov.iov_base = static_cast<uint8_t*>(buffer) + bytes_read;
3770- iov.iov_len = bytes_requested - bytes_read;
3771-
3772- // Allocate space for control message
3773- static auto const builtin_n_fds = 5;
3774- static auto const builtin_cmsg_space = CMSG_SPACE(builtin_n_fds * sizeof(int));
3775- auto const fds_bytes = (fds.size() - fds_read) * sizeof(int);
3776- mir::VariableLengthArray<builtin_cmsg_space> control{CMSG_SPACE(fds_bytes)};
3777-
3778- // Message to read
3779- struct msghdr header;
3780- header.msg_name = NULL;
3781- header.msg_namelen = 0;
3782- header.msg_iov = &iov;
3783- header.msg_iovlen = 1;
3784- header.msg_controllen = control.size();
3785- header.msg_control = control.data();
3786- header.msg_flags = 0;
3787-
3788- ssize_t const result = recvmsg(socket_fd, &header, MSG_NOSIGNAL | MSG_WAITALL);
3789- if (result == 0)
3790- {
3791- notify_disconnected();
3792- BOOST_THROW_EXCEPTION(std::runtime_error("Failed to read message from server: server has shutdown"));
3793- }
3794- if (result < 0)
3795- {
3796- if (socket_error_is_transient(errno))
3797- {
3798- continue;
3799- }
3800- if (errno == EPIPE)
3801- {
3802- notify_disconnected();
3803- BOOST_THROW_EXCEPTION(
3804- boost::enable_error_info(socket_disconnected_error("Failed to read message from server"))
3805- << boost::errinfo_errno(errno));
3806- }
3807- BOOST_THROW_EXCEPTION(
3808- boost::enable_error_info(socket_error("Failed to read message from server"))
3809- << boost::errinfo_errno(errno));
3810- }
3811-
3812- bytes_read += result;
3813-
3814- // If we get a proper control message, copy the received
3815- // file descriptors back to the caller
3816- struct cmsghdr const* const cmsg = CMSG_FIRSTHDR(&header);
3817- if (cmsg)
3818- {
3819- // NOTE: This relies on the file descriptor cmsg being read
3820- // (and written) atomically.
3821- if (cmsg->cmsg_len > CMSG_LEN(fds_bytes) || (header.msg_flags & MSG_CTRUNC))
3822- {
3823- BOOST_THROW_EXCEPTION(std::runtime_error("Received more fds than expected"));
3824- }
3825- if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS)
3826- {
3827- BOOST_THROW_EXCEPTION(fd_reception_error());
3828- }
3829- int const* const data = reinterpret_cast<int const*>CMSG_DATA(cmsg);
3830- ptrdiff_t const header_size = reinterpret_cast<char const*>(data) - reinterpret_cast<char const*>(cmsg);
3831- int const nfds = (cmsg->cmsg_len - header_size) / sizeof(int);
3832- for (int i = 0; i < nfds; i++)
3833- fds[fds_read + i] = data[i];
3834-
3835- fds_read += nfds;
3836- }
3837- }
3838- if (fds_read < fds.size())
3839- {
3840- BOOST_THROW_EXCEPTION(std::runtime_error("Receieved fewer fds than expected"));
3841- }
3842+void mclr::StreamSocketTransport::receive_data(void* buffer, size_t bytes_requested, std::vector<mir::Fd>& fds)
3843+try
3844+{
3845+ mir::receive_data(socket_fd, buffer, bytes_requested, fds);
3846+}
3847+catch (socket_disconnected_error &e)
3848+{
3849+ notify_disconnected();
3850+ throw e;
3851 }
3852
3853 void mclr::StreamSocketTransport::send_data(const std::vector<uint8_t>& buffer)
3854@@ -289,9 +177,9 @@
3855 // EPIPE behaviour; we don't want SIGPIPE when the IO loop terminates.
3856 int socket_fds[2];
3857 socketpair(AF_UNIX, SOCK_STREAM, 0, socket_fds);
3858- this->shutdown_fd = socket_fds[1];
3859+ this->shutdown_fd = mir::Fd{socket_fds[1]};
3860
3861- auto shutdown_fd = socket_fds[0];
3862+ auto shutdown_fd = mir::Fd{socket_fds[0]};
3863 io_service_thread = std::thread([this, shutdown_fd]
3864 {
3865 // Our IO threads must not receive any signals
3866@@ -385,13 +273,11 @@
3867 shutdown_requested = true;
3868 }
3869 }
3870- ::close(shutdown_fd);
3871- ::close(socket_fd);
3872 ::close(epoll_fd);
3873 });
3874 }
3875
3876-int mclr::StreamSocketTransport::open_socket(std::string const& path)
3877+mir::Fd mclr::StreamSocketTransport::open_socket(std::string const& path)
3878 {
3879 struct sockaddr_un socket_address;
3880 // Appease the almighty valgrind
3881@@ -401,7 +287,7 @@
3882 // Must be memcpy rather than strcpy, as abstract socket paths start with '\0'
3883 memcpy(socket_address.sun_path, path.data(), path.size());
3884
3885- int fd = socket(AF_UNIX, SOCK_STREAM, 0);
3886+ mir::Fd fd{socket(AF_UNIX, SOCK_STREAM, 0)};
3887 if (connect(fd, reinterpret_cast<sockaddr*>(&socket_address), sizeof(socket_address)) < 0)
3888 {
3889 BOOST_THROW_EXCEPTION(
3890
3891=== modified file 'src/client/rpc/stream_socket_transport.h'
3892--- src/client/rpc/stream_socket_transport.h 2014-07-17 04:11:07 +0000
3893+++ src/client/rpc/stream_socket_transport.h 2014-10-10 13:43:10 +0000
3894@@ -21,6 +21,7 @@
3895 #define STREAM_SOCKET_TRANSPORT_H_
3896
3897 #include "stream_transport.h"
3898+#include "mir/fd.h"
3899
3900 #include <thread>
3901 #include <mutex>
3902@@ -35,24 +36,24 @@
3903 class StreamSocketTransport : public StreamTransport
3904 {
3905 public:
3906- StreamSocketTransport(int fd);
3907+ StreamSocketTransport(Fd const& fd);
3908 StreamSocketTransport(std::string const& socket_path);
3909 ~StreamSocketTransport() override;
3910
3911 void register_observer(std::shared_ptr<Observer> const& observer) override;
3912 void receive_data(void* buffer, size_t bytes_requested) override;
3913- void receive_data(void* buffer, size_t bytes_requested, std::vector<int>& fds) override;
3914+ void receive_data(void* buffer, size_t bytes_requested, std::vector<Fd>& fds) override;
3915 void send_data(const std::vector<uint8_t> &buffer) override;
3916
3917 private:
3918 void init();
3919- int open_socket(std::string const& path);
3920+ Fd open_socket(std::string const& path);
3921 void notify_data_available();
3922 void notify_disconnected();
3923
3924 std::thread io_service_thread;
3925- int const socket_fd;
3926- int shutdown_fd;
3927+ Fd const socket_fd;
3928+ Fd shutdown_fd;
3929
3930 std::mutex observer_mutex;
3931 std::vector<std::shared_ptr<Observer>> observers;
3932
3933=== modified file 'src/client/rpc/stream_transport.h'
3934--- src/client/rpc/stream_transport.h 2014-07-17 04:11:07 +0000
3935+++ src/client/rpc/stream_transport.h 2014-10-10 13:43:10 +0000
3936@@ -24,6 +24,8 @@
3937 #include <memory>
3938 #include <stdint.h>
3939
3940+#include "mir/fd.h"
3941+
3942 namespace mir
3943 {
3944 namespace client
3945@@ -133,7 +135,7 @@
3946 *
3947 * \note This provides stream semantics - message boundaries are not preserved.
3948 */
3949- virtual void receive_data(void* buffer, size_t bytes_requested, std::vector<int>& fds) = 0;
3950+ virtual void receive_data(void* buffer, size_t bytes_requested, std::vector<Fd>& fds) = 0;
3951
3952 /**
3953 * \brief Write data to the server
3954
3955=== renamed directory 'src/shared' => 'src/common'
3956=== modified file 'src/common/CMakeLists.txt'
3957--- src/shared/CMakeLists.txt 2014-08-27 19:44:04 +0000
3958+++ src/common/CMakeLists.txt 2014-10-10 13:43:10 +0000
3959@@ -15,6 +15,8 @@
3960 add_subdirectory(env)
3961 add_subdirectory(sharedlibrary)
3962 add_subdirectory(thread)
3963+add_subdirectory(time)
3964+list(APPEND MIR_COMMON_SOURCES $<TARGET_OBJECTS:mirtime>)
3965
3966 set(PREFIX "${CMAKE_INSTALL_PREFIX}")
3967 set(EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")
3968@@ -40,7 +42,7 @@
3969 )
3970
3971 # TODO we need a place to manage ABI and related versioning but use this as placeholder
3972-set(MIRCOMMON_ABI 1)
3973+set(MIRCOMMON_ABI 2)
3974 set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)
3975
3976 set_target_properties(mircommon
3977@@ -53,7 +55,7 @@
3978 install(TARGETS mircommon LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
3979
3980 install(
3981- DIRECTORY ${CMAKE_SOURCE_DIR}/include/shared/mir ${CMAKE_SOURCE_DIR}/include/shared/mir_toolkit
3982+ DIRECTORY ${CMAKE_SOURCE_DIR}/include/common/mir ${CMAKE_SOURCE_DIR}/include/common/mir_toolkit
3983 DESTINATION "include/mircommon"
3984 )
3985
3986
3987=== modified file 'src/common/fd/CMakeLists.txt'
3988--- src/shared/fd/CMakeLists.txt 2014-07-24 11:41:11 +0000
3989+++ src/common/fd/CMakeLists.txt 2014-10-10 13:43:10 +0000
3990@@ -16,10 +16,11 @@
3991
3992 add_library(mirsharedfd OBJECT
3993 fd.cpp
3994+ fd_socket_transmission.cpp
3995 )
3996
3997 list(APPEND MIR_COMMON_SOURCES
3998 $<TARGET_OBJECTS:mirsharedfd>
3999 )
4000
4001-set(MIR_COMMON_SOURCES ${MIR_COMMON_SOURCES} PARENT_SCOPE)
4002\ No newline at end of file
4003+set(MIR_COMMON_SOURCES ${MIR_COMMON_SOURCES} PARENT_SCOPE)
4004
4005=== added file 'src/common/fd/fd_socket_transmission.cpp'
4006--- src/common/fd/fd_socket_transmission.cpp 1970-01-01 00:00:00 +0000
4007+++ src/common/fd/fd_socket_transmission.cpp 2014-10-10 13:43:10 +0000
4008@@ -0,0 +1,177 @@
4009+/*
4010+ * Copyright © 2014 Canonical Ltd.
4011+ *
4012+ * This program is free software: you can redistribute it and/or modify it
4013+ * under the terms of the GNU Lesser General Public License version 3,
4014+ * as published by the Free Software Foundation.
4015+ *
4016+ * This program is distributed in the hope that it will be useful,
4017+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4018+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4019+ * GNU Lesser General Public License for more details.
4020+ *
4021+ * You should have received a copy of the GNU Lesser General Public License
4022+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4023+ *
4024+ * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
4025+ */
4026+
4027+#include "mir/fd_socket_transmission.h"
4028+#include "mir/variable_length_array.h"
4029+#include <sys/types.h>
4030+#include <sys/socket.h>
4031+#include <string.h>
4032+#include <boost/throw_exception.hpp>
4033+#include <boost/exception/errinfo_errno.hpp>
4034+#include <stdexcept>
4035+
4036+mir::socket_error::socket_error(std::string const& message) :
4037+ std::system_error(errno, std::system_category(), message)
4038+{
4039+}
4040+
4041+mir::socket_disconnected_error::socket_disconnected_error(std::string const& message) :
4042+ std::system_error(errno, std::system_category(), message)
4043+{
4044+}
4045+
4046+mir::fd_reception_error::fd_reception_error() :
4047+ std::runtime_error("Invalid control message for receiving file descriptors")
4048+{
4049+}
4050+
4051+void mir::send_fds(
4052+ mir::Fd const& socket,
4053+ std::vector<mir::Fd> const& fds)
4054+{
4055+ if (fds.size() > 0)
4056+ {
4057+ // We send dummy data
4058+ struct iovec iov;
4059+ char dummy_iov_data = 'M';
4060+ iov.iov_base = &dummy_iov_data;
4061+ iov.iov_len = 1;
4062+
4063+ // Allocate space for control message
4064+ static auto const builtin_n_fds = 5;
4065+ static auto const builtin_cmsg_space = CMSG_SPACE(builtin_n_fds * sizeof(int));
4066+ auto const fds_bytes = fds.size() * sizeof(int);
4067+ mir::VariableLengthArray<builtin_cmsg_space> control{CMSG_SPACE(fds_bytes)};
4068+ // Silence valgrind uninitialized memory complaint
4069+ memset(control.data(), 0, control.size());
4070+
4071+ // Message to send
4072+ struct msghdr header;
4073+ header.msg_name = NULL;
4074+ header.msg_namelen = 0;
4075+ header.msg_iov = &iov;
4076+ header.msg_iovlen = 1;
4077+ header.msg_controllen = control.size();
4078+ header.msg_control = control.data();
4079+ header.msg_flags = 0;
4080+
4081+ // Control message contains file descriptors
4082+ struct cmsghdr *message = CMSG_FIRSTHDR(&header);
4083+ message->cmsg_len = CMSG_LEN(fds_bytes);
4084+ message->cmsg_level = SOL_SOCKET;
4085+ message->cmsg_type = SCM_RIGHTS;
4086+
4087+ int* const data = reinterpret_cast<int*>(CMSG_DATA(message));
4088+ int i = 0;
4089+ for (auto& fd : fds)
4090+ data[i++] = fd;
4091+
4092+ auto const sent = sendmsg(socket, &header, 0);
4093+ if (sent < 0)
4094+ BOOST_THROW_EXCEPTION(std::runtime_error("Failed to send fds: " + std::string(strerror(errno))));
4095+ }
4096+}
4097+
4098+bool mir::socket_error_is_transient(int error_code)
4099+{
4100+ return (error_code == EINTR);
4101+}
4102+
4103+void mir::receive_data(mir::Fd const& socket, void* buffer, size_t bytes_requested, std::vector<mir::Fd>& fds)
4104+{
4105+ if (bytes_requested == 0)
4106+ BOOST_THROW_EXCEPTION(std::logic_error("Attempted to receive 0 bytes"));
4107+
4108+ size_t bytes_read{0};
4109+ unsigned fds_read{0};
4110+ while (bytes_read < bytes_requested)
4111+ {
4112+ // Store the data in the buffer requested
4113+ struct iovec iov;
4114+ iov.iov_base = static_cast<uint8_t*>(buffer) + bytes_read;
4115+ iov.iov_len = bytes_requested - bytes_read;
4116+
4117+ // Allocate space for control message
4118+ static auto const builtin_n_fds = 5;
4119+ static auto const builtin_cmsg_space = CMSG_SPACE(builtin_n_fds * sizeof(int));
4120+ auto const fds_bytes = (fds.size() - fds_read) * sizeof(int);
4121+ mir::VariableLengthArray<builtin_cmsg_space> control{CMSG_SPACE(fds_bytes)};
4122+
4123+ // Message to read
4124+ struct msghdr header;
4125+ header.msg_name = NULL;
4126+ header.msg_namelen = 0;
4127+ header.msg_iov = &iov;
4128+ header.msg_iovlen = 1;
4129+ header.msg_controllen = control.size();
4130+ header.msg_control = control.data();
4131+ header.msg_flags = 0;
4132+
4133+ ssize_t const result = recvmsg(socket, &header, MSG_NOSIGNAL | MSG_WAITALL);
4134+ if (result == 0)
4135+ BOOST_THROW_EXCEPTION(socket_disconnected_error("Failed to read message from server: server has shutdown"));
4136+ if (result < 0)
4137+ {
4138+ if (socket_error_is_transient(errno))
4139+ continue;
4140+ if (errno == EPIPE)
4141+ BOOST_THROW_EXCEPTION(
4142+ boost::enable_error_info(socket_disconnected_error("Failed to read message from server"))
4143+ << boost::errinfo_errno(errno));
4144+
4145+ BOOST_THROW_EXCEPTION(
4146+ boost::enable_error_info(socket_error("Failed to read message from server"))
4147+ << boost::errinfo_errno(errno));
4148+ }
4149+
4150+ bytes_read += result;
4151+
4152+ // If we get a proper control message, copy the received
4153+ // file descriptors back to the caller
4154+ struct cmsghdr const* const cmsg = CMSG_FIRSTHDR(&header);
4155+ if (cmsg)
4156+ {
4157+ // NOTE: This relies on the file descriptor cmsg being read
4158+ // (and written) atomically.
4159+ if (cmsg->cmsg_len > CMSG_LEN(fds_bytes) || (header.msg_flags & MSG_CTRUNC))
4160+ {
4161+ BOOST_THROW_EXCEPTION(std::runtime_error("Received more fds than expected"));
4162+ }
4163+ if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS)
4164+ {
4165+ BOOST_THROW_EXCEPTION(fd_reception_error());
4166+ }
4167+ int const* const data = reinterpret_cast<int const*>CMSG_DATA(cmsg);
4168+ ptrdiff_t const header_size = reinterpret_cast<char const*>(data) - reinterpret_cast<char const*>(cmsg);
4169+ int const nfds = (cmsg->cmsg_len - header_size) / sizeof(int);
4170+
4171+ // We can't properly pass mir::Fds through google::protobuf::Message,
4172+ // which is where these get shoved.
4173+ //
4174+ // When we have our own RPC generator plugin and aren't using deprecated
4175+ // Protobuf features this can go away.
4176+ for (int i = 0; i < nfds; i++)
4177+ fds[fds_read + i] = mir::Fd{mir::IntOwnedFd{data[i]}};
4178+
4179+ fds_read += nfds;
4180+ }
4181+ }
4182+
4183+ if (fds_read < fds.size())
4184+ BOOST_THROW_EXCEPTION(std::runtime_error("Receieved fewer fds than expected"));
4185+}
4186
4187=== modified file 'src/common/input/android/android_input_receiver.cpp'
4188--- src/shared/input/android/android_input_receiver.cpp 2014-08-29 13:25:18 +0000
4189+++ src/common/input/android/android_input_receiver.cpp 2014-10-10 13:43:10 +0000
4190@@ -90,18 +90,26 @@
4191 * consumeBatches = true, so as to ensure the "cooked" event rate that
4192 * clients experience is at least the minimum of event_rate_hz
4193 * and the raw device event rate.
4194- * frame_time = A regular interval of 60Hz. This provides a virtual frame
4195+ * frame_time = A regular interval. This provides a virtual frame
4196 * interval during which InputConsumer will collect raw events,
4197- * resample them and emit a "cooked" event back to us at least every
4198+ * resample them and emit a "cooked" event back to us at roughly every
4199 * 60th of a second. "cooked" events are both smoothed and
4200 * extrapolated/predicted into the future (for tool=finger) giving the
4201 * appearance of lower latency. Getting a real frame time from the
4202 * graphics logic (which is messy) does not appear to be necessary to
4203 * gain significant benefit.
4204+ *
4205+ * Note event_rate_hz is only 55Hz. This allows rendering to catch up and
4206+ * overtake the event rate every ~12th frame (200ms) on a 60Hz display.
4207+ * Thus on every 12th+1 frame, there will be zero buffer lag in responding
4208+ * to the cooked input event we have given the client.
4209+ * This phase control is useful as it eliminates the one frame of lag you
4210+ * would otherwise never catch up to if the event rate was exactly the same
4211+ * as the display refresh rate.
4212 */
4213
4214 nsecs_t const now = android_clock(SYSTEM_TIME_MONOTONIC);
4215- int const event_rate_hz = 60;
4216+ int const event_rate_hz = 55;
4217 nsecs_t const one_frame = 1000000000ULL / event_rate_hz;
4218 nsecs_t frame_time = (now / one_frame) * one_frame;
4219
4220@@ -141,15 +149,11 @@
4221 }
4222 else if (input_consumer->hasPendingBatch())
4223 {
4224- /*
4225- * A batch is pending and must be completed or else the client could
4226- * be starved of events. But don't hurry. A continuous motion gesture
4227- * will wake us up much sooner than 50ms. This timeout is only reached
4228- * in the case that motion has ended (fingers lifted).
4229- */
4230- std::chrono::milliseconds const motion_idle_timeout(50);
4231- if (timeout.count() < 0 || timeout > motion_idle_timeout)
4232- reduced_timeout = motion_idle_timeout;
4233+ // When in constant motion we will usually "hasPendingBatch".
4234+ // But the batch won't get flushed until the next frame interval,
4235+ // so be sure to use a non-zero sleep time to avoid spinning the CPU
4236+ // for the whole interval...
4237+ reduced_timeout = std::chrono::milliseconds(1);
4238 }
4239
4240 auto result = looper->pollOnce(reduced_timeout.count());
4241
4242=== modified file 'src/common/logging/CMakeLists.txt'
4243--- src/shared/logging/CMakeLists.txt 2014-07-24 11:30:35 +0000
4244+++ src/common/logging/CMakeLists.txt 2014-10-10 13:43:10 +0000
4245@@ -17,6 +17,7 @@
4246 add_library(mirsharedlogging OBJECT
4247 dumb_console_logger.cpp
4248 input_timestamp.cpp
4249+ shared_library_prober_report.cpp
4250 )
4251
4252 list(APPEND MIR_COMMON_SOURCES
4253
4254=== added file 'src/common/logging/shared_library_prober_report.cpp'
4255--- src/common/logging/shared_library_prober_report.cpp 1970-01-01 00:00:00 +0000
4256+++ src/common/logging/shared_library_prober_report.cpp 2014-10-10 13:43:10 +0000
4257@@ -0,0 +1,58 @@
4258+
4259+/*
4260+ * Copyright © 2014 Canonical Ltd.
4261+ *
4262+ * This program is free software: you can redistribute it and/or modify
4263+ * it under the terms of the GNU Lesser General Public License version 3 as
4264+ * published by the Free Software Foundation.
4265+ *
4266+ * This program is distributed in the hope that it will be useful,
4267+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4268+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4269+ * GNU Lesser General Public License for more details.
4270+ *
4271+ * You should have received a copy of the GNU Lesser General Public License
4272+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4273+ *
4274+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
4275+ */
4276+
4277+#include "mir/logging/shared_library_prober_report.h"
4278+#include "mir/logging/logger.h"
4279+
4280+namespace ml = mir::logging;
4281+
4282+ml::SharedLibraryProberReport::SharedLibraryProberReport(std::shared_ptr<Logger> const& logger)
4283+ : logger{logger}
4284+{
4285+}
4286+
4287+void ml::SharedLibraryProberReport::probing_path(boost::filesystem::path const& path)
4288+{
4289+ logger->log(ml::Logger::Severity::informational,
4290+ std::string("Loading modules from: ") + path.string(),
4291+ "Loader");
4292+}
4293+
4294+void ml::SharedLibraryProberReport::probing_failed(boost::filesystem::path const& path, std::exception const& error)
4295+{
4296+ logger->log(ml::Logger::Severity::error,
4297+ std::string("Failed to load libraries from path: ") + path.string() +
4298+ " (error was:" + error.what() + ")",
4299+ "Loader");
4300+}
4301+
4302+void ml::SharedLibraryProberReport::loading_library(boost::filesystem::path const& filename)
4303+{
4304+ logger->log(ml::Logger::Severity::informational,
4305+ std::string("Loading module: ") + filename.string(),
4306+ "Loader");
4307+}
4308+
4309+void ml::SharedLibraryProberReport::loading_failed(boost::filesystem::path const& filename, std::exception const& error)
4310+{
4311+ logger->log(ml::Logger::Severity::warning,
4312+ std::string("Failed to load module: ") + filename.string() +
4313+ " (error was:" + error.what() + ")",
4314+ "Loader");
4315+}
4316
4317=== modified file 'src/common/protobuf/mir_protobuf.proto'
4318--- src/shared/protobuf/mir_protobuf.proto 2014-07-21 03:35:31 +0000
4319+++ src/common/protobuf/mir_protobuf.proto 2014-10-10 13:43:10 +0000
4320@@ -25,6 +25,11 @@
4321 required int32 value = 1;
4322 };
4323
4324+message BufferRequest {
4325+ optional SurfaceId id = 1;
4326+ optional Buffer buffer = 2;
4327+};
4328+
4329 message Buffer {
4330 optional int32 buffer_id = 1;
4331 repeated sint32 fd = 2;
4332@@ -221,4 +226,5 @@
4333
4334 rpc start_prompt_session(PromptSessionParameters) returns (Void);
4335 rpc stop_prompt_session(Void) returns (Void);
4336+ rpc exchange_buffer(BufferRequest) returns (Buffer);
4337 }
4338
4339=== modified file 'src/common/sharedlibrary/CMakeLists.txt'
4340--- src/shared/sharedlibrary/CMakeLists.txt 2014-07-24 11:30:35 +0000
4341+++ src/common/sharedlibrary/CMakeLists.txt 2014-10-10 13:43:10 +0000
4342@@ -16,6 +16,7 @@
4343
4344 add_library(mirsharedsharedlibrary OBJECT
4345 shared_library.cpp
4346+ shared_library_prober.cpp
4347 )
4348
4349 list(APPEND MIR_COMMON_SOURCES
4350
4351=== modified file 'src/common/sharedlibrary/shared_library.cpp'
4352--- src/shared/sharedlibrary/shared_library.cpp 2014-03-06 06:05:17 +0000
4353+++ src/common/sharedlibrary/shared_library.cpp 2014-10-10 13:43:10 +0000
4354@@ -53,3 +53,15 @@
4355 BOOST_THROW_EXCEPTION(std::runtime_error(dlerror()));
4356 }
4357 }
4358+
4359+void* mir::SharedLibrary::load_symbol(char const* function_name, char const* version) const
4360+{
4361+ if (void* result = dlvsym(so, function_name, version))
4362+ {
4363+ return result;
4364+ }
4365+ else
4366+ {
4367+ BOOST_THROW_EXCEPTION(std::runtime_error(dlerror()));
4368+ }
4369+}
4370
4371=== added file 'src/common/sharedlibrary/shared_library_prober.cpp'
4372--- src/common/sharedlibrary/shared_library_prober.cpp 1970-01-01 00:00:00 +0000
4373+++ src/common/sharedlibrary/shared_library_prober.cpp 2014-10-10 13:43:10 +0000
4374@@ -0,0 +1,74 @@
4375+/*
4376+ * Copyright © 2014 Canonical Ltd.
4377+ *
4378+ * This program is free software: you can redistribute it and/or modify it
4379+ * under the terms of the GNU Lesser General Public License version 3,
4380+ * as published by the Free Software Foundation.
4381+ *
4382+ * This program is distributed in the hope that it will be useful,
4383+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4384+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4385+ * GNU Lesser General Public License for more details.
4386+ *
4387+ * You should have received a copy of the GNU Lesser General Public License
4388+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4389+ *
4390+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
4391+ */
4392+
4393+#include "mir/shared_library_prober.h"
4394+#include "mir/shared_library.h"
4395+
4396+#include <system_error>
4397+#include <boost/filesystem.hpp>
4398+
4399+namespace
4400+{
4401+std::error_code boost_to_std_error(boost::system::error_code const& ec)
4402+{
4403+ if (ec)
4404+ {
4405+ if (ec.category() != boost::system::system_category())
4406+ {
4407+ throw std::logic_error{"Boost error from unexpected category: " +
4408+ ec.message()};
4409+ }
4410+ return std::error_code{ec.value(), std::system_category()};
4411+ }
4412+ return std::error_code{};
4413+}
4414+}
4415+
4416+std::vector<std::shared_ptr<mir::SharedLibrary>>
4417+mir::libraries_for_path(std::string const& path, mir::SharedLibraryProberReport& report)
4418+{
4419+ report.probing_path(path);
4420+ // We use the error_code overload because we want to throw a std::system_error
4421+ boost::system::error_code ec;
4422+
4423+ boost::filesystem::directory_iterator iterator{path, ec};
4424+ if (ec)
4425+ {
4426+ std::system_error error{boost_to_std_error(ec)};
4427+ report.probing_failed(path, error);
4428+ throw error;
4429+ }
4430+
4431+ std::vector<std::shared_ptr<mir::SharedLibrary>> libraries;
4432+ for (; iterator != boost::filesystem::directory_iterator() ; ++iterator)
4433+ {
4434+ if (iterator->path().extension().string() == ".so")
4435+ {
4436+ try
4437+ {
4438+ report.loading_library(iterator->path());
4439+ libraries.emplace_back(std::make_shared<mir::SharedLibrary>(iterator->path().string()));
4440+ }
4441+ catch (std::runtime_error const& err)
4442+ {
4443+ report.loading_failed(iterator->path(), err);
4444+ }
4445+ }
4446+ }
4447+ return libraries;
4448+}
4449
4450=== modified file 'src/common/symbols.map'
4451--- src/shared/symbols.map 2014-08-26 15:02:57 +0000
4452+++ src/common/symbols.map 2014-10-10 13:43:10 +0000
4453@@ -1,8 +1,8 @@
4454-MIR_COMMON_1 {
4455+MIR_COMMON_2 {
4456 global:
4457 extern "C++" {
4458 # The following symbols come from running a script over the generated docs. Vis:
4459-# ../tools/process_doygen_xml.py doc/xml/*.xml | grep "^mircommon public" | sed "s/mircommon public: / /" | sort
4460+# ../tools/process_doxygen_xml.py doc/xml/*.xml | grep "^mircommon public" | sed "s/mircommon public: / /" | sort
4461 mir_arrow_cursor_name*;
4462 mir_busy_cursor_name*;
4463 mir_caret_cursor_name*;
4464@@ -130,12 +130,19 @@
4465 mir::input::receiver::XKBMapper::update_state_and_map_event*;
4466 mir::input::receiver::XKBMapper::?XKBMapper*;
4467 mir::input::receiver::XKBMapper::XKBMapper*;
4468+ mir::libraries_for_path*;
4469 mir::logging::DumbConsoleLogger::log*;
4470 mir::logging::input_timestamp*;
4471 mir::logging::Logger::log*;
4472 mir::logging::Logger::?Logger*;
4473 mir::logging::Logger::Logger*;
4474 mir::logging::Logger::operator*;
4475+ mir::logging::SharedLibraryProberReport::?SharedLibraryProberReport*;
4476+ mir::logging::SharedLibraryProberReport::SharedLibraryProberReport*;
4477+ mir::logging::SharedLibraryProberReport::probing_path*;
4478+ mir::logging::SharedLibraryProberReport::probing_failed*;
4479+ mir::logging::SharedLibraryProberReport::loading_library*;
4480+ mir::logging::SharedLibraryProberReport::loading_failed*;
4481 mir_omnidirectional_resize_cursor_name*;
4482 mir_open_hand_cursor_name*;
4483 mir_pointing_hand_cursor_name*;
4484@@ -160,6 +167,23 @@
4485 mir::protobuf::Buffer::MergeFrom*;
4486 mir::protobuf::Buffer::MergePartialFromCodedStream*;
4487 mir::protobuf::Buffer::New*;
4488+ mir::protobuf::BufferRequest::?BufferRequest*;
4489+ mir::protobuf::BufferRequest::BufferRequest*;
4490+ mir::protobuf::BufferRequest::ByteSize*;
4491+ mir::protobuf::BufferRequest::Clear*;
4492+ mir::protobuf::BufferRequest::CopyFrom*;
4493+ mir::protobuf::BufferRequest::default_instance*;
4494+ mir::protobuf::BufferRequest::descriptor*;
4495+ mir::protobuf::BufferRequest::GetMetadata*;
4496+ mir::protobuf::BufferRequest::IsInitialized*;
4497+ mir::protobuf::BufferRequest::kBufferFieldNumber*;
4498+ mir::protobuf::BufferRequest::kIdFieldNumber*;
4499+ mir::protobuf::BufferRequest::MergeFrom*;
4500+ mir::protobuf::BufferRequest::MergePartialFromCodedStream*;
4501+ mir::protobuf::BufferRequest::New*;
4502+ mir::protobuf::BufferRequest::SerializeWithCachedSizes*;
4503+ mir::protobuf::BufferRequest::SerializeWithCachedSizesToArray*;
4504+ mir::protobuf::BufferRequest::Swap*;
4505 mir::protobuf::Buffer::SerializeWithCachedSizes*;
4506 mir::protobuf::Buffer::SerializeWithCachedSizesToArray*;
4507 mir::protobuf::Buffer::Swap*;
4508@@ -330,6 +354,7 @@
4509 mir::protobuf::DisplayServer::disconnect*;
4510 mir::protobuf::DisplayServer::?DisplayServer*;
4511 mir::protobuf::DisplayServer::drm_auth_magic*;
4512+ mir::protobuf::DisplayServer::exchange_buffer*;
4513 mir::protobuf::DisplayServer::GetDescriptor*;
4514 mir::protobuf::DisplayServer::GetRequestPrototype*;
4515 mir::protobuf::DisplayServer::GetResponsePrototype*;
4516@@ -350,6 +375,7 @@
4517 mir::protobuf::DisplayServer_Stub::?DisplayServer_Stub*;
4518 mir::protobuf::DisplayServer_Stub::DisplayServer_Stub*;
4519 mir::protobuf::DisplayServer_Stub::drm_auth_magic*;
4520+ mir::protobuf::DisplayServer_Stub::exchange_buffer*;
4521 mir::protobuf::DisplayServer_Stub::new_fds_for_prompt_providers*;
4522 mir::protobuf::DisplayServer_Stub::next_buffer*;
4523 mir::protobuf::DisplayServer_Stub::release_screencast*;
4524@@ -807,6 +833,7 @@
4525 typeinfo?for?MirKeyEvent;
4526 typeinfo?for?mir::logging::DumbConsoleLogger;
4527 typeinfo?for?mir::logging::Logger;
4528+ typeinfo?for?mir::logging::SharedLibraryProberReport;
4529 typeinfo?for?MirMesaEGLNativeDisplay;
4530 typeinfo?for?MirMesaEGLNativeSurface;
4531 typeinfo?for?MirMotionEvent;
4532@@ -899,6 +926,7 @@
4533 vtable?for?MirKeyEvent;
4534 vtable?for?mir::logging::DumbConsoleLogger;
4535 vtable?for?mir::logging::Logger;
4536+ vtable?for?mir::logging::SharedLibraryProberReport;
4537 vtable?for?MirMesaEGLNativeDisplay;
4538 vtable?for?MirMesaEGLNativeSurface;
4539 vtable?for?MirMotionEvent;
4540@@ -954,6 +982,41 @@
4541 vtable?for?mir::udev::Enumerator;
4542 vtable?for?mir::udev::Enumerator::iterator;
4543 vtable?for?mir::udev::Monitor;
4544+
4545+ mir::time::Clock::?Clock*;
4546+ mir::time::Clock::Clock*;
4547+ mir::time::Clock::sample*;
4548+ non-virtual?thunk?to?mir::time::Clock::?Clock*;
4549+ typeinfo?for?mir::time::Clock;
4550+ vtable?for?mir::time::Clock;
4551+
4552+ mir::time::HighResolutionClock::sample*;
4553+ non-virtual?thunk?to?mir::time::HighResolutionClock::sample*;
4554+ typeinfo?for?mir::time::HighResolutionClock;
4555+ vtable?for?mir::time::HighResolutionClock;
4556+ };
4557+ local: *;
4558+};
4559+
4560+MIR_COMMON_2.1 {
4561+ global:
4562+ extern "C++" {
4563+ mir::send_fds*;
4564+ };
4565+ local: *;
4566+};
4567+
4568+MIR_COMMON_2.2 {
4569+ global:
4570+ extern "C++" {
4571+ mir::fd_reception_error::fd_reception_error*;
4572+ mir::receive_data*;
4573+ mir::socket_error::socket_error*;
4574+ mir::socket_error_is_transient*;
4575+ mir::socket_disconnected_error*;
4576+ typeinfo?for?mir::fd_reception_error;
4577+ typeinfo?for?mir::socket_error;
4578+ typeinfo?for?mir::socket_disconnected_error;
4579 };
4580 local: *;
4581 };
4582
4583=== renamed directory 'src/server/time' => 'src/common/time'
4584=== modified file 'src/common/time/high_resolution_clock.cpp'
4585--- src/server/time/high_resolution_clock.cpp 2013-04-24 05:22:20 +0000
4586+++ src/common/time/high_resolution_clock.cpp 2014-10-10 13:43:10 +0000
4587@@ -2,15 +2,15 @@
4588 * Copyright © 2013 Canonical Ltd.
4589 *
4590 * This program is free software: you can redistribute it and/or modify it
4591- * under the terms of the GNU General Public License version 3,
4592+ * under the terms of the GNU Lesser General Public License version 3,
4593 * as published by the Free Software Foundation.
4594 *
4595 * This program is distributed in the hope that it will be useful,
4596 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4597 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4598- * GNU General Public License for more details.
4599+ * GNU Lesser General Public License for more details.
4600 *
4601- * You should have received a copy of the GNU General Public License
4602+ * You should have received a copy of the GNU Lesser General Public License
4603 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4604 *
4605 * Authored by: Alan Griffiths <alan@octopull.co.uk>
4606
4607=== added directory 'src/include'
4608=== added directory 'src/include/common'
4609=== added directory 'src/include/common/mir'
4610=== renamed file 'include/shared/mir/basic_observers.h' => 'src/include/common/mir/basic_observers.h'
4611--- include/shared/mir/basic_observers.h 2014-07-11 14:59:41 +0000
4612+++ src/include/common/mir/basic_observers.h 2014-10-10 13:43:10 +0000
4613@@ -95,7 +95,7 @@
4614 !current_item->next.compare_exchange_weak(expected, new_item);
4615 expected = nullptr)
4616 {
4617- current_item = expected;
4618+ if (expected) current_item = expected;
4619 }
4620 }
4621
4622
4623=== renamed file 'include/shared/mir/default_configuration.h' => 'src/include/common/mir/default_configuration.h'
4624=== added file 'src/include/common/mir/fd_socket_transmission.h'
4625--- src/include/common/mir/fd_socket_transmission.h 1970-01-01 00:00:00 +0000
4626+++ src/include/common/mir/fd_socket_transmission.h 2014-10-10 13:43:10 +0000
4627@@ -0,0 +1,47 @@
4628+/*
4629+ * Copyright © 2014 Canonical Ltd.
4630+ *
4631+ * This program is free software: you can redistribute it and/or modify it
4632+ * under the terms of the GNU Lesser General Public License version 3,
4633+ * as published by the Free Software Foundation.
4634+ *
4635+ * This program is distributed in the hope that it will be useful,
4636+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4637+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4638+ * GNU Lesser General Public License for more details.
4639+ *
4640+ * You should have received a copy of the GNU Lesser General Public License
4641+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4642+ *
4643+ * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
4644+ */
4645+
4646+#ifndef MIR_FD_SOCKET_TRANSMISSION_H_
4647+#define MIR_FD_SOCKET_TRANSMISSION_H_
4648+#include "mir/fd.h"
4649+#include <vector>
4650+#include <system_error>
4651+#include <stdexcept>
4652+
4653+namespace mir
4654+{
4655+struct socket_error : std::system_error
4656+{
4657+ socket_error(std::string const& message);
4658+};
4659+
4660+struct socket_disconnected_error : std::system_error
4661+{
4662+ socket_disconnected_error(std::string const& message);
4663+};
4664+
4665+struct fd_reception_error : std::runtime_error
4666+{
4667+ fd_reception_error();
4668+};
4669+
4670+bool socket_error_is_transient(int error_code);
4671+void send_fds(mir::Fd const& socket, std::vector<mir::Fd> const& fd);
4672+void receive_data(mir::Fd const& socket, void* buffer, size_t bytes_requested, std::vector<mir::Fd>& fds);
4673+}
4674+#endif /* MIR_FD_SOCKET_TRANSMISSION_H_ */
4675
4676=== added directory 'src/include/common/mir/frontend'
4677=== renamed file 'include/shared/mir/frontend/client_constants.h' => 'src/include/common/mir/frontend/client_constants.h'
4678=== added directory 'src/include/common/mir/geometry'
4679=== renamed file 'include/shared/mir/geometry/displacement.h' => 'src/include/common/mir/geometry/displacement.h'
4680--- include/shared/mir/geometry/displacement.h 2014-03-06 06:05:17 +0000
4681+++ src/include/common/mir/geometry/displacement.h 2014-10-10 13:43:10 +0000
4682@@ -19,8 +19,8 @@
4683 #ifndef MIR_GEOMETRY_DISPLACEMENT_H_
4684 #define MIR_GEOMETRY_DISPLACEMENT_H_
4685
4686-#include "dimensions.h"
4687-#include "point.h"
4688+#include "mir/geometry/dimensions.h"
4689+#include "mir/geometry/point.h"
4690
4691 #include <iosfwd>
4692
4693
4694=== renamed file 'include/shared/mir/geometry/forward.h' => 'src/include/common/mir/geometry/forward.h'
4695=== renamed file 'include/shared/mir/geometry/length.h' => 'src/include/common/mir/geometry/length.h'
4696=== added directory 'src/include/common/mir/graphics'
4697=== added directory 'src/include/common/mir/graphics/android'
4698=== renamed file 'include/shared/mir/graphics/android/android_driver_interpreter.h' => 'src/include/common/mir/graphics/android/android_driver_interpreter.h'
4699=== renamed file 'include/shared/mir/graphics/android/android_native_buffer.h' => 'src/include/common/mir/graphics/android/android_native_buffer.h'
4700=== renamed file 'include/shared/mir/graphics/android/fence.h' => 'src/include/common/mir/graphics/android/fence.h'
4701=== renamed file 'include/shared/mir/graphics/android/mir_native_window.h' => 'src/include/common/mir/graphics/android/mir_native_window.h'
4702=== renamed file 'include/shared/mir/graphics/android/native_buffer.h' => 'src/include/common/mir/graphics/android/native_buffer.h'
4703=== renamed file 'include/shared/mir/graphics/android/sync_fence.h' => 'src/include/common/mir/graphics/android/sync_fence.h'
4704=== added directory 'src/include/common/mir/input'
4705=== added directory 'src/include/common/mir/input/android'
4706=== renamed file 'include/shared/mir/input/android/android_input_lexicon.h' => 'src/include/common/mir/input/android/android_input_lexicon.h'
4707=== renamed file 'include/shared/mir/input/input_receiver_report.h' => 'src/include/common/mir/input/input_receiver_report.h'
4708=== renamed file 'include/shared/mir/input/null_input_receiver_report.h' => 'src/include/common/mir/input/null_input_receiver_report.h'
4709=== renamed file 'include/shared/mir/input/xkb_mapper.h' => 'src/include/common/mir/input/xkb_mapper.h'
4710=== added directory 'src/include/common/mir/logging'
4711=== renamed file 'include/shared/mir/logging/dumb_console_logger.h' => 'src/include/common/mir/logging/dumb_console_logger.h'
4712=== renamed file 'include/shared/mir/logging/input_timestamp.h' => 'src/include/common/mir/logging/input_timestamp.h'
4713=== renamed file 'include/shared/mir/logging/logger.h' => 'src/include/common/mir/logging/logger.h'
4714=== added file 'src/include/common/mir/logging/null_shared_library_prober_report.h'
4715--- src/include/common/mir/logging/null_shared_library_prober_report.h 1970-01-01 00:00:00 +0000
4716+++ src/include/common/mir/logging/null_shared_library_prober_report.h 2014-10-10 13:43:10 +0000
4717@@ -0,0 +1,49 @@
4718+/*
4719+ * Copyright © 2014 Canonical Ltd.
4720+ *
4721+ * This program is free software: you can redistribute it and/or modify
4722+ * it under the terms of the GNU Lesser General Public License version 3 as
4723+ * published by the Free Software Foundation.
4724+ *
4725+ * This program is distributed in the hope that it will be useful,
4726+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4727+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4728+ * GNU Lesser General Public License for more details.
4729+ *
4730+ * You should have received a copy of the GNU Lesser General Public License
4731+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4732+ *
4733+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
4734+ */
4735+
4736+#ifndef MIR_LOGGING_NULL_SHARED_LIBRARY_PROBER_REPORT_H_
4737+#define MIR_LOGGING_NULL_SHARED_LIBRARY_PROBER_REPORT_H_
4738+
4739+#include "mir/shared_library_prober_report.h"
4740+
4741+namespace mir
4742+{
4743+namespace logging
4744+{
4745+
4746+class NullSharedLibraryProberReport : public mir::SharedLibraryProberReport
4747+{
4748+public:
4749+ void probing_path(boost::filesystem::path const& /*path*/) override
4750+ {
4751+ }
4752+ void probing_failed(boost::filesystem::path const& /*path*/, std::exception const& /*error*/) override
4753+ {
4754+ }
4755+ void loading_library(boost::filesystem::path const& /*filename*/) override
4756+ {
4757+ }
4758+ void loading_failed(boost::filesystem::path const& /*filename*/, std::exception const& /*error*/) override
4759+ {
4760+ }
4761+};
4762+
4763+}
4764+}
4765+
4766+#endif /* MIR_LOGGING_NULL_SHARED_LIBRARY_PROBER_REPORT_H_ */
4767
4768=== added file 'src/include/common/mir/logging/shared_library_prober_report.h'
4769--- src/include/common/mir/logging/shared_library_prober_report.h 1970-01-01 00:00:00 +0000
4770+++ src/include/common/mir/logging/shared_library_prober_report.h 2014-10-10 13:43:10 +0000
4771@@ -0,0 +1,48 @@
4772+/*
4773+ * Copyright © 2014 Canonical Ltd.
4774+ *
4775+ * This program is free software: you can redistribute it and/or modify
4776+ * it under the terms of the GNU Lesser General Public License version 3 as
4777+ * published by the Free Software Foundation.
4778+ *
4779+ * This program is distributed in the hope that it will be useful,
4780+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4781+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4782+ * GNU Lesser General Public License for more details.
4783+ *
4784+ * You should have received a copy of the GNU Lesser General Public License
4785+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4786+ *
4787+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
4788+ */
4789+
4790+#ifndef MIR_LOGGING_SHARED_LIBRARY_PROBER_REPORT_H_
4791+#define MIR_LOGGING_SHARED_LIBRARY_PROBER_REPORT_H_
4792+
4793+#include "mir/shared_library_prober_report.h"
4794+#include <memory>
4795+
4796+namespace mir
4797+{
4798+namespace logging
4799+{
4800+class Logger;
4801+
4802+class SharedLibraryProberReport : public mir::SharedLibraryProberReport
4803+{
4804+public:
4805+ SharedLibraryProberReport(std::shared_ptr<Logger> const& logger);
4806+
4807+ void probing_path(boost::filesystem::path const& path) override;
4808+ void probing_failed(boost::filesystem::path const& path, std::exception const& error) override;
4809+ void loading_library(boost::filesystem::path const& filename) override;
4810+ void loading_failed(boost::filesystem::path const& filename, std::exception const& error) override;
4811+
4812+private:
4813+ std::shared_ptr<Logger> const logger;
4814+};
4815+
4816+}
4817+}
4818+
4819+#endif /* MIR_LOGGING_SHARED_LIBRARY_PROBER_REPORT_H_ */
4820
4821=== added directory 'src/include/common/mir/protobuf'
4822=== renamed file 'include/shared/mir/protobuf/google_protobuf_guard.h' => 'src/include/common/mir/protobuf/google_protobuf_guard.h'
4823=== renamed file 'include/shared/mir/raii.h' => 'src/include/common/mir/raii.h'
4824=== renamed file 'include/shared/mir/recursive_read_write_mutex.h' => 'src/include/common/mir/recursive_read_write_mutex.h'
4825=== added directory 'src/include/common/mir/report'
4826=== added directory 'src/include/common/mir/report/lttng'
4827=== renamed file 'include/shared/mir/report/lttng/mir_tracepoint.h' => 'src/include/common/mir/report/lttng/mir_tracepoint.h'
4828--- include/shared/mir/report/lttng/mir_tracepoint.h 2014-03-06 06:05:17 +0000
4829+++ src/include/common/mir/report/lttng/mir_tracepoint.h 2014-10-10 13:43:10 +0000
4830@@ -19,23 +19,6 @@
4831 #ifndef MIR_LTTNG_MIR_TRACEPOINT_H_
4832 #define MIR_LTTNG_MIR_TRACEPOINT_H_
4833
4834-/*
4835- * The STAP_PROBEV() macro from sdt.h (SystemTap) used by
4836- * the tracepoint() macro from lttng/tracepoint.h fails to
4837- * build with clang at the moment. Disable tracepoints
4838- * when building with clang until this is resolved.
4839- *
4840- * See: http://sourceware.org/bugzilla/show_bug.cgi?id=13974
4841- */
4842-#ifdef __clang__
4843-namespace mir_systemtap_bug_13974
4844-{
4845-inline void mir_tracepoint_consume_args(int, ...) {}
4846-}
4847-#define mir_tracepoint(c, e, ...) ::mir_systemtap_bug_13974::mir_tracepoint_consume_args(0, __VA_ARGS__)
4848-#pragma message "Building with clang: Disabling LTTng tracepoints."
4849-#else
4850 #define mir_tracepoint(c, ...) tracepoint(c, __VA_ARGS__)
4851-#endif
4852
4853 #endif /* MIR_LTTNG_MIR_TRACEPOINT_H_ */
4854
4855=== renamed file 'include/shared/mir/report/lttng/tracepoint_provider.h' => 'src/include/common/mir/report/lttng/tracepoint_provider.h'
4856=== renamed file 'include/shared/mir/shared_library.h' => 'src/include/common/mir/shared_library.h'
4857--- include/shared/mir/shared_library.h 2014-03-26 05:48:59 +0000
4858+++ src/include/common/mir/shared_library.h 2014-10-10 13:43:10 +0000
4859@@ -43,9 +43,18 @@
4860 {
4861 return load_function<FunctionPtr>(function_name.c_str());
4862 }
4863+
4864+ template<typename FunctionPtr>
4865+ FunctionPtr load_function(std::string const& function_name, std::string const& version) const
4866+ {
4867+ FunctionPtr result{};
4868+ (void*&)result = load_symbol(function_name.c_str(), version.c_str());
4869+ return result;
4870+ }
4871 private:
4872 void* const so;
4873 void* load_symbol(char const* function_name) const;
4874+ void* load_symbol(char const* function_name, char const* version) const;
4875 SharedLibrary(SharedLibrary const&) = delete;
4876 SharedLibrary& operator=(SharedLibrary const&) = delete;
4877 };
4878
4879=== added file 'src/include/common/mir/shared_library_prober.h'
4880--- src/include/common/mir/shared_library_prober.h 1970-01-01 00:00:00 +0000
4881+++ src/include/common/mir/shared_library_prober.h 2014-10-10 13:43:10 +0000
4882@@ -0,0 +1,36 @@
4883+/*
4884+ * Copyright © 2014 Canonical Ltd.
4885+ *
4886+ * This program is free software: you can redistribute it and/or modify it
4887+ * under the terms of the GNU Lesser General Public License version 3,
4888+ * as published by the Free Software Foundation.
4889+ *
4890+ * This program is distributed in the hope that it will be useful,
4891+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4892+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4893+ * GNU Lesser General Public License for more details.
4894+ *
4895+ * You should have received a copy of the GNU Lesser General Public License
4896+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4897+ *
4898+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
4899+ */
4900+
4901+#ifndef MIR_SHARED_LIBRARY_PROBER_H_
4902+#define MIR_SHARED_LIBRARY_PROBER_H_
4903+
4904+#include "shared_library_prober_report.h"
4905+
4906+#include <string>
4907+#include <vector>
4908+#include <memory>
4909+
4910+namespace mir
4911+{
4912+class SharedLibrary;
4913+
4914+std::vector<std::shared_ptr<SharedLibrary>> libraries_for_path(std::string const& path, SharedLibraryProberReport& report);
4915+}
4916+
4917+
4918+#endif /* MIR_SHARED_LIBRARY_PROBER_H_ */
4919
4920=== added file 'src/include/common/mir/shared_library_prober_report.h'
4921--- src/include/common/mir/shared_library_prober_report.h 1970-01-01 00:00:00 +0000
4922+++ src/include/common/mir/shared_library_prober_report.h 2014-10-10 13:43:10 +0000
4923@@ -0,0 +1,44 @@
4924+/*
4925+ * Copyright © 2014 Canonical Ltd.
4926+ *
4927+ * This program is free software: you can redistribute it and/or modify it
4928+ * under the terms of the GNU Lesser General Public License version 3,
4929+ * as published by the Free Software Foundation.
4930+ *
4931+ * This program is distributed in the hope that it will be useful,
4932+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4933+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4934+ * GNU Lesser General Public License for more details.
4935+ *
4936+ * You should have received a copy of the GNU Lesser General Public License
4937+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4938+ *
4939+ * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
4940+ */
4941+
4942+#ifndef MIR_SHARED_LIBRARY_PROBER_REPORT_H_
4943+#define MIR_SHARED_LIBRARY_PROBER_REPORT_H_
4944+
4945+#include <boost/filesystem.hpp>
4946+
4947+namespace mir
4948+{
4949+class SharedLibraryProberReport
4950+{
4951+public:
4952+ virtual ~SharedLibraryProberReport() = default;
4953+
4954+ virtual void probing_path(boost::filesystem::path const& path) = 0;
4955+ virtual void probing_failed(boost::filesystem::path const& path, std::exception const& error) = 0;
4956+ virtual void loading_library(boost::filesystem::path const& filename) = 0;
4957+ virtual void loading_failed(boost::filesystem::path const& filename, std::exception const& error) = 0;
4958+
4959+protected:
4960+ SharedLibraryProberReport() = default;
4961+ SharedLibraryProberReport(SharedLibraryProberReport const&) = delete;
4962+ SharedLibraryProberReport& operator=(SharedLibraryProberReport const&) = delete;
4963+};
4964+}
4965+
4966+
4967+#endif /* MIR_SHARED_LIBRARY_PROBER_REPORT_H_ */
4968
4969=== renamed file 'include/shared/mir/thread_name.h' => 'src/include/common/mir/thread_name.h'
4970=== added directory 'src/include/common/mir/time'
4971=== renamed file 'include/server/mir/time/high_resolution_clock.h' => 'src/include/common/mir/time/high_resolution_clock.h'
4972--- include/server/mir/time/high_resolution_clock.h 2014-03-06 06:05:17 +0000
4973+++ src/include/common/mir/time/high_resolution_clock.h 2014-10-10 13:43:10 +0000
4974@@ -2,15 +2,15 @@
4975 * Copyright © 2013 Canonical Ltd.
4976 *
4977 * This program is free software: you can redistribute it and/or modify it
4978- * under the terms of the GNU General Public License version 3,
4979+ * under the terms of the GNU Lesser General Public License version 3,
4980 * as published by the Free Software Foundation.
4981 *
4982 * This program is distributed in the hope that it will be useful,
4983 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4984 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4985- * GNU General Public License for more details.
4986+ * GNU Lesser General Public License for more details.
4987 *
4988- * You should have received a copy of the GNU General Public License
4989+ * You should have received a copy of the GNU Lesser General Public License
4990 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4991 *
4992 * Authored by: Alan Griffiths <alan@octopull.co.uk>
4993
4994=== added directory 'src/include/common/mir/udev'
4995=== renamed file 'include/shared/mir/udev/wrapper.h' => 'src/include/common/mir/udev/wrapper.h'
4996=== renamed file 'include/shared/mir/variable_length_array.h' => 'src/include/common/mir/variable_length_array.h'
4997=== added directory 'src/include/platform'
4998=== added directory 'src/include/platform/mir'
4999=== renamed file 'include/platform/mir/emergency_cleanup_registry.h' => 'src/include/platform/mir/emergency_cleanup_registry.h'
5000=== added directory 'src/include/platform/mir/graphics'
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: