summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2014-09-19 16:16:44 -0400
committerMike Morris <michael.patrick.morris@gmail.com>2014-09-19 16:16:44 -0400
commit65df83ce4c0ccb410f3d6a9841aeea621483f0be (patch)
tree672295d4811baaeff02230184bea69df1271f03e /src
parentd48e5e72213851e4ffb443eae1b6243f491682c3 (diff)
downloadqtlocation-mapboxgl-65df83ce4c0ccb410f3d6a9841aeea621483f0be.tar.gz
bump mapnik-packaging, remove unnecessary view.make_active calls
Diffstat (limited to 'src')
-rw-r--r--src/map/map.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 64940af9e2..6db6fa2808 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -111,7 +111,6 @@ void Map::run() {
// If the map rendering wasn't started asynchronously, we perform one render
// *after* all events have been processed.
if (!async) {
- prepare();
render();
}
}
@@ -147,12 +146,10 @@ void Map::cleanup() {
void Map::cleanup(uv_async_t *async, int status) {
Map *map = static_cast<Map *>(async->data);
- map->view.make_active();
map->painter.cleanup();
}
void Map::terminate() {
- view.make_active();
painter.terminate();
}
@@ -189,8 +186,6 @@ void Map::terminate(uv_async_t *async, int status) {
#pragma mark - Setup
void Map::setup() {
- view.make_active();
-
painter.setup();
}
@@ -525,8 +520,6 @@ void Map::updateRenderState() {
}
void Map::prepare() {
- view.make_active();
-
// Update transform transitions.
animationTime = util::now();
if (transform.needsTransition()) {
@@ -544,11 +537,11 @@ void Map::prepare() {
spriteAtlas->update(*getSprite());
updateTiles();
-
- view.make_inactive();
}
void Map::render() {
+ view.make_active();
+
#if defined(DEBUG)
std::vector<std::string> debug;
#endif
@@ -583,6 +576,8 @@ void Map::render() {
}
glFlush();
+
+ view.make_inactive();
}
void Map::renderLayers(std::shared_ptr<StyleLayerGroup> group) {