From 3fe9f245e8fb5fa9a2336fecaabd8d677f55c5db Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 13 Sep 2018 10:54:18 +0200 Subject: Add platform native interface to offscreen plugin Adds trival support for querying "display" and "glxconfig" in case offscreen plugin is compiled with xlib support. This is required so this plugin could work with webengine. Taks-number: QTBUG-63346 Change-Id: Ie0f29385cb44429ddf383ad459e0c9f3263ccffe Reviewed-by: Laszlo Agocs --- src/plugins/platforms/offscreen/qoffscreenintegration_x11.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/offscreen/qoffscreenintegration_x11.h') diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h index 5e1c6b799b..a1986fdc94 100644 --- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h +++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h @@ -52,12 +52,19 @@ QT_BEGIN_NAMESPACE class QOffscreenX11Connection; class QOffscreenX11Info; -class QOffscreenX11Integration : public QOffscreenIntegration +class QOffscreenX11Integration : public QOffscreenIntegration, public QPlatformNativeInterface { public: bool hasCapability(QPlatformIntegration::Capability cap) const override; QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override; + QPlatformNativeInterface *nativeInterface()const override; + + // QPlatformNativeInterface + void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override; +#ifndef QT_NO_OPENGL + void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override; +#endif private: mutable QScopedPointer m_connection; -- cgit v1.2.3