diff options
author | Charles Yin <charles.yin@nokia.com> | 2011-10-27 13:06:57 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-28 22:31:32 +0200 |
commit | 1bc655b46738811268b50b318a3f3cd03ff02aff (patch) | |
tree | 4bd5d7f5659033b51d7039f90e5237614d826594 /src/declarative/scenegraph | |
parent | 4e644d592655c806bacbce051eb4b7d1f8aacd67 (diff) |
Fix PaintedItem redraw bug
1) After QQuickItem::update() being called (means item's content is dirty),
the paint() function should always been called, so the contentsDirty
and geometryDirty flags are not needed.
2) Update the smile example to validate the above changes
Task-number:QTBUG-22250
Change-Id: I5a72f18e6982bdb3ba23e78a253c2876aca2e8cb
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
Diffstat (limited to 'src/declarative/scenegraph')
-rw-r--r-- | src/declarative/scenegraph/util/qsgpainternode.cpp | 4 | ||||
-rw-r--r-- | src/declarative/scenegraph/util/qsgpainternode_p.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/scenegraph/util/qsgpainternode.cpp b/src/declarative/scenegraph/util/qsgpainternode.cpp index a89dd75bac..f3e5202241 100644 --- a/src/declarative/scenegraph/util/qsgpainternode.cpp +++ b/src/declarative/scenegraph/util/qsgpainternode.cpp @@ -378,9 +378,9 @@ void QSGPainterNode::setSize(const QSize &size) m_dirtyTexture = true; } -void QSGPainterNode::setDirty(bool d, const QRect &dirtyRect) +void QSGPainterNode::setDirty(const QRect &dirtyRect) { - m_dirtyContents = d; + m_dirtyContents = true; m_dirtyRect = dirtyRect; if (m_mipmapping) diff --git a/src/declarative/scenegraph/util/qsgpainternode_p.h b/src/declarative/scenegraph/util/qsgpainternode_p.h index c838ed1a0c..8e95107efc 100644 --- a/src/declarative/scenegraph/util/qsgpainternode_p.h +++ b/src/declarative/scenegraph/util/qsgpainternode_p.h @@ -83,7 +83,7 @@ public: void setSize(const QSize &size); QSize size() const { return m_size; } - void setDirty(bool d, const QRect &dirtyRect = QRect()); + void setDirty(const QRect &dirtyRect = QRect()); void setOpaquePainting(bool opaque); bool opaquePainting() const { return m_opaquePainting; } |