aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickframebufferobject.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-02 14:41:35 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-10-02 14:41:35 +0200
commit4653217c3f36e7914f2cc0573347a078dd11768f (patch)
tree7c7e862bdec55ae7ea0e2b6816bda189febbe4d1 /src/quick/items/qquickframebufferobject.cpp
parentc5dcabeb6a07ed358e64f26cd8475bfe5daae0e4 (diff)
parentad125bd18ef5c98a264b9e4fac258dd07511035d (diff)
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
Diffstat (limited to 'src/quick/items/qquickframebufferobject.cpp')
-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 74abd8cf9f..5ce3ae57f7 100644
--- a/src/quick/items/qquickframebufferobject.cpp
+++ b/src/quick/items/qquickframebufferobject.cpp
@@ -342,6 +342,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()) {