diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-09-12 11:06:59 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-13 01:10:37 +0200 |
commit | 4df73e62a70b73d955ab53faef4615ea03a21a4d (patch) | |
tree | 00acf9163a0447da03298659bc47d2de9da509f7 /src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | |
parent | c1821de0e6ef21f86623572fd54f5cc5451b6077 (diff) |
Remove qSort usages from declarative
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html
Change-Id: I8fa7d0186cc8f0ba562695974829e37f1eb87f2f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index cf71489f88..e9d9249bf5 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -46,6 +46,8 @@ #include <QtGui/QGuiApplication> #include <QtGui/QOpenGLFramebufferObject> +#include <algorithm> + #ifndef GL_DOUBLE #define GL_DOUBLE 0x140A #endif @@ -1256,9 +1258,9 @@ void Renderer::buildRenderListsForTaggedRoots() qsg_addBackOrphanedElements(m_tmpAlphaElements, m_alphaRenderList); if (m_opaqueRenderList.size()) - qSort(&m_opaqueRenderList.first(), &m_opaqueRenderList.last() + 1, qsg_sort_element_decreasing_order); + std::sort(&m_opaqueRenderList.first(), &m_opaqueRenderList.last() + 1, qsg_sort_element_decreasing_order); if (m_alphaRenderList.size()) - qSort(&m_alphaRenderList.first(), &m_alphaRenderList.last() + 1, qsg_sort_element_increasing_order); + std::sort(&m_alphaRenderList.first(), &m_alphaRenderList.last() + 1, qsg_sort_element_increasing_order); } @@ -1284,7 +1286,7 @@ void Renderer::buildRenderListsFromScratch() */ void Renderer::cleanupBatches(QDataBuffer<Batch *> *batches) { if (batches->size()) { - qSort(&batches->first(), &batches->last() + 1, qsg_sort_batch_is_valid); + std::sort(&batches->first(), &batches->last() + 1, qsg_sort_batch_is_valid); int count = 0; while (count < batches->size() && batches->at(count)->first) ++count; @@ -2149,11 +2151,11 @@ void Renderer::render() // Then sort opaque batches so that we're drawing the batches with the highest // order first, maximizing the benefit of front-to-back z-ordering. if (m_opaqueBatches.size()) - qSort(&m_opaqueBatches.first(), &m_opaqueBatches.last() + 1, qsg_sort_batch_decreasing_order); + std::sort(&m_opaqueBatches.first(), &m_opaqueBatches.last() + 1, qsg_sort_batch_decreasing_order); // Sort alpha batches back to front so that they render correctly. if (m_alphaBatches.size()) - qSort(&m_alphaBatches.first(), &m_alphaBatches.last() + 1, qsg_sort_batch_increasing_order); + std::sort(&m_alphaBatches.first(), &m_alphaBatches.last() + 1, qsg_sort_batch_increasing_order); m_zRange = 1.0 / (m_nextRenderOrder); |