platforms/drm: make context current without outputs in eglstream
This commit is contained in:
parent
61159d943c
commit
250169ff84
1 changed files with 2 additions and 6 deletions
|
@ -198,9 +198,7 @@ void EglStreamBackend::attachStreamConsumer(KWaylandServer::SurfaceInterface *su
|
|||
void *eglStream,
|
||||
wl_array *attribs)
|
||||
{
|
||||
if (!m_outputs.isEmpty()) {
|
||||
makeContextCurrent(m_outputs.first());
|
||||
}
|
||||
makeCurrent();
|
||||
QVector<EGLAttrib> streamAttribs;
|
||||
streamAttribs << EGL_WAYLAND_EGLSTREAM_WL << (EGLAttrib)eglStream;
|
||||
EGLAttrib *attribArray = (EGLAttrib *)attribs->data;
|
||||
|
@ -229,9 +227,7 @@ void EglStreamBackend::attachStreamConsumer(KWaylandServer::SurfaceInterface *su
|
|||
|
||||
connect(surface, &KWaylandServer::SurfaceInterface::destroyed, this,
|
||||
[surface, this]() {
|
||||
if (!m_outputs.isEmpty()) {
|
||||
makeContextCurrent(m_outputs.first());
|
||||
}
|
||||
makeCurrent();
|
||||
const StreamTexture &st = m_streamTextures.take(surface);
|
||||
pEglDestroyStreamKHR(eglDisplay(), st.stream);
|
||||
glDeleteTextures(1, &st.texture);
|
||||
|
|
Loading…
Reference in a new issue