summaryrefslogtreecommitdiffstats
path: root/src/plugins/videonode
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-01-15 10:25:21 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-01-15 11:29:02 +0000
commit9ca9fac0e13a3f9407084fe450e02c66311d7328 (patch)
tree86ef16d6224531d43e50949bca25729ddb436ca2 /src/plugins/videonode
parent9c43f48d118ff869a9a621e1cea1ed2df81d2f37 (diff)
QSGVivanteVideoMaterial: fix expensive iteration over QMap::values()
Change-Id: I04b0fbe248e33821c93661b684b2e423f57e0f2f Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Diffstat (limited to 'src/plugins/videonode')
-rw-r--r--src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
index 2e2092be9..5c120b0e1 100644
--- a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
+++ b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
@@ -125,7 +125,8 @@ void QSGVivanteVideoMaterial::bind()
void QSGVivanteVideoMaterial::clearTextures()
{
- Q_FOREACH (GLuint id, mBitsToTextureMap.values()) {
+ for (auto it = mBitsToTextureMap.cbegin(), end = mBitsToTextureMap.cend(); it != end; ++it) {
+ GLuint id = it.value();
#ifdef QT_VIVANTE_VIDEO_DEBUG
qDebug() << "delete texture: " << id;
#endif