blob: 9bd64e48190b9228a479c1772ba647094384f593 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#pragma once
#include <mbgl/actor/actor.hpp>
#include <mbgl/annotation/annotation.hpp>
#include <mbgl/renderer/renderer_frontend.hpp>
#include <mbgl/util/geo.hpp>
#include <mbgl/util/run_loop.hpp>
#include <functional>
#include <memory>
#include <vector>
#include <string>
#include "map_renderer.hpp"
namespace mbgl {
class RenderedQueryOptions;
class SourceQueryOptions;
namespace util {
class AsyncTask;
} // namespace util
namespace android {
class AndroidRendererFrontend : public RendererFrontend {
public:
AndroidRendererFrontend(MapRenderer&);
~AndroidRendererFrontend() override;
void reset() override;
void setObserver(RendererObserver&) override;
void update(std::shared_ptr<UpdateParameters>) override;
// Feature querying
std::vector<Feature> queryRenderedFeatures(const ScreenCoordinate&, const RenderedQueryOptions&) const;
std::vector<Feature> queryRenderedFeatures(const ScreenBox&, const RenderedQueryOptions&) const;
std::vector<Feature> querySourceFeatures(const std::string& sourceID, const SourceQueryOptions&) const;
AnnotationIDs queryPointAnnotations(const ScreenBox& box) const;
AnnotationIDs queryShapeAnnotations(const ScreenBox& box) const;
// Memory
void reduceMemoryUse();
private:
MapRenderer& mapRenderer;
util::RunLoop* mapRunLoop;
std::unique_ptr<util::AsyncTask> updateAsyncTask;
std::shared_ptr<UpdateParameters> updateParams;
};
} // namespace android
} // namespace mbgl
|