diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-08-23 16:39:29 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-08-23 16:43:58 +0200 |
commit | e2736212a7762d8c6d474d64bec1df87799cf33b (patch) | |
tree | 9d5c88e10d32fd872c3ab6b8d312fc9f350c26d4 /src/particles/qquickimageparticle.cpp | |
parent | 3eed20c22ee046c42fec81b0d9d6e47a27bdbe03 (diff) | |
parent | 8eeede619f417904cbd33fd44143f857dfce0996 (diff) |
Merge branch remote-tracking branch '5.8' into wip/pointerhandler
Change-Id: I1750ed28c5fda878a0a8f2b7bfe4c580c0b7ffe3
Diffstat (limited to 'src/particles/qquickimageparticle.cpp')
-rw-r--r-- | src/particles/qquickimageparticle.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp index 07cbee1383..c68153aca8 100644 --- a/src/particles/qquickimageparticle.cpp +++ b/src/particles/qquickimageparticle.cpp @@ -49,6 +49,7 @@ #include <private/qquicksprite_p.h> #include <private/qquickspriteengine_p.h> #include <QOpenGLFunctions> +#include <QSGRendererInterface> #include <QtQuick/private/qsgshadersourcebuilder_p.h> #include <QtQuick/private/qsgtexture_p.h> #include <private/qqmlglobal_p.h> @@ -1469,8 +1470,17 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node) update(); } +static inline bool isOpenGL(QSGRenderContext *rc) +{ + QSGRendererInterface *rif = rc->sceneGraphContext()->rendererInterface(rc); + return !rif || rif->graphicsApi() == QSGRendererInterface::OpenGL; +} + QSGNode *QQuickImageParticle::updatePaintNode(QSGNode *node, UpdatePaintNodeData *) { + if (!node && !isOpenGL(QQuickItemPrivate::get(this)->sceneGraphRenderContext())) + return 0; + if (m_pleaseReset){ if (node) delete node; |