From 3affc261aaa12105dbad60bfa7014126ce4dfcca Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 14 Mar 2014 23:27:06 -0500 Subject: 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 --- src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp') 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 *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; -- cgit v1.2.3