diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-05-04 18:27:48 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-05-04 18:27:48 -0700 |
commit | 00a1f44cfc4a379af0894638774eba0173d44960 (patch) | |
tree | c773cb494d9eef7ffb7bfd905da75fd587847029 /src | |
parent | da8aaa2114f4bbc8d0b2ee8308e440f0b7e8c4fa (diff) | |
download | qtlocation-mapboxgl-00a1f44cfc4a379af0894638774eba0173d44960.tar.gz |
Ensure no GL commands are executed after pause
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/map/map.cpp | 7 | ||||
-rw-r--r-- | src/mbgl/map/map_context.cpp | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 0464ed3f1e..3c1dcdd148 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -20,15 +20,12 @@ Map::~Map() { resume(); } -void Map::pause(bool waitForPause) { +void Map::pause() { assert(data->mode == MapMode::Continuous); std::unique_lock<std::mutex> lockPause(data->mutexPause); context->invoke(&MapContext::pause); - - if (waitForPause) { - data->condPaused.wait(lockPause); - } + data->condPaused.wait(lockPause); } void Map::resume() { diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index e72a174801..f655c9b0b2 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -77,6 +77,8 @@ MapContext::~MapContext() { } void MapContext::pause() { + MBGL_CHECK_ERROR(glFinish()); + view.deactivate(); std::unique_lock<std::mutex> lockPause(data.mutexPause); |