diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-04-25 09:40:04 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-04-25 09:40:04 +0200 |
commit | b334a92493c9e4956b0fc631610857d1b1cf5f6d (patch) | |
tree | bdc85d9b49f4b8d666b34e4d87abf629f579f1e2 /src/quick/scenegraph | |
parent | 0eeb7ada04cc81d0ab1b61747bdf92fd7c33e1ec (diff) | |
parent | 27079f9168463b5b27aeb2d1f93f867bf714e71a (diff) |
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Change-Id: If2e7c1cf0f1522f6052bbc3e3636ef62bef1b4db
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgmaterial.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgnode.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgrenderloop.cpp | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgthreadedrenderloop.cpp | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgwindowsrenderloop.cpp | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgengine.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgshadersourcebuilder.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgtexture.cpp | 2 |
10 files changed, 18 insertions, 2 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index d4324bc489..14f8514289 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -338,7 +338,7 @@ void Updater::visitNode(Node *n) case QSGNode::RenderNodeType: if (m_added) n->renderNodeElement()->root = m_roots.last(); - // Fall through to visit children. + Q_FALLTHROUGH(); // to visit children default: SHADOWNODE_TRAVERSE(n) visitNode(child); break; diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp index 8d666d3d0b..07dc87a643 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp +++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp @@ -419,6 +419,10 @@ void QSGMaterialShader::compile() \value DirtyMatrix Used to indicate that the matrix has changed and must be updated. \value DirtyOpacity Used to indicate that the opacity has changed and must be updated. + + \value DirtyCachedMaterialData Used to indicate that the cached material data have changed and must be updated. + + \value DirtyAll Used to indicate that everything needs to be updated. */ diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp index 7ef75d4b4c..7ac3914023 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.cpp +++ b/src/quick/scenegraph/coreapi/qsgnode.cpp @@ -112,6 +112,7 @@ static void qt_print_node_count() \value DirtyGeometry The geometry of a QSGGeometryNode has changed. \value DirtyMaterial The material of a QSGGeometryNode has changed. \value DirtyOpacity The opacity of a QSGOpacityNode has changed. + \value DirtySubtreeBlocked The subtree has been blocked. \sa QSGNode::markDirty() */ @@ -146,6 +147,7 @@ static void qt_print_node_count() \value TransformNodeType The type of QSGTransformNode \value ClipNodeType The type of QSGClipNode \value OpacityNodeType The type of QSGOpacityNode + \value RenderNodeType The type of QSGRenderNode \sa type() */ diff --git a/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp b/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp index 48ab1aa52f..2b70139b37 100644 --- a/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp +++ b/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp @@ -133,6 +133,7 @@ Tokenizer::Token Tokenizer::next() pos += 3; return Token_Void; } + Q_FALLTHROUGH(); } case ';': return Token_SemiColon; diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index bb581c5e36..293a706c2e 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -423,6 +423,7 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) if (data.grabOnly) { bool alpha = window->format().alphaBufferSize() > 0 && window->color().alpha() != 255; grabContent = qt_gl_read_framebuffer(window->size() * window->effectiveDevicePixelRatio(), alpha, alpha); + grabContent.setDevicePixelRatio(window->effectiveDevicePixelRatio()); data.grabOnly = false; } diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 17a2c62a4e..560fddd580 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -432,6 +432,7 @@ bool QSGRenderThread::event(QEvent *e) qCDebug(QSG_LOG_RENDERLOOP) << QSG_RT_PAD << "- grabbing result"; bool alpha = ce->window->format().alphaBufferSize() > 0 && ce->window->color().alpha() != 255; *ce->image = qt_gl_read_framebuffer(windowSize * ce->window->effectiveDevicePixelRatio(), alpha, alpha); + ce->image->setDevicePixelRatio(ce->window->effectiveDevicePixelRatio()); } qCDebug(QSG_LOG_RENDERLOOP) << QSG_RT_PAD << "- waking gui to handle result"; waitCondition.wakeOne(); diff --git a/src/quick/scenegraph/qsgwindowsrenderloop.cpp b/src/quick/scenegraph/qsgwindowsrenderloop.cpp index e944ddbc4f..eff6763a16 100644 --- a/src/quick/scenegraph/qsgwindowsrenderloop.cpp +++ b/src/quick/scenegraph/qsgwindowsrenderloop.cpp @@ -325,6 +325,7 @@ QImage QSGWindowsRenderLoop::grab(QQuickWindow *window) bool alpha = window->format().alphaBufferSize() > 0 && window->color().alpha() != 255; QImage image = qt_gl_read_framebuffer(window->size() * window->effectiveDevicePixelRatio(), alpha, alpha); + image.setDevicePixelRatio(window->effectiveDevicePixelRatio()); return image; } diff --git a/src/quick/scenegraph/util/qsgengine.cpp b/src/quick/scenegraph/util/qsgengine.cpp index 09e4cdf5a7..259e45c978 100644 --- a/src/quick/scenegraph/util/qsgengine.cpp +++ b/src/quick/scenegraph/util/qsgengine.cpp @@ -84,6 +84,8 @@ QT_BEGIN_NAMESPACE will delete the GL texture when the texture object is deleted. \value TextureCanUseAtlas The image can be uploaded into a texture atlas. + + \value TextureIsOpaque The texture object is opaque. */ QSGEnginePrivate::QSGEnginePrivate() diff --git a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp index d8f92919cb..e134a5d4d3 100644 --- a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp +++ b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp @@ -122,6 +122,7 @@ Tokenizer::Token Tokenizer::next() case '*': if (*pos == '/') return Token_MultiLineCommentEnd; + Q_FALLTHROUGH(); case '\n': return Token_NewLine; @@ -129,6 +130,7 @@ Tokenizer::Token Tokenizer::next() case '\r': if (*pos == '\n') return Token_NewLine; + Q_FALLTHROUGH(); case '#': { if (*pos == 'v' && pos[1] == 'e' && pos[2] == 'r' && pos[3] == 's' @@ -177,7 +179,7 @@ Tokenizer::Token Tokenizer::next() pos += 3; return Token_Void; } - // Fall-thru + Q_FALLTHROUGH(); } default: // Identifier... diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp index 521c5e666f..3432a87c53 100644 --- a/src/quick/scenegraph/util/qsgtexture.cpp +++ b/src/quick/scenegraph/util/qsgtexture.cpp @@ -297,6 +297,8 @@ static void qt_debug_remove_texture(QSGTexture* texture) \value Anisotropy8x 8x anisotropic filtering. \value Anisotropy16x 16x anisotropic filtering. + + \since 5.9 */ /*! |