summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@sletta.org>2015-09-09 11:23:53 +0200
committerGunnar Sletta <gunnar@sletta.org>2015-09-11 07:10:34 +0000
commit219c80b3297ba5f5851152d2414d64b3b4e49676 (patch)
tree3ccbae0d41d9312a9aea9465793e615fd2198d77
parent001c47e75779b9b55adebdfc293c232d757d4a8e (diff)
Make QQuickFramebufferObject::layer::enabled workv5.5.1
Change-Id: I95c88fa9b2dbb4f482286e4a22b608fbc450fb2b Reviewed-by: Michael Brasser <michael.brasser@live.com>
-rw-r--r--src/quick/items/qquickframebufferobject.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp
index 6031315b90..4638bbbdf3 100644
--- a/src/quick/items/qquickframebufferobject.cpp
+++ b/src/quick/items/qquickframebufferobject.cpp
@@ -311,6 +311,12 @@ bool QQuickFramebufferObject::isTextureProvider() const
*/
QSGTextureProvider *QQuickFramebufferObject::textureProvider() const
{
+ // When Item::layer::enabled == true, QQuickItem will be a texture
+ // provider. In this case we should prefer to return the layer rather
+ // than the fbo texture.
+ if (QQuickItem::isTextureProvider())
+ return QQuickItem::textureProvider();
+
Q_D(const QQuickFramebufferObject);
QQuickWindow *w = window();
if (!w || !w->openglContext() || QThread::currentThread() != w->openglContext()->thread()) {