eglfs/kms : implement nativeResourceForScreen
This will return the crtc_id for the given screen. Change-Id: Ia4510a730e2d98c705f382644e2ab5a432612c02 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
731651af99
commit
276ec1ab00
@ -141,6 +141,16 @@ void *QEglFSKmsIntegration::nativeResourceForIntegration(const QByteArray &name)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void *QEglFSKmsIntegration::nativeResourceForScreen(const QByteArray &resource, QScreen *screen)
|
||||
{
|
||||
QEglFSKmsScreen *s = static_cast<QEglFSKmsScreen *>(screen->handle());
|
||||
if (s) {
|
||||
if (resource == QByteArrayLiteral("dri_crtcid"))
|
||||
return (void *) (qintptr) s->output().crtc_id;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QKmsDevice *QEglFSKmsIntegration::device() const
|
||||
{
|
||||
return m_device;
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
void waitForVSync(QPlatformSurface *surface) const override;
|
||||
bool supportsPBuffers() const override;
|
||||
void *nativeResourceForIntegration(const QByteArray &name) override;
|
||||
void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override;
|
||||
|
||||
QKmsDevice *device() const;
|
||||
QKmsScreenConfig *screenConfig() const;
|
||||
|
Loading…
Reference in New Issue
Block a user