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:
authorRoman Kuznetsov <r.kuznetsow@gmail.com>2017-01-31 17:57:53 +0300
committerGitHub <noreply@github.com>2017-01-31 17:57:53 +0300
commitb8bc6b1964451fc03e2cb61ebd801abb2350d3ca (patch)
tree7e25f5ff8f8921f9dc0715d7b83a1ad86527e74b
parentfa27516e26577fd62abc9c069b9bafb48690c484 (diff)
parente6eca03d15cebef2c7db3c144aa7a92e338b3e26 (diff)
Merge pull request #5319 from darina/traffic-recover-fixbeta-601
Fixed traffic recovering after receiving a response in background.
-rw-r--r--drape/batcher.cpp6
-rw-r--r--drape/batcher.hpp1
-rw-r--r--drape_frontend/batchers_pool.hpp6
-rw-r--r--drape_frontend/message_subclasses.hpp1
4 files changed, 12 insertions, 2 deletions
diff --git a/drape/batcher.cpp b/drape/batcher.cpp
index 1f4cdc1ea9..aa7a67e670 100644
--- a/drape/batcher.cpp
+++ b/drape/batcher.cpp
@@ -196,6 +196,12 @@ void Batcher::EndSession()
m_flushInterface = TFlushFn();
}
+void Batcher::ResetSession()
+{
+ m_flushInterface = TFlushFn();
+ m_buckets.clear();
+}
+
void Batcher::SetFeatureMinZoom(int minZoom)
{
m_featureMinZoom = minZoom;
diff --git a/drape/batcher.hpp b/drape/batcher.hpp
index 18eeac31d6..f3c3839aa0 100644
--- a/drape/batcher.hpp
+++ b/drape/batcher.hpp
@@ -57,6 +57,7 @@ public:
typedef function<void (GLState const &, drape_ptr<RenderBucket> &&)> TFlushFn;
void StartSession(TFlushFn const & flusher);
void EndSession();
+ void ResetSession();
void SetFeatureMinZoom(int minZoom);
diff --git a/drape_frontend/batchers_pool.hpp b/drape_frontend/batchers_pool.hpp
index 8b14fb09fe..fc28e964c5 100644
--- a/drape_frontend/batchers_pool.hpp
+++ b/drape_frontend/batchers_pool.hpp
@@ -28,7 +28,11 @@ public:
~BatchersPool()
{
for (auto const & p : m_batchers)
- m_pool.Return(p.second.first);
+ {
+ dp::Batcher * batcher = p.second.first;
+ batcher->ResetSession();
+ m_pool.Return(batcher);
+ }
m_batchers.clear();
}
diff --git a/drape_frontend/message_subclasses.hpp b/drape_frontend/message_subclasses.hpp
index cba546bc12..9883588f29 100644
--- a/drape_frontend/message_subclasses.hpp
+++ b/drape_frontend/message_subclasses.hpp
@@ -1047,7 +1047,6 @@ public:
{}
Type GetType() const override { return Message::UpdateTraffic; }
- bool IsGLContextDependent() const override { return true; }
TrafficSegmentsColoring & GetSegmentsColoring() { return m_segmentsColoring; }