blob: 7085a87c908458f8fd010784d33f30caf81917c0 (
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
|
#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&,
float,
const TransformState&,
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
|