diff options
author | Roman Kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-06-24 12:03:11 +0300 |
---|---|---|
committer | Roman Kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-06-24 12:03:11 +0300 |
commit | 70c067fc30c0c17fa3e4dabafb17a093d1d8167f (patch) | |
tree | b87dc1bcd9801b52048635a3d2c3f2d2e1bd7506 /drape/texture.hpp | |
parent | 6f3447e35cd5eebca7c6a4c8c2f3dea0be228f16 (diff) |
Fixed race in texture manager
Diffstat (limited to 'drape/texture.hpp')
-rw-r--r-- | drape/texture.hpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drape/texture.hpp b/drape/texture.hpp index 41d6f92478..d5081f644e 100644 --- a/drape/texture.hpp +++ b/drape/texture.hpp @@ -7,6 +7,8 @@ #include "geometry/rect2d.hpp" +#include "base/macros.hpp" + #include "std/cstdint.hpp" #include "std/function.hpp" @@ -52,23 +54,21 @@ public: virtual bool HasEnoughSpace(uint32_t /*newKeysCount*/) const { return true; } using Params = HWTexture::Params; - void Create(Params const & params); - void Create(Params const & params, ref_ptr<void> data); - - void UploadData(uint32_t x, uint32_t y, uint32_t width, uint32_t height, ref_ptr<void> data); - virtual TextureFormat GetFormat() const; virtual uint32_t GetWidth() const; virtual uint32_t GetHeight() const; + virtual float GetS(uint32_t x) const; + virtual float GetT(uint32_t y) const; + virtual uint32_t GetID() const; - float GetS(uint32_t x) const; - float GetT(uint32_t y) const; - uint32_t GetID() const; - - void Bind() const; + virtual void Bind() const; // Texture must be bound before calling this method. - void SetFilter(glConst filter); + virtual void SetFilter(glConst filter); + + void Create(Params const & params); + void Create(Params const & params, ref_ptr<void> data); + void UploadData(uint32_t x, uint32_t y, uint32_t width, uint32_t height, ref_ptr<void> data); static uint32_t GetMaxTextureSize(); @@ -77,5 +77,7 @@ protected: bool AllocateTexture(ref_ptr<HWTextureAllocator> allocator); drape_ptr<HWTexture> m_hwTexture; + + DISALLOW_COPY_AND_MOVE(Texture); }; } // namespace dp |