Skip to content

Commit

Permalink
Merge pull request #3124 from MirServer/consider-egl-generic-last
Browse files Browse the repository at this point in the history
Make egl-generic the rendering platform of last resort
  • Loading branch information
mattkae authored Nov 14, 2023
2 parents 5b5e9a9 + 0c7e4dd commit 47d782f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/server/graphics/default_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,26 @@ auto mir::DefaultServerConfiguration::the_rendering_platforms() ->

rendering_platforms.reserve(rendering_platform_map.size());

// We want to make the egl-generic platform the last resort
// So don't push it into rendering_platforms until the rest are done
std::shared_ptr<graphics::RenderingPlatform> egl_generic;

for (auto const& rp : rendering_platform_map)
{
rendering_platforms.push_back(rp.second);
if (rp.first != "mir:egl-generic")
{
rendering_platforms.push_back(rp.second);
}
else
{
egl_generic = rp.second;
}
}

// If we skipped egl-generic, add it to the end
if (egl_generic)
{
rendering_platforms.push_back(egl_generic);
}

if (rendering_platforms.empty())
Expand Down

0 comments on commit 47d782f

Please sign in to comment.