Welcome to mirror list, hosted at ThFree Co, Russian Federation.

engine_context.hpp « drape_frontend - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 54a66dd12c31dbafa48fc5e737e9495b50c2a6ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once

#include "drape_frontend/map_shape.hpp"
#include "drape_frontend/tile_utils.hpp"
#include "drape_frontend/threads_commutator.hpp"

#include "drape/pointers.hpp"

namespace dp
{
class TextureManager;
} // namespace dp

namespace df
{

class Message;

class EngineContext
{
public:
  EngineContext(TileKey tileKey, ref_ptr<ThreadsCommutator> commutator,
                ref_ptr<dp::TextureManager> texMng);

  TileKey const & GetTileKey() const { return m_tileKey; }

  ref_ptr<dp::TextureManager> GetTextureManager() const;

  void BeginReadTile();
  void Flush(TMapShapes && shapes);
  void FlushOverlays(TMapShapes && shapes);
  void EndReadTile();

private:
  void PostMessage(drape_ptr<Message> && message);

  TileKey m_tileKey;
  ref_ptr<ThreadsCommutator> m_commutator;
  ref_ptr<dp::TextureManager> m_texMng;
};

} // namespace df