From 96a7afec18542396f8e9a0b0f75d219a08725b3f Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 11 Apr 2016 16:06:39 +0200 Subject: Route ShaderEffect through the old GL impl Register the common QQuickShaderEffect class as ShaderEffect to QML. In case of GL this will route to QQuickOpenGLShaderEffect. For others the default no-op implementation is used (at least for now). Later this new implementation will route to a backend-specific scenegraph node via the adaptation layer. This also means that QQuickOpenGLShaderEffect is no longer a QQuickItem and QQuickShaderEffect must handle everything item-related and forward. Change-Id: I1ff4b674253543a04978a69f4a3b67f3a44dd983 Reviewed-by: Andy Nichols --- src/quick/scenegraph/qsgcontextplugin_p.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/quick/scenegraph/qsgcontextplugin_p.h') diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h index ca326ead07..779dca62fc 100644 --- a/src/quick/scenegraph/qsgcontextplugin_p.h +++ b/src/quick/scenegraph/qsgcontextplugin_p.h @@ -64,12 +64,20 @@ class QSGRenderLoop; struct Q_QUICK_PRIVATE_EXPORT QSGContextFactoryInterface : public QFactoryInterface { + enum Flag { + SupportsShaderEffectV2 = 0x01 + }; + Q_DECLARE_FLAGS(Flags, Flag) + virtual QSGContext *create(const QString &key) const = 0; + virtual Flags flags(const QString &key) const = 0; virtual QQuickTextureFactory *createTextureFactoryFromImage(const QImage &image) = 0; virtual QSGRenderLoop *createWindowManager() = 0; }; +Q_DECLARE_OPERATORS_FOR_FLAGS(QSGContextFactoryInterface::Flags) + #define QSGContextFactoryInterface_iid \ "org.qt-project.Qt.QSGContextFactoryInterface" Q_DECLARE_INTERFACE(QSGContextFactoryInterface, QSGContextFactoryInterface_iid) @@ -83,7 +91,6 @@ public: virtual ~QSGContextPlugin(); virtual QStringList keys() const = 0; - virtual QSGContext *create(const QString &key) const = 0; virtual QQuickTextureFactory *createTextureFactoryFromImage(const QImage &) { return 0; } virtual QSGRenderLoop *createWindowManager() { return 0; } -- cgit v1.2.3