blob: 63892517090c1b0eb95d783eda66a4031ff7e754 (
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
|
#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;
class LatLng;
namespace gl {
class Context;
} // namespace gl
class RenderImageSource : public RenderSource {
public:
RenderImageSource(Immutable<style::ImageSource::Impl>);
~RenderImageSource() override;
bool isLoaded() const final;
void startRender(Painter&) final;
void render(Painter&, PaintParameters&, const RenderLayer&);
void finishRender(Painter&) final;
void update(Immutable<style::Source::Impl>,
const std::vector<Immutable<style::Layer::Impl>>&,
bool needsRendering,
bool needsRelayout,
const TileParameters&) final;
std::vector<std::reference_wrapper<RenderTile>> getRenderTiles() final {
return {};
}
std::unordered_map<std::string, std::vector<Feature>>
queryRenderedFeatures(const ScreenLineString& geometry,
const TransformState& transformState,
const RenderStyle& style,
const RenderedQueryOptions& options) const final;
std::vector<Feature> querySourceFeatures(const SourceQueryOptions&) const final;
void onLowMemory() final {
}
void dumpDebugLogs() const final;
private:
const style::ImageSource::Impl& impl() const;
std::vector<UnwrappedTileID> tileIds;
std::unique_ptr<RasterBucket> bucket;
std::vector<mat4> matrices;
};
template <>
inline bool RenderSource::is<RenderImageSource>() const {
return baseImpl->type == SourceType::Image;
}
} // namespace mbgl
|