Skip to content

Commit f0f3b4b

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

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/server/graphics/default_configuration.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,17 @@ 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+
break;
307+
}
308+
else if (device.support_level >= mg::probe::supported)
299309
{
300310
found_supported_device = true;
301311
}

0 commit comments

Comments
 (0)