diff options
author | Michael Brasser <michael.brasser@live.com> | 2014-03-14 23:27:06 -0500 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-15 14:34:06 +0100 |
commit | 3affc261aaa12105dbad60bfa7014126ce4dfcca (patch) | |
tree | e964426320b1a863db838ae64d6436746d3f20d4 /src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | |
parent | 2ef11a27300ba0f74c2768aa1077bbfa5666d643 (diff) |
Use stable sort when cleaning batches.
Ensure valid batches do not change order. This was causing rendering
issues when m_rebuild was 0, as we would not re-sort the list in correct
render order after cleanup.
Change-Id: I912fb313d4029f96e263fad24d68462f252003df
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 1f692c29d4..4b15b04b36 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -1445,7 +1445,7 @@ void Renderer::invalidateBatchAndOverlappingRenderOrders(Batch *batch) */ void Renderer::cleanupBatches(QDataBuffer<Batch *> *batches) { if (batches->size()) { - std::sort(&batches->first(), &batches->last() + 1, qsg_sort_batch_is_valid); + std::stable_sort(&batches->first(), &batches->last() + 1, qsg_sort_batch_is_valid); int count = 0; while (count < batches->size() && batches->at(count)->first) ++count; |