diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-11-15 07:23:04 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-15 13:07:26 +0100 |
commit | ccc0e75fb6838fe58b4b22abc87cbe684fb4623e (patch) | |
tree | ee19194b060c37b93d1e67bcc5877787bb50dafe /src/quick/scenegraph | |
parent | d8fe3dfde9c6f73c49c8e69b41d77710f8dc463a (diff) |
Fix stacking order bug in the renderer
Since we are sorting batches based on the zorder of the first element
it is crucial that we don't continue adding to batches once an overlap
with a compatible element is found.
Task-number: QTBUG-34864
Change-Id: Ic2194c5c17bba0bc9874a14e8a69c81bff75bd1c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 49c2cc8178..79b5de72c0 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -1572,6 +1572,13 @@ void Renderer::prepareAlphaBatches() ej->batch = batch; next->nextInBatch = ej; next = ej; + } else { + /* When we come across a compatible element which hits an overlap, we + * need to stop the batch right away. We cannot add more elements + * to the current batch as they will be rendered before the batch that the + * current 'ej' will be added to. + */ + break; } } else { overlapBounds |= ej->bounds; |