core: Drop Platform::supportsNativeFence()

Use Scene::supportsNativeFence() directly.
This commit is contained in:
Vlad Zahorodnii 2022-11-05 11:48:02 +02:00
parent 4610aaf614
commit f1369a40f9
3 changed files with 1 additions and 14 deletions

View file

@ -20,7 +20,6 @@
#include "outputconfiguration.h" #include "outputconfiguration.h"
#include "pointer_input.h" #include "pointer_input.h"
#include "qpainterbackend.h" #include "qpainterbackend.h"
#include "scene.h"
#include "screenedge.h" #include "screenedge.h"
namespace KWin namespace KWin
@ -133,14 +132,6 @@ void Platform::removeVirtualOutput(Output *output)
Q_ASSERT(!output); Q_ASSERT(!output);
} }
bool Platform::supportsNativeFence() const
{
if (Compositor *compositor = Compositor::self()) {
return compositor->scene()->supportsNativeFence();
}
return false;
}
EGLDisplay KWin::Platform::sceneEglDisplay() const EGLDisplay KWin::Platform::sceneEglDisplay() const
{ {
return m_eglDisplay; return m_eglDisplay;

View file

@ -73,10 +73,6 @@ public:
* The default implementation creates an InputRedirectionCursor. * The default implementation creates an InputRedirectionCursor.
*/ */
virtual void createPlatformCursor(QObject *parent = nullptr); 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. * The EGLDisplay used by the compositing scene.
*/ */

View file

@ -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 // 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 // only after the fence is signaled; otherwise stream consumers will most likely see
// a corrupted buffer. // a corrupted buffer.
if (kwinApp()->platform()->supportsNativeFence()) { if (Compositor::self()->scene()->supportsNativeFence()) {
Q_ASSERT_X(eglGetCurrentContext(), "tryEnqueue", "no current context"); Q_ASSERT_X(eglGetCurrentContext(), "tryEnqueue", "no current context");
m_pendingFence = new EGLNativeFence(kwinApp()->platform()->sceneEglDisplay()); m_pendingFence = new EGLNativeFence(kwinApp()->platform()->sceneEglDisplay());
if (!m_pendingFence->isValid()) { if (!m_pendingFence->isValid()) {