diff options
author | Gunnar Sletta <gunnar@sletta.org> | 2015-09-09 11:23:53 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar@sletta.org> | 2015-09-11 07:10:34 +0000 |
commit | 219c80b3297ba5f5851152d2414d64b3b4e49676 (patch) | |
tree | 3ccbae0d41d9312a9aea9465793e615fd2198d77 /src/quick/items | |
parent | 001c47e75779b9b55adebdfc293c232d757d4a8e (diff) |
Make QQuickFramebufferObject::layer::enabled workv5.5.1
Change-Id: I95c88fa9b2dbb4f482286e4a22b608fbc450fb2b
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/items')
-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()) { |