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 /tests/auto/quick/scenegraph/tst_scenegraph.cpp | |
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 'tests/auto/quick/scenegraph/tst_scenegraph.cpp')
-rw-r--r-- | tests/auto/quick/scenegraph/tst_scenegraph.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/quick/scenegraph/tst_scenegraph.cpp b/tests/auto/quick/scenegraph/tst_scenegraph.cpp index ac4938e8bc..d510fdcda8 100644 --- a/tests/auto/quick/scenegraph/tst_scenegraph.cpp +++ b/tests/auto/quick/scenegraph/tst_scenegraph.cpp @@ -43,7 +43,7 @@ #include <QtQuick> -#include <private/qsgcontext_p.h> +#include <private/qopenglcontext_p.h> #include <QtQml> @@ -168,7 +168,7 @@ void tst_SceneGraph::manyWindows_data() struct ShareContextResetter { public: - ~ShareContextResetter() { QSGContext::setSharedOpenGLContext(0); } + ~ShareContextResetter() { QOpenGLContextPrivate::setGlobalShareContext(0); } }; void tst_SceneGraph::manyWindows() @@ -181,7 +181,7 @@ void tst_SceneGraph::manyWindows() ShareContextResetter cleanup; // To avoid dangling pointer in case of test-failure. if (shared) { sharedGLContext.create(); - QSGContext::setSharedOpenGLContext(&sharedGLContext); + QOpenGLContextPrivate::setGlobalShareContext(&sharedGLContext); } QScopedPointer<QWindow> parent; @@ -328,7 +328,8 @@ void tst_SceneGraph::render_data() << "data/render_StackingOrder.qml" << "data/render_Mipmap.qml" << "data/render_ImageFiltering.qml" - << "data/render_bug37555.qml" + << "data/render_bug37422.qml" + << "data/render_OpacityThroughBatchRoot.qml" ; QRegExp sampleCount("#samples: *(\\d+)"); |