summaryrefslogtreecommitdiff
path: root/src/mbgl/gl
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-09-28 17:50:24 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-09-28 19:03:03 +0200
commit068732fc9e1d3aaf2c353ad5bf4311e16fb46531 (patch)
treed57411ae6c3b152767aa6b1098837e6541790470 /src/mbgl/gl
parent9a41b8abaf75a344bd86d55878ee87179eb63d95 (diff)
downloadqtlocation-mapboxgl-068732fc9e1d3aaf2c353ad5bf4311e16fb46531.tar.gz
[core] don't iterate too much over program objects scheduled for deletion
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r--src/mbgl/gl/context.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index fbe7b39a6f..03b0e7abdb 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -61,10 +61,8 @@ void Context::setDirtyState() {
void Context::performCleanup() {
for (GLuint id : abandonedPrograms) {
- for (const auto& p : abandonedPrograms) {
- if (program == p) {
- program.setDirty();
- }
+ if (program == id) {
+ program.setDirty();
}
MBGL_CHECK_ERROR(glDeleteProgram(id));
}