diff --git a/include/platform/mir/graphics/platform.h b/include/platform/mir/graphics/platform.h index 398b26675f2..4f8373bbc58 100644 --- a/include/platform/mir/graphics/platform.h +++ b/include/platform/mir/graphics/platform.h @@ -41,7 +41,6 @@ class Surface; namespace options { class Option; -class ProgramOption; } namespace renderer::software { @@ -564,13 +563,13 @@ typedef void(*AddPlatformOptions)( typedef std::vector(*PlatformProbe)( std::shared_ptr const&, std::shared_ptr const&, - mir::options::ProgramOption const& options); + mir::options::Option const& options); typedef std::vector(*RenderProbe)( std::span> const&, mir::ConsoleServices&, std::shared_ptr const&, - mir::options::ProgramOption const&); + mir::options::Option const&); typedef mir::ModuleProperties const*(*DescribeModule)(); } @@ -628,13 +627,13 @@ void add_graphics_platform_options( auto probe_display_platform( std::shared_ptr const& console, std::shared_ptr const& udev, - mir::options::ProgramOption const& options) -> std::vector; + mir::options::Option const& options) -> std::vector; auto probe_rendering_platform( std::span> const& targets, mir::ConsoleServices& console, std::shared_ptr const& udev, - mir::options::ProgramOption const& options) -> std::vector; + mir::options::Option const& options) -> std::vector; mir::ModuleProperties const* describe_graphics_module(); diff --git a/src/platforms/eglstream-kms/server/platform_symbols.cpp b/src/platforms/eglstream-kms/server/platform_symbols.cpp index 8b30182e57e..367e6fc2472 100644 --- a/src/platforms/eglstream-kms/server/platform_symbols.cpp +++ b/src/platforms/eglstream-kms/server/platform_symbols.cpp @@ -94,7 +94,7 @@ auto probe_rendering_platform( std::span> const& displays, mir::ConsoleServices& /*console*/, std::shared_ptr const& udev, - mo::ProgramOption const& /*options*/) -> std::vector + mo::Option const& /*options*/) -> std::vector { mir::assert_entry_point_signature(&probe_rendering_platform); @@ -312,7 +312,7 @@ mir::UniqueModulePtr create_display_platform( auto probe_display_platform( std::shared_ptr const& console, std::shared_ptr const& udev, - mo::ProgramOption const&) -> std::vector + mo::Option const&) -> std::vector { mir::assert_entry_point_signature(&probe_display_platform); diff --git a/src/platforms/gbm-kms/server/kms/platform_symbols.cpp b/src/platforms/gbm-kms/server/kms/platform_symbols.cpp index e2c5002a05b..b2d0c132327 100644 --- a/src/platforms/gbm-kms/server/kms/platform_symbols.cpp +++ b/src/platforms/gbm-kms/server/kms/platform_symbols.cpp @@ -116,7 +116,7 @@ class MinimalGLConfig : public mir::graphics::GLConfig auto probe_display_platform( std::shared_ptr const& console, std::shared_ptr const& udev, - mir::options::ProgramOption const& options) -> std::vector + mir::options::Option const& options) -> std::vector { mir::assert_entry_point_signature(&probe_display_platform); @@ -310,7 +310,7 @@ auto probe_rendering_platform( std::span> const& platforms, mir::ConsoleServices&, std::shared_ptr const& udev, - mir::options::ProgramOption const& options) -> std::vector + mir::options::Option const& options) -> std::vector { mir::assert_entry_point_signature(&probe_rendering_platform); diff --git a/src/platforms/renderer-generic-egl/platform_symbols.cpp b/src/platforms/renderer-generic-egl/platform_symbols.cpp index 6ab4d67992c..be7eb90444b 100644 --- a/src/platforms/renderer-generic-egl/platform_symbols.cpp +++ b/src/platforms/renderer-generic-egl/platform_symbols.cpp @@ -55,7 +55,7 @@ auto probe_rendering_platform( std::span> const& displays, mir::ConsoleServices&, std::shared_ptr const&, - mo::ProgramOption const&) -> std::vector + mo::Option const&) -> std::vector { mir::assert_entry_point_signature(&probe_rendering_platform); diff --git a/src/platforms/virtual/graphics.cpp b/src/platforms/virtual/graphics.cpp index 0c7ff1cd4cd..204f78918cf 100644 --- a/src/platforms/virtual/graphics.cpp +++ b/src/platforms/virtual/graphics.cpp @@ -68,7 +68,7 @@ void add_graphics_platform_options(boost::program_options::options_description& auto probe_display_platform( std::shared_ptr const&, std::shared_ptr const&, - mo::ProgramOption const& options) -> std::vector + mo::Option const& options) -> std::vector { mir::assert_entry_point_signature(&probe_display_platform); std::vector result; diff --git a/src/platforms/wayland/platform_symbols.cpp b/src/platforms/wayland/platform_symbols.cpp index 5d183133f9d..7d94ff113a2 100644 --- a/src/platforms/wayland/platform_symbols.cpp +++ b/src/platforms/wayland/platform_symbols.cpp @@ -59,7 +59,7 @@ void add_graphics_platform_options(boost::program_options::options_description& } auto probe_graphics_platform( - mo::ProgramOption const& options) -> std::optional + mo::Option const& options) -> std::optional { if (mpw::connection_options_supplied(options)) { @@ -75,7 +75,7 @@ auto probe_graphics_platform( auto probe_display_platform( std::shared_ptr const&, std::shared_ptr const&, - mo::ProgramOption const& options) -> std::vector + mo::Option const& options) -> std::vector { mir::assert_entry_point_signature(&probe_display_platform); if (auto probe = probe_graphics_platform(options)) diff --git a/src/platforms/x11/graphics/graphics.cpp b/src/platforms/x11/graphics/graphics.cpp index 516c9e98235..fd802f8b5c1 100644 --- a/src/platforms/x11/graphics/graphics.cpp +++ b/src/platforms/x11/graphics/graphics.cpp @@ -100,7 +100,7 @@ auto probe_graphics_platform() -> std::optional auto probe_display_platform( std::shared_ptr const&, std::shared_ptr const&, - mir::options::ProgramOption const&) -> std::vector + mir::options::Option const&) -> std::vector { mir::assert_entry_point_signature(&probe_display_platform); if (auto probe = probe_graphics_platform()) diff --git a/src/server/graphics/default_configuration.cpp b/src/server/graphics/default_configuration.cpp index 0e59be5db14..5db02e1d707 100644 --- a/src/server/graphics/default_configuration.cpp +++ b/src/server/graphics/default_configuration.cpp @@ -235,7 +235,7 @@ auto mir::DefaultServerConfiguration::the_rendering_platforms() -> graphics::probe_rendering_module( display_targets, *platform, - dynamic_cast(*the_options()), + *the_options(), the_console_services()); bool found_supported_device{false}; @@ -261,7 +261,7 @@ auto mir::DefaultServerConfiguration::the_rendering_platforms() -> } else { - platform_modules = mir::graphics::rendering_modules_for_device(platforms, display_targets, dynamic_cast(*the_options()), the_console_services()); + platform_modules = mir::graphics::rendering_modules_for_device(platforms, display_targets, *the_options(), the_console_services()); } for (auto const& [device, platform]: platform_modules) diff --git a/src/server/graphics/platform_probe.cpp b/src/server/graphics/platform_probe.cpp index 55eeface8f6..430972670d4 100644 --- a/src/server/graphics/platform_probe.cpp +++ b/src/server/graphics/platform_probe.cpp @@ -84,7 +84,7 @@ auto probe_module( auto mir::graphics::probe_display_module( SharedLibrary const& module, - options::ProgramOption const& options, + options::Option const& options, std::shared_ptr const& console) -> std::vector { return probe_module( @@ -102,7 +102,7 @@ auto mir::graphics::probe_display_module( auto mir::graphics::probe_rendering_module( std::span> const& platforms, SharedLibrary const& module, - options::ProgramOption const& options, + options::Option const& options, std::shared_ptr const& console) -> std::vector { return probe_module( @@ -269,7 +269,7 @@ auto mg::modules_for_device( auto mir::graphics::display_modules_for_device( std::vector> const& modules, - options::ProgramOption const& options, + options::Option const& options, std::shared_ptr const& console) -> std::vector>> { return modules_for_device( @@ -284,7 +284,7 @@ auto mir::graphics::display_modules_for_device( auto mir::graphics::rendering_modules_for_device( std::vector> const& modules, std::span> const& platforms, - options::ProgramOption const& options, + options::Option const& options, std::shared_ptr const& console) -> std::vector>> { return modules_for_device( @@ -467,7 +467,7 @@ auto mg::select_display_modules( auto supported_devices = graphics::probe_display_module( *platform, - dynamic_cast(options), + options, console); bool found_supported_device{false}; @@ -513,13 +513,13 @@ auto mg::select_display_modules( // We don't need to probe the virtual platform; that is done separately below. platforms.erase(virtual_platform_pos); } - platform_modules = display_modules_for_device(platforms, dynamic_cast(options), console); + platform_modules = display_modules_for_device(platforms, options, console); } if (virtual_platform) { auto virtual_probe = probe_display_module( - *virtual_platform, dynamic_cast(options), console); + *virtual_platform, options, console); if (virtual_probe.size() && virtual_probe.front().support_level >= mg::probe::supported) { platform_modules.emplace_back(std::move(virtual_probe.front()), std::move(virtual_platform)); diff --git a/src/server/graphics/platform_probe.h b/src/server/graphics/platform_probe.h index 24286c84e07..55276048449 100644 --- a/src/server/graphics/platform_probe.h +++ b/src/server/graphics/platform_probe.h @@ -46,25 +46,25 @@ auto modules_for_device( auto probe_display_module( SharedLibrary const& module, - options::ProgramOption const& options, + options::Option const& options, std::shared_ptr const& console) -> std::vector; auto probe_rendering_module( std::span> const& platforms, SharedLibrary const& module, - options::ProgramOption const& options, + options::Option const& options, std::shared_ptr const& console) -> std::vector; auto display_modules_for_device( std::vector> const& modules, - options::ProgramOption const& options, + options::Option const& options, std::shared_ptr const& console) -> std::vector>>; auto rendering_modules_for_device( std::vector> const& modules, std::span> const& platforms, - options::ProgramOption const& options, + options::Option const& options, std::shared_ptr const& console) -> std::vector>>; diff --git a/tests/mir_test_framework/platform_graphics_dummy.cpp b/tests/mir_test_framework/platform_graphics_dummy.cpp index 3651ffa526c..abc93280dbe 100644 --- a/tests/mir_test_framework/platform_graphics_dummy.cpp +++ b/tests/mir_test_framework/platform_graphics_dummy.cpp @@ -23,16 +23,12 @@ namespace mg = mir::graphics; namespace mir { -namespace options -{ -class ProgramOption; -} } auto probe_display_platform( std::shared_ptr const&, std::shared_ptr const&, - mir::options::ProgramOption const&) -> std::vector + mir::options::Option const&) -> std::vector { mir::assert_entry_point_signature(&probe_display_platform); std::vector result; @@ -49,7 +45,7 @@ auto probe_rendering_platform( std::span> const&, mir::ConsoleServices&, std::shared_ptr const&, - mir::options::ProgramOption const&) -> std::vector + mir::options::Option const&) -> std::vector { mir::assert_entry_point_signature(&probe_rendering_platform); std::vector result; diff --git a/tests/mir_test_framework/platform_graphics_throw.cpp b/tests/mir_test_framework/platform_graphics_throw.cpp index 19ed373542e..ab6ab4d9d61 100644 --- a/tests/mir_test_framework/platform_graphics_throw.cpp +++ b/tests/mir_test_framework/platform_graphics_throw.cpp @@ -132,7 +132,7 @@ class ExceptionThrowingPlatform : public mg::DisplayPlatform, public mg::Renderi auto probe_display_platform( std::shared_ptr const&, std::shared_ptr const&, - mir::options::ProgramOption const&) -> std::vector + mir::options::Option const&) -> std::vector { mir::assert_entry_point_signature(&probe_display_platform); std::vector result; @@ -149,7 +149,7 @@ auto probe_rendering_platform( std::span> const&, mir::ConsoleServices&, std::shared_ptr const&, - mir::options::ProgramOption const&) -> std::vector + mir::options::Option const&) -> std::vector { mir::assert_entry_point_signature(&probe_rendering_platform); std::vector result;