diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-28 21:32:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-28 21:33:17 +0200 |
commit | 182983943b76bc0e40ff7693853ef2262323fa80 (patch) | |
tree | 4e542c3f2906e348da045375c3a3a85fc1d0d73c /src/quick/scenegraph | |
parent | 8ced0f0f9954f857265fd18080da95427069135d (diff) | |
parent | 80e03bbd9a42401d50af450aff5351c3a0c95444 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I7d092cce33cb009d63e7b0df7c71183089dea53f
Diffstat (limited to 'src/quick/scenegraph')
5 files changed, 10 insertions, 9 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp index 4937565aa9..666f1d0616 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp @@ -83,7 +83,7 @@ void QSGSoftwareRenderableNodeUpdater::endVisit(QSGTransformNode *) bool QSGSoftwareRenderableNodeUpdater::visit(QSGClipNode *node) { // Make sure to translate the clip rect into world coordinates - if (m_clipState.count() == 1) { + if (m_clipState.count() == 0 || m_clipState.top().isNull()) { m_clipState.push(m_transformState.top().map(QRegion(node->clipRect().toRect()))); m_hasClip = true; } else { @@ -97,7 +97,7 @@ bool QSGSoftwareRenderableNodeUpdater::visit(QSGClipNode *node) void QSGSoftwareRenderableNodeUpdater::endVisit(QSGClipNode *) { m_clipState.pop(); - if (m_clipState.count() == 1) + if (m_clipState.count() == 0 || m_clipState.top().isNull()) m_hasClip = false; } diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp index e400928d4e..264b30b897 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.cpp +++ b/src/quick/scenegraph/coreapi/qsgnode.cpp @@ -1582,6 +1582,7 @@ QDebug operator<<(QDebug d, const QSGRootNode *n) d << "RootNode(null)"; return d; } + QDebugStateSaver saver(d); d << "RootNode" << hex << (const void *) n << (n->isSubtreeBlocked() ? "*BLOCKED*" : ""); #ifdef QSG_RUNTIME_DESCRIPTION d << QSGNodePrivate::description(n); diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp index 34bb554db6..95f3555994 100644 --- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp +++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp @@ -308,9 +308,6 @@ QSGDefaultRenderContext *QSGDefaultRenderContext::from(QOpenGLContext *context) return qobject_cast<QSGDefaultRenderContext *>(context->property(QSG_RENDERCONTEXT_PROPERTY).value<QObject *>()); } -QT_END_NAMESPACE - - QSGDistanceFieldGlyphCache *QSGDefaultRenderContext::distanceFieldGlyphCache(const QRawFont &font) { QString key = fontKey(font); @@ -323,4 +320,6 @@ QSGDistanceFieldGlyphCache *QSGDefaultRenderContext::distanceFieldGlyphCache(con return cache; } +QT_END_NAMESPACE + #include "moc_qsgdefaultrendercontext_p.cpp" diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp index 22f0b13f46..d5f836a525 100644 --- a/src/quick/scenegraph/util/qsgatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgatlastexture.cpp @@ -116,7 +116,7 @@ QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel) Texture *t = 0; if (image.width() < m_atlas_size_limit && image.height() < m_atlas_size_limit) { if (!m_atlas) - m_atlas = new Atlas(m_atlas_size); + m_atlas = new Atlas(m_atlas_size, this); // t may be null for atlas allocation failure t = m_atlas->create(image); if (t && !hasAlphaChannel && t->hasAlphaChannel()) @@ -125,8 +125,9 @@ QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel) return t; } -Atlas::Atlas(const QSize &size) - : m_allocator(size) +Atlas::Atlas(const QSize &size, QObject *parent) + : QObject(parent) + , m_allocator(size) , m_texture_id(0) , m_size(size) , m_atlas_transient_image_threshold(0) diff --git a/src/quick/scenegraph/util/qsgatlastexture_p.h b/src/quick/scenegraph/util/qsgatlastexture_p.h index 3dee539547..0bb07e8e89 100644 --- a/src/quick/scenegraph/util/qsgatlastexture_p.h +++ b/src/quick/scenegraph/util/qsgatlastexture_p.h @@ -88,7 +88,7 @@ private: class Atlas : public QObject { public: - Atlas(const QSize &size); + Atlas(const QSize &size, QObject *parent); ~Atlas(); void invalidate(); |