diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-05-04 20:12:32 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-05-04 21:02:40 +0300 |
commit | f59ba4e3f3b48b3fbe921bd89f211f90a811e188 (patch) | |
tree | b73ccbb7bf12d54bea5a26ca566bea06ce7408e0 /platform/qt | |
parent | 36ec203324a3873879908ffd10d5ebd57ecf1358 (diff) | |
download | qtlocation-mapboxgl-f59ba4e3f3b48b3fbe921bd89f211f90a811e188.tar.gz |
Revert "[Qt] Don't regen BackendScope on every QMapboxGL::render() call"
This reverts commit 806da5d940aed7021f921ab98b9ae8e4e364f732.
Diffstat (limited to 'platform/qt')
-rw-r--r-- | platform/qt/src/qmapboxgl.cpp | 4 | ||||
-rw-r--r-- | platform/qt/src/qmapboxgl_p.hpp | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp index 1f4ad3b456..edb8afa28a 100644 --- a/platform/qt/src/qmapboxgl.cpp +++ b/platform/qt/src/qmapboxgl.cpp @@ -1510,9 +1510,7 @@ void QMapboxGL::render() #endif // The OpenGL implementation automatically enables the OpenGL context for us. - if (!d_ptr->backendScope) { - d_ptr->backendScope = std::make_unique<mbgl::BackendScope>(*d_ptr, mbgl::BackendScope::ScopeType::Implicit); - } + mbgl::BackendScope scope { *d_ptr, mbgl::BackendScope::ScopeType::Implicit }; d_ptr->dirty = false; d_ptr->mapObj->render(*d_ptr); diff --git a/platform/qt/src/qmapboxgl_p.hpp b/platform/qt/src/qmapboxgl_p.hpp index 91b2ab752e..49a7942cce 100644 --- a/platform/qt/src/qmapboxgl_p.hpp +++ b/platform/qt/src/qmapboxgl_p.hpp @@ -55,7 +55,6 @@ public: std::unique_ptr<mbgl::DefaultFileSource> fileSourceObj; std::shared_ptr<mbgl::ThreadPool> threadPool; std::unique_ptr<mbgl::Map> mapObj; - std::unique_ptr<mbgl::BackendScope> backendScope; bool dirty { false }; |