forked from organicmaps/organicmaps
Review fixes
This commit is contained in:
parent
c3277e28e9
commit
0a6337bb2a
5 changed files with 19 additions and 3 deletions
|
@ -84,7 +84,7 @@ void BackendRenderer::AcceptMessage(ref_ptr<Message> message)
|
|||
TTilesCollection tiles = m_requestedTiles->GetTiles();
|
||||
if (!tiles.empty())
|
||||
{
|
||||
ScreenBase screen = m_requestedTiles->GetScreen();
|
||||
ScreenBase const screen = m_requestedTiles->GetScreen();
|
||||
m_readManager->UpdateCoverage(screen, tiles, m_texMng);
|
||||
|
||||
gui::CountryStatusHelper & helper = gui::DrapeGui::Instance().GetCountryStatusHelper();
|
||||
|
|
|
@ -45,14 +45,18 @@ bool MessageAcceptor::IsInInfinityWaiting() const
|
|||
return m_infinityWaiting;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MESSAGE_QUEUE
|
||||
|
||||
bool MessageAcceptor::IsQueueEmpty() const
|
||||
{
|
||||
return m_messageQueue.IsEmpty();
|
||||
}
|
||||
|
||||
bool MessageAcceptor::GetQueueSize() const
|
||||
size_t MessageAcceptor::GetQueueSize() const
|
||||
{
|
||||
return m_messageQueue.GetSize();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace df
|
||||
|
|
|
@ -28,8 +28,11 @@ protected:
|
|||
void CloseQueue();
|
||||
|
||||
bool IsInInfinityWaiting() const;
|
||||
|
||||
#ifdef DEBUG_MESSAGE_QUEUE
|
||||
bool IsQueueEmpty() const;
|
||||
bool GetQueueSize() const;
|
||||
size_t GetQueueSize() const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
friend class ThreadsCommutator;
|
||||
|
|
|
@ -60,6 +60,8 @@ void MessageQueue::PushMessage(drape_ptr<Message> && message, MessagePriority pr
|
|||
CancelWaitImpl();
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MESSAGE_QUEUE
|
||||
|
||||
bool MessageQueue::IsEmpty() const
|
||||
{
|
||||
lock_guard<mutex> lock(m_mutex);
|
||||
|
@ -72,6 +74,8 @@ size_t MessageQueue::GetSize() const
|
|||
return m_messages.size();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void MessageQueue::CancelWait()
|
||||
{
|
||||
lock_guard<mutex> lock(m_mutex);
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
namespace df
|
||||
{
|
||||
|
||||
//#define DEBUG_MESSAGE_QUEUE
|
||||
|
||||
class MessageQueue
|
||||
{
|
||||
public:
|
||||
|
@ -24,8 +26,11 @@ public:
|
|||
void PushMessage(drape_ptr<Message> && message, MessagePriority priority);
|
||||
void CancelWait();
|
||||
void ClearQuery();
|
||||
|
||||
#ifdef DEBUG_MESSAGE_QUEUE
|
||||
bool IsEmpty() const;
|
||||
size_t GetSize() const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
void CancelWaitImpl();
|
||||
|
|
Loading…
Add table
Reference in a new issue