diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-06-04 18:59:58 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-05 16:31:00 +0200 |
commit | ec8f1ad27ebee154b3c4869922b953a432f9d944 (patch) | |
tree | 91aaf65d50bc3b666d42441227e26b2917af37d6 /src/quick/scenegraph | |
parent | 13be09c97fe235ac8f453cbee9c1f794b6815db5 (diff) |
Fix opacity issue in the renderer.
Given the following tree:
OpacityNode
|
TransformNode (which is a batch root)
|
GeometryNode
If both opacity and transform nodes were changed this frame, we would
hit the optimized "scrolling" path while traversing the tree and abort
updating that subtree. As a result the opacity change was not
propegated to the geometry node and it would be rendered incorrectly.
Fix this by skipping the optimized path when there are opacity changes
in an ancestor.
Task-number: QTBUG-39190
Change-Id: Ieaebfe3de62b961204bd3103fe9913d60e75e412
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index e8f803f2a9..5c83528b82 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -417,7 +417,7 @@ void Updater::visitTransformNode(Node *n) // The only change in this subtree is ourselves and we are a batch root, so // only update subroots and return, saving tons of child-processing (flickable-panning) - if (!n->becameBatchRoot && m_added == 0 && m_force_update == 0 && dirty && (n->dirtyState & ~QSGNode::DirtyMatrix) == 0) { + if (!n->becameBatchRoot && m_added == 0 && m_force_update == 0 && m_opacityChange == 0 && dirty && (n->dirtyState & ~QSGNode::DirtyMatrix) == 0) { BatchRootInfo *info = renderer->batchRootInfo(n); for (QSet<Node *>::const_iterator it = info->subRoots.constBegin(); it != info->subRoots.constEnd(); ++it) { @@ -2015,6 +2015,8 @@ void Renderer::renderMergedBatch(const Batch *batch) << " root:" << batch->root; if (batch->drawSets.size() > 1) debug << "sets:" << batch->drawSets.size(); + if (!batch->isOpaque) + debug << "opacity:" << e->node->inheritedOpacity(); batch->uploadedThisFrame = false; } |