From 989361405eb63e13dc4069210cdec7a6272dd2db Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Wed, 16 Mar 2022 17:45:01 +0100 Subject: [PATCH] Revert "screencast: make context current in tryEnqueue" This reverts commit 1fd1c03742cc2d9f335dcdf2c288e48434a38a5c, because it can make KWin freeze --- src/plugins/screencast/screencaststream.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/screencast/screencaststream.cpp b/src/plugins/screencast/screencaststream.cpp index 531decc1ec..a02c119bd8 100644 --- a/src/plugins/screencast/screencaststream.cpp +++ b/src/plugins/screencast/screencaststream.cpp @@ -522,10 +522,8 @@ void ScreenCastStream::tryEnqueue(pw_buffer *buffer) // we need to insert a fence into the command stream and enqueue the pipewire buffer // only after the fence is signaled; otherwise stream consumers will most likely see // a corrupted buffer. - if (auto scene = Compositor::self()->scene()) { - scene->makeOpenGLContextCurrent(); - } if (kwinApp()->platform()->supportsNativeFence()) { + Q_ASSERT_X(eglGetCurrentContext(), "tryEnqueue", "no current context"); m_pendingFence = new EGLNativeFence(kwinApp()->platform()->sceneEglDisplay()); if (!m_pendingFence->isValid()) { qCWarning(KWIN_SCREENCAST) << "Failed to create a native EGL fence";