Skip to content

Commit 47d782f

Browse files
authored
Merge pull request #3124 from MirServer/consider-egl-generic-last
Make egl-generic the rendering platform of last resort
2 parents 5b5e9a9 + 0c7e4dd commit 47d782f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/server/graphics/default_configuration.cpp

+18-1
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,26 @@ auto mir::DefaultServerConfiguration::the_rendering_platforms() ->
372372

373373
rendering_platforms.reserve(rendering_platform_map.size());
374374

375+
// We want to make the egl-generic platform the last resort
376+
// So don't push it into rendering_platforms until the rest are done
377+
std::shared_ptr<graphics::RenderingPlatform> egl_generic;
378+
375379
for (auto const& rp : rendering_platform_map)
376380
{
377-
rendering_platforms.push_back(rp.second);
381+
if (rp.first != "mir:egl-generic")
382+
{
383+
rendering_platforms.push_back(rp.second);
384+
}
385+
else
386+
{
387+
egl_generic = rp.second;
388+
}
389+
}
390+
391+
// If we skipped egl-generic, add it to the end
392+
if (egl_generic)
393+
{
394+
rendering_platforms.push_back(egl_generic);
378395
}
379396

380397
if (rendering_platforms.empty())

0 commit comments

Comments
 (0)