diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-07-15 12:02:58 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-07-16 19:38:39 +0300 |
commit | dd818874cc1d959960e428dfcf93c7ed4bf78160 (patch) | |
tree | c48259b6e78f1c5f862b7c699c62dc7926703f5c | |
parent | cd2c1200c87afbe05bd2d63caa0959a0fff32d94 (diff) | |
download | qtlocation-mapboxgl-dd818874cc1d959960e428dfcf93c7ed4bf78160.tar.gz |
Remove hacks because of Glyph requests could not be canceled
-rw-r--r-- | src/mbgl/util/worker.cpp | 8 | ||||
-rw-r--r-- | test/style/pending_resources.cpp | 5 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/mbgl/util/worker.cpp b/src/mbgl/util/worker.cpp index 60adbc803e..516d2f5dba 100644 --- a/src/mbgl/util/worker.cpp +++ b/src/mbgl/util/worker.cpp @@ -14,11 +14,7 @@ namespace mbgl { class Worker::Impl { public: - explicit Impl(FileSource* fs) { - // FIXME: Workers should not access the FileSource but it - // is currently needed because of GlyphsPBF. See #1664. - util::ThreadContext::setFileSource(fs); - } + Impl() = default; void parseRasterTile(RasterBucket* bucket, std::string data, std::function<void (TileParseResult)> callback) { std::unique_ptr<util::Image> image(new util::Image(data)); @@ -59,7 +55,7 @@ public: Worker::Worker(std::size_t count) { util::ThreadContext context = {"Worker", util::ThreadType::Worker, util::ThreadPriority::Low}; for (std::size_t i = 0; i < count; i++) { - threads.emplace_back(std::make_unique<util::Thread<Impl>>(context, util::ThreadContext::getFileSource())); + threads.emplace_back(std::make_unique<util::Thread<Impl>>(context)); } } diff --git a/test/style/pending_resources.cpp b/test/style/pending_resources.cpp index 4513d18645..3ba59657de 100644 --- a/test/style/pending_resources.cpp +++ b/test/style/pending_resources.cpp @@ -21,11 +21,6 @@ class PendingResources : public ::testing::TestWithParam<std::string> { // the Map object after that. The idea here is to test if these pending requests // are getting canceled correctly if on shutdown. TEST_P(PendingResources, DeleteMapObjectWithPendingRequest) { - // TODO: The glyphs test is blocked by the issue #1664. - if (GetParam() == "glyphs.pbf") { - return; - } - util::RunLoop loop(uv_default_loop()); auto display = std::make_shared<mbgl::HeadlessDisplay>(); |