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
path: root/drape
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-12-07 12:38:40 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-12-07 12:47:27 +0300
commita3b8b93f874167e9ab710aec2e6672f243de6415 (patch)
treeff15dc921cf80f8e29ae760208473cb85c9cb9f6 /drape
parent46b80961c94ddde7aeaaaba988266f557d1a6d06 (diff)
Added attribute provider reuse
Diffstat (limited to 'drape')
-rw-r--r--drape/attribute_provider.cpp12
-rw-r--r--drape/attribute_provider.hpp3
2 files changed, 15 insertions, 0 deletions
diff --git a/drape/attribute_provider.cpp b/drape/attribute_provider.cpp
index 1271c8feb0..768bcee738 100644
--- a/drape/attribute_provider.cpp
+++ b/drape/attribute_provider.cpp
@@ -84,6 +84,18 @@ void AttributeProvider::InitStream(uint8_t streamIndex,
INIT_STREAM(streamIndex);
}
+void AttributeProvider::Reset(uint32_t vertexCount)
+{
+ m_vertexCount = vertexCount;
+}
+
+void AttributeProvider::UpdateStream(uint8_t streamIndex, ref_ptr<void> data)
+{
+ ASSERT_LESS(streamIndex, GetStreamCount(), ());
+ m_streams[streamIndex].m_data = data;
+ INIT_STREAM(streamIndex);
+}
+
#ifdef DEBUG
void AttributeProvider::CheckStreams() const
{
diff --git a/drape/attribute_provider.hpp b/drape/attribute_provider.hpp
index 05432e7484..6782358932 100644
--- a/drape/attribute_provider.hpp
+++ b/drape/attribute_provider.hpp
@@ -27,6 +27,9 @@ public:
BindingInfo const & bindingInfo,
ref_ptr<void> data);
+ void Reset(uint32_t vertexCount);
+ void UpdateStream(uint8_t streamIndex, ref_ptr<void> data);
+
private:
int32_t m_vertexCount;