1#pragma once
2
3#include <mbgl/renderer/query.hpp>
4#include <mbgl/renderer/mode.hpp>
5#include <mbgl/annotation/annotation.hpp>
6#include <mbgl/util/geo.hpp>
7#include <mbgl/util/geo.hpp>
8
9#include <functional>
10#include <memory>
11#include <string>
12#include <vector>
13
14namespace mbgl {
15
16class FileSource;
17class RendererBackend;
18class RendererObserver;
19class RenderedQueryOptions;
20class Scheduler;
21class SourceQueryOptions;
22class UpdateParameters;
23
24class Renderer {
25public:
26 Renderer(RendererBackend&, float pixelRatio_, FileSource&, Scheduler&,
27 GLContextMode = GLContextMode::Unique,
28 const optional<std::string> programCacheDir = {},
29 const optional<std::string> localFontFamily = {});
30 ~Renderer();
31
32 void markContextLost();
33
34 void setObserver(RendererObserver*);
35
36 void render(const UpdateParameters&);
37
38 // Feature queries
39 std::vector<Feature> queryRenderedFeatures(const ScreenLineString&, const RenderedQueryOptions& options = {}) const;
40 std::vector<Feature> queryRenderedFeatures(const ScreenCoordinate& point, const RenderedQueryOptions& options = {}) const;
41 std::vector<Feature> queryRenderedFeatures(const ScreenBox& box, const RenderedQueryOptions& options = {}) const;
42 std::vector<Feature> querySourceFeatures(const std::string& sourceID, const SourceQueryOptions& options = {}) const;
43 AnnotationIDs queryPointAnnotations(const ScreenBox& box) const;
44 AnnotationIDs queryShapeAnnotations(const ScreenBox& box) const;
45 AnnotationIDs getAnnotationIDs(const std::vector<Feature>&) const;
46
47 // Debug
48 void dumpDebugLogs();
49
50 // Memory
51 void reduceMemoryUse();
52
53private:
54 class Impl;
55 std::unique_ptr<Impl> impl;
56};
57
58} // namespace mbgl
59

source code of qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/renderer/renderer.hpp