summaryrefslogtreecommitdiff
path: root/platform/node
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-02-27 18:33:16 +0100
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-03-23 14:50:11 -0700
commit8e5214144ec4f3a4fb40b7a7e4d8f09fd10dbb78 (patch)
treecf79b67b4af670438cbc79a524be82e88da83904 /platform/node
parentd7227e13a7a87cf50a4c8c1f0615fc565f5a2679 (diff)
downloadqtlocation-mapboxgl-8e5214144ec4f3a4fb40b7a7e4d8f09fd10dbb78.tar.gz
[core] Ensure that a BackendScope exists when doing GL calls
Diffstat (limited to 'platform/node')
-rw-r--r--platform/node/src/node_map.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 881c1b2fb7..52d659b117 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -10,6 +10,7 @@
#include <mbgl/style/conversion/layer.hpp>
#include <mbgl/style/conversion/filter.hpp>
#include <mbgl/sprite/sprite_image.cpp>
+#include <mbgl/map/backend_scope.hpp>
#include <mbgl/map/query.hpp>
#include <unistd.h>
@@ -369,6 +370,7 @@ void NodeMap::startRender(NodeMap::RenderOptions options) {
static_cast<uint32_t>(options.height * pixelRatio) };
if (!view || view->getSize() != fbSize) {
view.reset();
+ mbgl::BackendScope scope { backend };
view = std::make_unique<mbgl::OffscreenView>(backend.getContext(), fbSize);
}