Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
31
libs/drape_frontend/threads_commutator.hpp
Normal file
31
libs/drape_frontend/threads_commutator.hpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include "drape/pointers.hpp"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace df
|
||||
{
|
||||
|
||||
class Message;
|
||||
enum class MessagePriority;
|
||||
class BaseRenderer;
|
||||
|
||||
class ThreadsCommutator
|
||||
{
|
||||
public:
|
||||
enum ThreadName
|
||||
{
|
||||
RenderThread,
|
||||
ResourceUploadThread
|
||||
};
|
||||
|
||||
void RegisterThread(ThreadName name, BaseRenderer * acceptor);
|
||||
void PostMessage(ThreadName name, drape_ptr<Message> && message, MessagePriority priority);
|
||||
|
||||
private:
|
||||
using TAcceptorsMap = std::map<ThreadName, BaseRenderer *>;
|
||||
TAcceptorsMap m_acceptors;
|
||||
};
|
||||
|
||||
} // namespace df
|
||||
Loading…
Add table
Add a link
Reference in a new issue