summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWieland Hagen <wieland.hagen@kdab.com>2017-07-25 12:46:38 +0200
committerWieland Hagen <wieland.hagen@kdab.com>2017-07-25 12:44:24 +0000
commit264989606420f940cdab14f3f39362b9c82c3885 (patch)
treec863f7dfcf179421e12960a2797253aa8dd53fa3
parent9c515a6de24bc8d5709136cc099ceeae8e3e642c (diff)
Fix QQuickFramebufferObject::Renderer::invalidateFramebufferObject()
invalidateFramebufferObject() sets the invalidatePending flag, which should then trigger the deletion of the old FBO and allocation via Renderer::createFramebufferObject(). This does only happen though, if the size has changed. Instead, always create a new FBO if invalidateFramebufferObject() has been called, regardless of whether the size changes or not. Change-Id: I849cb858afac89038343457c6362233c34956d58 Task-number: QTBUG-54434 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/quick/items/qquickframebufferobject.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp
index 3c00e956cc..042ee21aec 100644
--- a/src/quick/items/qquickframebufferobject.cpp
+++ b/src/quick/items/qquickframebufferobject.cpp
@@ -312,14 +312,12 @@ QSGNode *QQuickFramebufferObject::updatePaintNode(QSGNode *node, UpdatePaintNode
n->devicePixelRatio = window()->effectiveDevicePixelRatio();
desiredFboSize *= n->devicePixelRatio;
- if (n->fbo && (d->followsItemSize || n->invalidatePending)) {
- if (n->fbo->size() != desiredFboSize) {
- delete n->fbo;
- n->fbo = 0;
- delete n->msDisplayFbo;
- n->msDisplayFbo = 0;
- n->invalidatePending = false;
- }
+ if (n->fbo && ((d->followsItemSize && n->fbo->size() != desiredFboSize) || n->invalidatePending)) {
+ delete n->fbo;
+ n->fbo = 0;
+ delete n->msDisplayFbo;
+ n->msDisplayFbo = 0;
+ n->invalidatePending = false;
}
if (!n->fbo) {