summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-12-04 14:18:41 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-12-06 14:08:40 -0800
commitde098591c5969735f2ed4683f9cc47221f152dd1 (patch)
tree0fda2a370b1c7cdf9a1ea1909231e8c38c859c2a
parent004d12ea0b89d5fe369ab5631e20cc7e2caef429 (diff)
downloadqtlocation-mapboxgl-de098591c5969735f2ed4683f9cc47221f152dd1.tar.gz
Remove Map::cleanup and Painter::cleanup
Both were noops.
-rw-r--r--include/mbgl/map/map.hpp4
-rw-r--r--src/mbgl/map/map.cpp12
-rw-r--r--src/mbgl/renderer/painter.cpp5
-rw-r--r--src/mbgl/renderer/painter.hpp2
4 files changed, 0 insertions, 23 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 45ec16ffd5..245aaf9ea7 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -56,9 +56,6 @@ public:
// Forces a map update: always triggers a rerender.
void update();
- // Triggers a cleanup that releases resources.
- void cleanup();
-
// Releases resources immediately
void terminate();
@@ -145,7 +142,6 @@ private:
std::thread thread;
std::unique_ptr<uv::async> asyncTerminate;
std::unique_ptr<uv::async> asyncRender;
- std::unique_ptr<uv::async> asyncCleanup;
// If cleared, the next time the render thread attempts to render the map, it will *actually*
// render the map.
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 539fd8ef08..f46e0f558b 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -153,7 +153,6 @@ void Map::start() {
fileSource.clearLoop();
// Closes all open handles on the loop. This means that the loop will automatically terminate.
- asyncCleanup.reset();
asyncRender.reset();
asyncTerminate.reset();
});
@@ -177,11 +176,6 @@ void Map::start() {
}
});
- asyncCleanup = util::make_unique<uv::async>(**loop, [this]() {
- assert(painter);
- painter->cleanup();
- });
-
thread = std::thread([this]() {
#ifndef NDEBUG
mapThread = std::this_thread::get_id();
@@ -276,12 +270,6 @@ void Map::swapped() {
rerender();
}
-void Map::cleanup() {
- if (asyncCleanup != nullptr) {
- asyncCleanup->send();
- }
-}
-
void Map::terminate() {
assert(painter);
painter->terminate();
diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp
index f350f2239b..c0c1fe2489 100644
--- a/src/mbgl/renderer/painter.cpp
+++ b/src/mbgl/renderer/painter.cpp
@@ -31,7 +31,6 @@ Painter::Painter(SpriteAtlas& spriteAtlas_, GlyphAtlas& glyphAtlas_)
}
Painter::~Painter() {
- cleanup();
}
bool Painter::needsAnimation() const {
@@ -118,11 +117,7 @@ void Painter::deleteShaders() {
gaussianShader = nullptr;
}
-void Painter::cleanup() {
-}
-
void Painter::terminate() {
- cleanup();
deleteShaders();
}
diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp
index be4bd12710..a39a368acb 100644
--- a/src/mbgl/renderer/painter.hpp
+++ b/src/mbgl/renderer/painter.hpp
@@ -64,8 +64,6 @@ public:
// Perform cleanup tasks that prepare shutting down the app. This doesn't mean that the
// app will be shut down. That means all operations must be automatically be reversed (e.g. through
// lazy initialization) in case rendering continues.
- void cleanup();
-
void terminate();
// Renders the backdrop of the OpenGL view. This also paints in areas where we don't have any