aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgshadereffectsource_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/items/qsgshadereffectsource_p.h')
-rw-r--r--src/declarative/items/qsgshadereffectsource_p.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/declarative/items/qsgshadereffectsource_p.h b/src/declarative/items/qsgshadereffectsource_p.h
index 0cb449a46c..77cb412884 100644
--- a/src/declarative/items/qsgshadereffectsource_p.h
+++ b/src/declarative/items/qsgshadereffectsource_p.h
@@ -62,7 +62,9 @@ QT_MODULE(Declarative)
class QSGNode;
class UpdatePaintNodeData;
-class QGLFramebufferObject;
+class QOpenGLFramebufferObject;
+
+class QSGShaderEffectSourceTextureProvider;
class QSGShaderEffectSourceNode : public QObject, public QSGDefaultImageNode
{
@@ -114,6 +116,7 @@ public:
void scheduleUpdate();
+ void scheduleForCleanup();
QImage toImage() const;
Q_SIGNALS:
@@ -132,13 +135,15 @@ private:
QSGItem *m_shaderSource;
QSGRenderer *m_renderer;
- QGLFramebufferObject *m_fbo;
- QGLFramebufferObject *m_secondaryFbo;
+ QOpenGLFramebufferObject *m_fbo;
+ QOpenGLFramebufferObject *m_secondaryFbo;
#ifdef QSG_DEBUG_FBO_OVERLAY
QSGRectangleNode *m_debugOverlay;
#endif
+ QSGContext *m_context;
+
uint m_mipmap : 1;
uint m_live : 1;
uint m_recursive : 1;
@@ -148,7 +153,7 @@ private:
uint m_grab : 1;
};
-class QSGShaderEffectSource : public QSGItem, public QSGTextureProvider
+class QSGShaderEffectSource : public QSGItem
{
Q_OBJECT
Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged)
@@ -160,7 +165,7 @@ class QSGShaderEffectSource : public QSGItem, public QSGTextureProvider
Q_PROPERTY(bool hideSource READ hideSource WRITE setHideSource NOTIFY hideSourceChanged)
Q_PROPERTY(bool mipmap READ mipmap WRITE setMipmap NOTIFY mipmapChanged)
Q_PROPERTY(bool recursive READ recursive WRITE setRecursive NOTIFY recursiveChanged)
- Q_INTERFACES(QSGTextureProvider)
+
Q_ENUMS(Format WrapMode)
public:
enum WrapMode {
@@ -206,8 +211,8 @@ public:
bool recursive() const;
void setRecursive(bool enabled);
- QSGTexture *texture() const;
- const char *textureChangedSignal() const { return SIGNAL(textureChanged()); }
+ bool isTextureProvider() const { return true; }
+ QSGTextureProvider *textureProvider() const;
Q_INVOKABLE void scheduleUpdate();
@@ -228,7 +233,8 @@ protected:
virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
private:
- QSGTexture *m_texture;
+ QSGShaderEffectSourceTextureProvider *m_provider;
+ QSGShaderEffectTexture *m_texture;
WrapMode m_wrapMode;
QPointer<QSGItem> m_sourceItem;
QRectF m_sourceRect;