summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-06-25 01:17:55 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-06-25 16:26:22 +0300
commit07086981fe18aebb04eb55c24286b06eb2bf4c6f (patch)
tree5a1da73b7f546e3c714d70959a7bf45602898e9a /include
parente32b0b7e20179c24ffa12325b4d5e184941acbb8 (diff)
downloadqtlocation-mapboxgl-07086981fe18aebb04eb55c24286b06eb2bf4c6f.tar.gz
Get rid of Environment et al.
mbgl::Environment is not used anymore and can removed.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/environment.hpp77
1 files changed, 0 insertions, 77 deletions
diff --git a/include/mbgl/map/environment.hpp b/include/mbgl/map/environment.hpp
deleted file mode 100644
index d8068187e7..0000000000
--- a/include/mbgl/map/environment.hpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef MBGL_MAP_MAP_ENVIRONMENT
-#define MBGL_MAP_MAP_ENVIRONMENT
-
-#include <mbgl/util/noncopyable.hpp>
-#include <mbgl/util/util.hpp>
-
-#include <thread>
-#include <functional>
-#include <vector>
-
-typedef struct uv_loop_s uv_loop_t;
-
-namespace mbgl {
-
-class FileSource;
-class Request;
-class Response;
-struct Resource;
-
-enum class ThreadType : uint8_t {
- Unknown = 0,
- Main = 1 << 0,
- Map = 1 << 1,
- TileWorker = 1 << 2,
-};
-
-class Environment final : private util::noncopyable {
-public:
- Environment(FileSource&);
- ~Environment();
-
- static Environment& Get();
- static bool inScope();
- static bool currentlyOn(ThreadType);
- static std::string threadName();
-
- unsigned getID() const;
-
- // #############################################################################################
-
- // File request APIs
- Request* request(const Resource&, std::function<void(const Response&)>);
- void cancelRequest(Request*);
-
- // #############################################################################################
-
- // Mark OpenGL objects for deletion
- void abandonVAO(uint32_t vao);
- void abandonBuffer(uint32_t buffer);
- void abandonTexture(uint32_t texture);
-
- // Actually remove the objects we marked as abandoned with the above methods.
- // Only call this while the OpenGL context is exclusive to this thread.
- void performCleanup();
-
-private:
- unsigned id;
- FileSource& fileSource;
-
- // Stores OpenGL objects that we marked for deletion
- std::vector<uint32_t> abandonedVAOs;
- std::vector<uint32_t> abandonedBuffers;
- std::vector<uint32_t> abandonedTextures;
-};
-
-class EnvironmentScope final {
-public:
- EnvironmentScope(Environment&, ThreadType, const std::string& name);
- ~EnvironmentScope();
-
-private:
- std::thread::id id;
-};
-
-}
-
-#endif