Skip to content

Commit ce7f120

Browse files
committed
Prioritizing the best rendering platform over all supported rendering platforms
1 parent 4c131c1 commit ce7f120

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/server/graphics/default_configuration.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,18 @@ auto mir::DefaultServerConfiguration::the_rendering_platforms() ->
295295
bool found_supported_device{false};
296296
for (auto& device : supported_devices)
297297
{
298-
if (device.support_level >= mg::probe::supported)
298+
if (device.support_level == mg::probe::best)
299+
{
300+
// In the case that we've discovered a best platform (most likely a hardware platform)
301+
// then we abandon all other platforms.
302+
// TODO: Remove me once a multi-rendering-platform paradigm is fully supported, and we
303+
// don't just select the first (or last?) platform and use that everywhere.
304+
platform_modules.clear();
305+
platform_modules.emplace_back(std::move(device), platform);
306+
found_supported_device = true;
307+
break;
308+
}
309+
else if (device.support_level >= mg::probe::supported)
299310
{
300311
found_supported_device = true;
301312
}

0 commit comments

Comments
 (0)