diff --git a/src/core/platform.cpp b/src/core/platform.cpp index d661309847..866e935aa1 100644 --- a/src/core/platform.cpp +++ b/src/core/platform.cpp @@ -20,7 +20,6 @@ #include "outputconfiguration.h" #include "pointer_input.h" #include "qpainterbackend.h" -#include "scene.h" #include "screenedge.h" namespace KWin @@ -133,14 +132,6 @@ void Platform::removeVirtualOutput(Output *output) Q_ASSERT(!output); } -bool Platform::supportsNativeFence() const -{ - if (Compositor *compositor = Compositor::self()) { - return compositor->scene()->supportsNativeFence(); - } - return false; -} - EGLDisplay KWin::Platform::sceneEglDisplay() const { return m_eglDisplay; diff --git a/src/core/platform.h b/src/core/platform.h index aba0775a26..f252be2b0e 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -73,10 +73,6 @@ public: * The default implementation creates an InputRedirectionCursor. */ virtual void createPlatformCursor(QObject *parent = nullptr); - /** - * Whether our Compositing EGL display supports creating native EGL fences. - */ - bool supportsNativeFence() const; /** * The EGLDisplay used by the compositing scene. */ diff --git a/src/plugins/screencast/screencaststream.cpp b/src/plugins/screencast/screencaststream.cpp index 963b01186b..d2e421e7c6 100644 --- a/src/plugins/screencast/screencaststream.cpp +++ b/src/plugins/screencast/screencaststream.cpp @@ -578,7 +578,7 @@ 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 (kwinApp()->platform()->supportsNativeFence()) { + if (Compositor::self()->scene()->supportsNativeFence()) { Q_ASSERT_X(eglGetCurrentContext(), "tryEnqueue", "no current context"); m_pendingFence = new EGLNativeFence(kwinApp()->platform()->sceneEglDisplay()); if (!m_pendingFence->isValid()) {