platforms/drm: fix EglStreamBackend init
BUG: 438363
This commit is contained in:
parent
3d6659b0d7
commit
40c485f2a6
1 changed files with 6 additions and 9 deletions
|
@ -257,6 +257,10 @@ void EglStreamBackend::init()
|
||||||
setFailed("Failed to initialize EGL api");
|
setFailed("Failed to initialize EGL api");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!supportsSurfacelessContext()) {
|
||||||
|
setFailed("EGL_KHR_surfaceless_context extension is unavailable!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!initRenderingContext()) {
|
if (!initRenderingContext()) {
|
||||||
setFailed("Failed to initialize rendering context");
|
setFailed("Failed to initialize rendering context");
|
||||||
return;
|
return;
|
||||||
|
@ -283,7 +287,7 @@ bool EglStreamBackend::initRenderingContext()
|
||||||
{
|
{
|
||||||
initBufferConfigs();
|
initBufferConfigs();
|
||||||
|
|
||||||
if (!createContext()) {
|
if (!createContext() || !makeCurrent()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,14 +295,7 @@ bool EglStreamBackend::initRenderingContext()
|
||||||
for (DrmOutput *drmOutput : outputs) {
|
for (DrmOutput *drmOutput : outputs) {
|
||||||
addOutput(drmOutput);
|
addOutput(drmOutput);
|
||||||
}
|
}
|
||||||
if (m_outputs.isEmpty()) {
|
return true;
|
||||||
qCCritical(KWIN_DRM) << "Failed to create output surface";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// set our first surface as the one for the abstract backend
|
|
||||||
setSurface(m_outputs.first().eglSurface);
|
|
||||||
|
|
||||||
return makeContextCurrent(m_outputs.first());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EglStreamBackend::resetOutput(Output &o, DrmOutput *drmOutput)
|
bool EglStreamBackend::resetOutput(Output &o, DrmOutput *drmOutput)
|
||||||
|
|
Loading…
Reference in a new issue