blob: 86c17b10fd7075e3bb46ca93056021207ba79ea0 (
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
59
60
61
62
63
64
65
66
67
68
|
#pragma once
#include <mbgl/renderer/render_source.hpp>
#include <mbgl/renderer/render_tile.hpp>
#include <mbgl/style/sources/image_source_impl.hpp>
namespace mbgl {
class RenderLayer;
class PaintParameters;
class RasterBucket;
namespace gl {
class Context;
} // namespace gl
class RenderImageSource : public RenderSource {
public:
RenderImageSource(Immutable<style::ImageSource::Impl>);
~RenderImageSource() override;
bool isLoaded() const final;
void upload(gl::Context&);
void startRender(algorithm::ClipIDGenerator&,
const mat4& projMatrix,
const mat4& clipMatrix,
const TransformState&) final;
void render(Painter&, PaintParameters&, const RenderLayer&);
void finishRender(Painter&) final;
void updateTiles(const TileParameters&) final;
void removeTiles() final {
}
void invalidateTiles() final {
}
void reloadTiles() final {
}
std::map<UnwrappedTileID, RenderTile>& getRenderTiles() final {
return tiles;
}
std::unordered_map<std::string, std::vector<Feature>>
queryRenderedFeatures(const ScreenLineString& geometry,
const TransformState& transformState,
const RenderedQueryOptions& options) const final;
std::vector<Feature> querySourceFeatures(const SourceQueryOptions&) const final;
void setCacheSize(size_t) final {
}
void onLowMemory() final {
}
void dumpDebugLogs() const final;
private:
const style::ImageSource::Impl& impl() const;
std::map<UnwrappedTileID, RenderTile> tiles;
std::vector<UnwrappedTileID> tileIds;
std::unique_ptr<RasterBucket> bucket;
std::vector<mat4> matrices;
bool shouldRender;
};
} // namespace mbgl
|