summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/deviceintegration
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-08-15 13:09:55 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-08-15 16:53:19 +0200
commitc7ec7cd2a1ae9bec31113fae1f1e549b2bf98e0b (patch)
treefc81fba4e7815ea061da277cf3bcf3102866932f /src/plugins/platforms/eglfs/deviceintegration
parent7947032e2d1d68b2c0f79874db7adcf560851f29 (diff)
parent6132260da394a9627947f0fe6a279c20863b6ad2 (diff)
Merge branch 'wip/qt6' into wip/cmake
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration')
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp50
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h2
2 files changed, 0 insertions, 52 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
index 2c6b4245b7..3e78196227 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
@@ -114,20 +114,16 @@ public:
: QEglFSWindow(w)
, m_integration(integration)
, m_egl_stream(EGL_NO_STREAM_KHR)
- , m_framePending(false)
{ }
~QEglFSKmsEglDeviceWindow() { destroy(); }
void invalidateSurface() override;
void resetSurface() override;
- void flip();
- static void pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data);
const QEglFSKmsEglDeviceIntegration *m_integration;
EGLStreamKHR m_egl_stream;
EGLint m_latency;
- bool m_framePending;
};
void QEglFSKmsEglDeviceWindow::invalidateSurface()
@@ -148,9 +144,6 @@ void QEglFSKmsEglDeviceWindow::resetSurface()
streamAttribs[streamAttribCount++] = EGL_STREAM_FIFO_LENGTH_KHR;
streamAttribs[streamAttribCount++] = fifoLength;
}
-
- streamAttribs[streamAttribCount++] = EGL_CONSUMER_AUTO_ACQUIRE_EXT;
- streamAttribs[streamAttribCount++] = EGL_FALSE;
streamAttribs[streamAttribCount++] = EGL_NONE;
m_egl_stream = m_integration->m_funcs->create_stream(display, streamAttribs);
@@ -248,49 +241,6 @@ void QEglFSKmsEglDeviceWindow::resetSurface()
qCDebug(qLcEglfsKmsDebug, "Created stream producer surface %p", m_surface);
}
-void QEglFSKmsEglDeviceWindow::flip()
-{
- EGLDisplay display = screen()->display();
-
- EGLAttrib acquire_attribs[3] = { EGL_NONE };
-
- acquire_attribs[0] = EGL_DRM_FLIP_EVENT_DATA_NV;
- acquire_attribs[1] = (EGLAttrib)this;
- acquire_attribs[2] = EGL_NONE;
-
- if (m_egl_stream != EGL_NO_STREAM_KHR)
- if (!m_integration->m_funcs->acquire_stream_attrib_nv(display, m_egl_stream, acquire_attribs))
- qWarning("eglStreamConsumerAcquireAttribNV failed: eglError: %x", eglGetError());
-
- m_framePending = true;
-
- while (m_framePending) {
- drmEventContext drmEvent;
- memset(&drmEvent, 0, sizeof(drmEvent));
- drmEvent.version = 3;
- drmEvent.vblank_handler = nullptr;
- drmEvent.page_flip_handler = pageFlipHandler;
- drmHandleEvent(m_integration->m_device->fd(), &drmEvent);
- }
-}
-
-void QEglFSKmsEglDeviceWindow::pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
-{
- Q_UNUSED(fd);
- Q_UNUSED(sequence);
- Q_UNUSED(tv_sec);
- Q_UNUSED(tv_usec);
-
- QEglFSKmsEglDeviceWindow *window = static_cast<QEglFSKmsEglDeviceWindow*>(user_data);
- window->m_framePending = false;
-}
-
-void QEglFSKmsEglDeviceIntegration::presentBuffer(QPlatformSurface *surface)
-{
- QEglFSKmsEglDeviceWindow *eglWindow = static_cast<QEglFSKmsEglDeviceWindow*>(surface);
- eglWindow->flip();
-}
-
QEglFSWindow *QEglFSKmsEglDeviceIntegration::createWindow(QWindow *window) const
{
QEglFSKmsEglDeviceWindow *eglWindow = new QEglFSKmsEglDeviceWindow(window, this);
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h
index a5697ec831..5819d82ebf 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h
@@ -62,8 +62,6 @@ public:
bool supportsPBuffers() const override;
QEglFSWindow *createWindow(QWindow *window) const override;
- void presentBuffer(QPlatformSurface *surface) override;
-
EGLDeviceEXT eglDevice() const { return m_egl_device; }
protected: