diff options
-rw-r--r-- | src/mbgl/gl/texture_pool.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/gl/texture_pool.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/util/raster.hpp | 2 | ||||
-rw-r--r-- | test/gl/object.cpp | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/mbgl/gl/texture_pool.cpp b/src/mbgl/gl/texture_pool.cpp index 53e29b907b..c4984b0186 100644 --- a/src/mbgl/gl/texture_pool.cpp +++ b/src/mbgl/gl/texture_pool.cpp @@ -67,8 +67,8 @@ TexturePool::TexturePool() : impl(std::make_unique<Impl>()) { TexturePool::~TexturePool() { } -SharedTexture TexturePool::acquireTexture(gl::ObjectStore& store) { - return SharedTexture { impl->acquireTexture(store) , { this } }; +PooledTexture TexturePool::acquireTexture(gl::ObjectStore& store) { + return PooledTexture { impl->acquireTexture(store) , { this } }; } } // namespace gl diff --git a/src/mbgl/gl/texture_pool.hpp b/src/mbgl/gl/texture_pool.hpp index 3c38343f62..1cdcdf220c 100644 --- a/src/mbgl/gl/texture_pool.hpp +++ b/src/mbgl/gl/texture_pool.hpp @@ -18,14 +18,14 @@ struct TextureReleaser { void operator()(GLuint) const; }; -using SharedTexture = std_experimental::unique_resource<GLuint, TextureReleaser>; +using PooledTexture = std_experimental::unique_resource<GLuint, TextureReleaser>; class TexturePool : private util::noncopyable { public: TexturePool(); ~TexturePool(); - SharedTexture acquireTexture(gl::ObjectStore&); + PooledTexture acquireTexture(gl::ObjectStore&); private: friend TextureReleaser; diff --git a/src/mbgl/util/raster.hpp b/src/mbgl/util/raster.hpp index ecf026b5fa..b539032d81 100644 --- a/src/mbgl/util/raster.hpp +++ b/src/mbgl/util/raster.hpp @@ -34,7 +34,7 @@ public: GLsizei height = 0; // GL buffer object handle. - mbgl::optional<gl::SharedTexture> texture; + mbgl::optional<gl::PooledTexture> texture; // texture opacity double opacity = 0; diff --git a/test/gl/object.cpp b/test/gl/object.cpp index 1ed2bc91d6..f2b21ec9f4 100644 --- a/test/gl/object.cpp +++ b/test/gl/object.cpp @@ -130,7 +130,7 @@ TEST(GLObject, TexturePool) { mbgl::gl::TexturePool pool; - std::vector<mbgl::gl::SharedTexture> ids; + std::vector<mbgl::gl::PooledTexture> ids; // Fill an entire texture pool. for (auto i = 0; i != mbgl::gl::TextureMax; ++i) { @@ -149,7 +149,7 @@ TEST(GLObject, TexturePool) { // Trigger a new texture pool creation. { - mbgl::gl::SharedTexture id = pool.acquireTexture(store); + mbgl::gl::PooledTexture id = pool.acquireTexture(store); EXPECT_EQ(id, mbgl::gl::TextureMax + 1); EXPECT_TRUE(store.empty()); @@ -163,7 +163,7 @@ TEST(GLObject, TexturePool) { } // First pool is still full, thus creating a new pool. - mbgl::gl::SharedTexture id1 = pool.acquireTexture(store); + mbgl::gl::PooledTexture id1 = pool.acquireTexture(store); EXPECT_GT(id1.get(), mbgl::gl::TextureMax); EXPECT_TRUE(store.empty()); @@ -175,7 +175,7 @@ TEST(GLObject, TexturePool) { EXPECT_TRUE(store.empty()); // The first pool is now gone, the next pool is now in use. - mbgl::gl::SharedTexture id2 = pool.acquireTexture(store); + mbgl::gl::PooledTexture id2 = pool.acquireTexture(store); EXPECT_GT(id2.get(), id1.get()); id2.reset(); |