blob: b7a03a6ba598c8dbc13bd17fbc3c4f9ef6983c81 (
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
|
#pragma once
#include <mbgl/gfx/offscreen_texture.hpp>
#include <mbgl/gfx/texture.hpp>
#include <mbgl/programs/heatmap_program.hpp>
#include <mbgl/renderer/render_layer.hpp>
#include <mbgl/style/layers/heatmap_layer_impl.hpp>
#include <mbgl/style/layers/heatmap_layer_properties.hpp>
#include <mbgl/util/optional.hpp>
namespace mbgl {
class RenderHeatmapLayer final : public RenderLayer {
public:
explicit RenderHeatmapLayer(Immutable<style::HeatmapLayer::Impl>);
~RenderHeatmapLayer() override;
private:
void transition(const TransitionParameters&) override;
void evaluate(const PropertyEvaluationParameters&) override;
bool hasTransition() const override;
bool hasCrossfade() const override;
void upload(gfx::UploadPass&) override;
void render(PaintParameters&) override;
bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
const TransformState&, const float, const mat4&, const FeatureState&) const override;
void updateColorRamp();
// Paint properties
style::HeatmapPaintProperties::Unevaluated unevaluated;
PremultipliedImage colorRamp;
std::unique_ptr<gfx::OffscreenTexture> renderTexture;
optional<gfx::Texture> colorRampTexture;
SegmentVector<HeatmapTextureAttributes> segments;
};
} // namespace mbgl
|