Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'drape/texture.cpp')
-rw-r--r--drape/texture.cpp35
1 files changed, 10 insertions, 25 deletions
diff --git a/drape/texture.cpp b/drape/texture.cpp
index c198dc2722..e764f5e17b 100644
--- a/drape/texture.cpp
+++ b/drape/texture.cpp
@@ -1,7 +1,7 @@
#include "drape/texture.hpp"
-#include "drape/glfunctions.hpp"
#include "drape/glextensions_list.hpp"
+#include "drape/glfunctions.hpp"
#include "drape/utils/gpu_mem_tracker.hpp"
#include "base/math.hpp"
@@ -10,25 +10,13 @@
namespace dp
{
+Texture::ResourceInfo::ResourceInfo(m2::RectF const & texRect) : m_texRect(texRect) {}
-Texture::ResourceInfo::ResourceInfo(m2::RectF const & texRect)
- : m_texRect(texRect) {}
+m2::RectF const & Texture::ResourceInfo::GetTexRect() const { return m_texRect; }
-m2::RectF const & Texture::ResourceInfo::GetTexRect() const
-{
- return m_texRect;
-}
+Texture::Texture() {}
-//////////////////////////////////////////////////////////////////
-
-Texture::Texture()
-{
-}
-
-Texture::~Texture()
-{
- Destroy();
-}
+Texture::~Texture() { Destroy(); }
void Texture::Create(Params const & params)
{
@@ -42,7 +30,8 @@ void Texture::Create(Params const & params, ref_ptr<void> data)
m_hwTexture->Create(params, data);
}
-void Texture::UploadData(uint32_t x, uint32_t y, uint32_t width, uint32_t height, ref_ptr<void> data)
+void Texture::UploadData(uint32_t x, uint32_t y, uint32_t width, uint32_t height,
+ ref_ptr<void> data)
{
ASSERT(m_hwTexture != nullptr, ());
m_hwTexture->UploadData(x, y, width, height, data);
@@ -98,13 +87,10 @@ void Texture::SetFilter(glConst filter)
uint32_t Texture::GetMaxTextureSize()
{
- return GLFunctions::glGetInteger(gl_const::GLMaxTextureSize);
+ return static_cast<uint32_t>(GLFunctions::glGetInteger(gl_const::GLMaxTextureSize));
}
-void Texture::Destroy()
-{
- m_hwTexture.reset();
-}
+void Texture::Destroy() { m_hwTexture.reset(); }
bool Texture::AllocateTexture(ref_ptr<HWTextureAllocator> allocator)
{
@@ -116,5 +102,4 @@ bool Texture::AllocateTexture(ref_ptr<HWTextureAllocator> allocator)
return false;
}
-
-} // namespace dp
+} // namespace dp