diff options
author | Elvis Lee <kwangwoong.lee@lge.com> | 2021-05-25 17:57:24 +0900 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-06-01 11:44:43 +0000 |
commit | 96afaf41ca30fc77f92b0ad01e65c767a944354a (patch) | |
tree | 7bce70c80c587688d8130642b2841f3c0c5b60cc /src/gui | |
parent | bf1fdfd4fbb8e43abd01940d7e570856bf2ad4c3 (diff) |
Support hardware composition for webOS
In similar way with vsp2, the interfaces are needed to support
qtwayland hardware layer for webOS.
https://doc.qt.io/qt-5/qml-qtwayland-compositor-waylandhardwarelayer.html
Change-Id: I14481373d696b501a774b9258da789554065a6ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qplatformscreen_p.h | 13 | ||||
-rw-r--r-- | src/gui/platform/unix/qunixnativeinterface.cpp | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformscreen_p.h b/src/gui/kernel/qplatformscreen_p.h index bd149ccbac..3ef87625ad 100644 --- a/src/gui/kernel/qplatformscreen_p.h +++ b/src/gui/kernel/qplatformscreen_p.h @@ -91,6 +91,19 @@ struct Q_GUI_EXPORT QVsp2Screen }; #endif +#if defined(Q_OS_WEBOS) || defined(Q_CLANG_QDOC) +struct Q_GUI_EXPORT QWebOSScreen +{ + QT_DECLARE_NATIVE_INTERFACE(QWebOSScreen) + virtual int addLayer(void *gbm_bo, const QRectF &geometry) = 0; + virtual void setLayerBuffer(int id, void *gbm_bo) = 0; + virtual void setLayerGeometry(int id, const QRectF &geometry) = 0; + virtual void setLayerAlpha(int id, qreal alpha) = 0; + virtual bool removeLayer(int id) = 0; + virtual void addFlipListener(void (*callback)()) = 0; +}; +#endif + } // QNativeInterface::Private QT_END_NAMESPACE diff --git a/src/gui/platform/unix/qunixnativeinterface.cpp b/src/gui/platform/unix/qunixnativeinterface.cpp index 9fde98f76a..4febe69d91 100644 --- a/src/gui/platform/unix/qunixnativeinterface.cpp +++ b/src/gui/platform/unix/qunixnativeinterface.cpp @@ -185,6 +185,10 @@ QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QXcbWindow); QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QVsp2Screen); #endif +#ifdef Q_OS_WEBOS +QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWebOSScreen); +#endif + #if QT_CONFIG(evdev) /*! |