diff options
-rw-r--r-- | src/mbgl/geometry/buffer.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/geometry/glyph_atlas.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/geometry/line_atlas.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/geometry/vao.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/gl/gl_object_store.cpp (renamed from src/mbgl/util/gl_object_store.cpp) | 14 | ||||
-rw-r--r-- | src/mbgl/gl/gl_object_store.hpp (renamed from src/mbgl/util/gl_object_store.hpp) | 5 | ||||
-rw-r--r-- | src/mbgl/map/map_context.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/map/map_context.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/sprite/sprite_atlas.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/util/texture_pool.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/util/thread_context.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/util/thread_context.hpp | 9 |
12 files changed, 24 insertions, 26 deletions
diff --git a/src/mbgl/geometry/buffer.hpp b/src/mbgl/geometry/buffer.hpp index 9075a26c77..df4c6a322d 100644 --- a/src/mbgl/geometry/buffer.hpp +++ b/src/mbgl/geometry/buffer.hpp @@ -3,7 +3,7 @@ #include <mbgl/gl/gl.hpp> #include <mbgl/platform/log.hpp> -#include <mbgl/util/gl_object_store.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/thread_context.hpp> diff --git a/src/mbgl/geometry/glyph_atlas.cpp b/src/mbgl/geometry/glyph_atlas.cpp index b74535ffa1..c220ec53b1 100644 --- a/src/mbgl/geometry/glyph_atlas.cpp +++ b/src/mbgl/geometry/glyph_atlas.cpp @@ -5,7 +5,7 @@ #include <mbgl/gl/gl.hpp> #include <mbgl/platform/log.hpp> #include <mbgl/platform/platform.hpp> -#include <mbgl/util/gl_object_store.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <mbgl/util/thread_context.hpp> #include <cassert> diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp index 96e238c5e6..63a5a34ea0 100644 --- a/src/mbgl/geometry/line_atlas.cpp +++ b/src/mbgl/geometry/line_atlas.cpp @@ -2,7 +2,7 @@ #include <mbgl/gl/gl.hpp> #include <mbgl/platform/log.hpp> #include <mbgl/platform/platform.hpp> -#include <mbgl/util/gl_object_store.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <mbgl/util/thread_context.hpp> #include <boost/functional/hash.hpp> diff --git a/src/mbgl/geometry/vao.cpp b/src/mbgl/geometry/vao.cpp index d711df6f9f..db4d233887 100644 --- a/src/mbgl/geometry/vao.cpp +++ b/src/mbgl/geometry/vao.cpp @@ -1,6 +1,6 @@ #include <mbgl/geometry/vao.hpp> #include <mbgl/platform/log.hpp> -#include <mbgl/util/gl_object_store.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <mbgl/util/string.hpp> #include <mbgl/util/thread_context.hpp> diff --git a/src/mbgl/util/gl_object_store.cpp b/src/mbgl/gl/gl_object_store.cpp index d6fee17a13..a830b6d73e 100644 --- a/src/mbgl/util/gl_object_store.cpp +++ b/src/mbgl/gl/gl_object_store.cpp @@ -1,4 +1,4 @@ -#include <mbgl/util/gl_object_store.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <mbgl/util/thread.hpp> #include <mbgl/geometry/vao.hpp> @@ -7,25 +7,25 @@ #include <cassert> namespace mbgl { -namespace util { +namespace gl { void GLObjectStore::abandonVAO(GLuint vao) { - assert(ThreadContext::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); abandonedVAOs.emplace_back(vao); } void GLObjectStore::abandonBuffer(GLuint buffer) { - assert(ThreadContext::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); abandonedBuffers.emplace_back(buffer); } void GLObjectStore::abandonTexture(GLuint texture) { - assert(ThreadContext::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); abandonedTextures.emplace_back(texture); } void GLObjectStore::performCleanup() { - assert(ThreadContext::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); if (!abandonedVAOs.empty()) { MBGL_CHECK_ERROR(VertexArrayObject::Delete(static_cast<GLsizei>(abandonedVAOs.size()), @@ -46,5 +46,5 @@ void GLObjectStore::performCleanup() { } } -} // namespace util +} // namespace gl } // namespace mbgl diff --git a/src/mbgl/util/gl_object_store.hpp b/src/mbgl/gl/gl_object_store.hpp index e806ac1580..ac8ddd2748 100644 --- a/src/mbgl/util/gl_object_store.hpp +++ b/src/mbgl/gl/gl_object_store.hpp @@ -4,11 +4,10 @@ #include <mbgl/gl/gl.hpp> #include <mbgl/util/noncopyable.hpp> -#include <cstdint> #include <vector> namespace mbgl { -namespace util { +namespace gl { class GLObjectStore : private util::noncopyable { public: @@ -29,7 +28,7 @@ private: std::vector<GLuint> abandonedTextures; }; -} // namespace util +} // namespace gl } // namespace mbgl #endif diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index 6b4657f0af..46d979a473 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -16,7 +16,7 @@ #include <mbgl/sprite/sprite_atlas.hpp> #include <mbgl/sprite/sprite_store.hpp> -#include <mbgl/util/gl_object_store.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <mbgl/util/worker.hpp> #include <mbgl/util/texture_pool.hpp> #include <mbgl/util/exception.hpp> diff --git a/src/mbgl/map/map_context.hpp b/src/mbgl/map/map_context.hpp index dd0c2de465..617e178159 100644 --- a/src/mbgl/map/map_context.hpp +++ b/src/mbgl/map/map_context.hpp @@ -8,9 +8,9 @@ #include <mbgl/map/map_data.hpp> #include <mbgl/style/style.hpp> #include <mbgl/util/async_task.hpp> -#include <mbgl/util/gl_object_store.hpp> #include <mbgl/util/ptr.hpp> #include <mbgl/util/optional.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <vector> @@ -80,7 +80,7 @@ private: std::unique_ptr<MapData> dataPtr; MapData& data; - util::GLObjectStore glObjectStore; + gl::GLObjectStore glObjectStore; Update updateFlags = Update::Nothing; util::AsyncTask asyncUpdate; diff --git a/src/mbgl/sprite/sprite_atlas.cpp b/src/mbgl/sprite/sprite_atlas.cpp index b35b9e9758..269ceb2c7c 100644 --- a/src/mbgl/sprite/sprite_atlas.cpp +++ b/src/mbgl/sprite/sprite_atlas.cpp @@ -3,7 +3,7 @@ #include <mbgl/gl/gl.hpp> #include <mbgl/platform/log.hpp> #include <mbgl/platform/platform.hpp> -#include <mbgl/util/gl_object_store.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <mbgl/util/math.hpp> #include <mbgl/util/std.hpp> #include <mbgl/util/constants.hpp> diff --git a/src/mbgl/util/texture_pool.cpp b/src/mbgl/util/texture_pool.cpp index d4afb1f868..ec175c924a 100644 --- a/src/mbgl/util/texture_pool.cpp +++ b/src/mbgl/util/texture_pool.cpp @@ -1,6 +1,6 @@ #include <mbgl/util/texture_pool.hpp> -#include <mbgl/util/gl_object_store.hpp> +#include <mbgl/gl/gl_object_store.hpp> #include <mbgl/util/thread_context.hpp> #include <vector> diff --git a/src/mbgl/util/thread_context.cpp b/src/mbgl/util/thread_context.cpp index b611b3d023..4853388661 100644 --- a/src/mbgl/util/thread_context.cpp +++ b/src/mbgl/util/thread_context.cpp @@ -60,7 +60,7 @@ void ThreadContext::setFileSource(FileSource* fileSource) { } } -GLObjectStore* ThreadContext::getGLObjectStore() { +gl::GLObjectStore* ThreadContext::getGLObjectStore() { if (current.get() != nullptr) { return current.get()->glObjectStore; } else { @@ -68,7 +68,7 @@ GLObjectStore* ThreadContext::getGLObjectStore() { } } -void ThreadContext::setGLObjectStore(GLObjectStore* glObjectStore) { +void ThreadContext::setGLObjectStore(gl::GLObjectStore* glObjectStore) { if (current.get() != nullptr) { current.get()->glObjectStore = glObjectStore; } else { diff --git a/src/mbgl/util/thread_context.hpp b/src/mbgl/util/thread_context.hpp index 2b22b2faf4..8601cddbe1 100644 --- a/src/mbgl/util/thread_context.hpp +++ b/src/mbgl/util/thread_context.hpp @@ -8,11 +8,10 @@ namespace mbgl { class FileSource; +namespace gl { class GLObjectStore; } namespace util { -class GLObjectStore; - enum class ThreadPriority : bool { Regular, Low, @@ -37,15 +36,15 @@ public: static FileSource* getFileSource(); static void setFileSource(FileSource* fileSource); - static GLObjectStore* getGLObjectStore(); - static void setGLObjectStore(GLObjectStore* glObjectStore); + static gl::GLObjectStore* getGLObjectStore(); + static void setGLObjectStore(gl::GLObjectStore* glObjectStore); std::string name; ThreadType type; ThreadPriority priority; FileSource* fileSource = nullptr; - GLObjectStore* glObjectStore = nullptr; + gl::GLObjectStore* glObjectStore = nullptr; }; } // namespace util |