diff options
-rw-r--r-- | src/quick/items/qquickframebufferobject.cpp | 6 |
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()) { |