diff options
Diffstat (limited to 'src/quick/scenegraph/util')
-rw-r--r-- | src/quick/scenegraph/util/qsgdefaultpainternode.cpp | 16 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgdefaultpainternode_p.h | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode.cpp b/src/quick/scenegraph/util/qsgdefaultpainternode.cpp index 3e5ed72d0f..16625b889b 100644 --- a/src/quick/scenegraph/util/qsgdefaultpainternode.cpp +++ b/src/quick/scenegraph/util/qsgdefaultpainternode.cpp @@ -442,9 +442,21 @@ void QSGDefaultPainterNode::setContentsScale(qreal s) markDirty(DirtyMaterial); } -void QSGDefaultPainterNode::setFastFBOResizing(bool dynamic) +void QSGDefaultPainterNode::setFastFBOResizing(bool fastResizing) { - m_fastFBOResizing = dynamic; + if (m_fastFBOResizing == fastResizing) + return; + + m_fastFBOResizing = fastResizing; + updateFBOSize(); + + if ((m_preferredRenderTarget == QQuickPaintedItem::FramebufferObject + || m_preferredRenderTarget == QQuickPaintedItem::InvertedYFramebufferObject) + && (!m_fbo || (m_fbo && m_fbo->size() != m_fboSize))) { + m_dirtyRenderTarget = true; + m_dirtyGeometry = true; + m_dirtyTexture = true; + } } QImage QSGDefaultPainterNode::toImage() const diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h index 3cabe01511..7e23264100 100644 --- a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h +++ b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h @@ -108,7 +108,7 @@ public: void setContentsScale(qreal s); qreal contentsScale() const { return m_contentsScale; } - void setFastFBOResizing(bool dynamic); + void setFastFBOResizing(bool fastResizing); bool fastFBOResizing() const { return m_fastFBOResizing; } void setTextureSize(const QSize &textureSize); |