platforms/drm: fix init with explicit modifiers

When we're adding the output to the EglGbmBackend pipelines aren't necessarily
setup yet and are thus missing the modifier list. As creating the gbm surface
immediately is useless anyways, delay that until we need it, where the modifier
list is available.
This commit is contained in:
Xaver Hugl 2021-10-19 22:59:44 +02:00
parent ebaf2e61fc
commit baebaa9eb4

View file

@ -193,14 +193,8 @@ bool EglGbmBackend::addOutput(DrmAbstractOutput *drmOutput)
{
Output newOutput;
newOutput.output = drmOutput;
if (isPrimary()) {
if (!resetOutput(newOutput)) {
return false;
}
} else {
if (!renderingBackend()->addOutput(drmOutput)) {
return false;
}
if (!isPrimary() && !renderingBackend()->addOutput(drmOutput)) {
return false;
}
m_outputs.insert(drmOutput, newOutput);
return true;