summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/render_raster_layer.hpp
blob: 1fd0fe7c4718c496cb37c7f77a5ec4fb1be833bc (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
#pragma once

#include <mbgl/renderer/render_layer.hpp>
#include <mbgl/style/layers/raster_layer.hpp>
#include <mbgl/style/layers/raster_layer_properties.hpp>

namespace mbgl {

class RenderRasterLayer: public RenderLayer {
public:

    RenderRasterLayer(const style::RasterLayer::Impl&);
    ~RenderRasterLayer() final = default;

    std::unique_ptr<RenderLayer> clone() const override;

    void cascade(const style::CascadeParameters&) override;
    bool evaluate(const style::PropertyEvaluationParameters&) override;

    std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<const RenderLayer*>&) const override;

    // Paint properties
    style::RasterPaintProperties::Unevaluated unevaluated;
    style::RasterPaintProperties::Evaluated evaluated;

    const style::RasterLayer::Impl* const impl;
};

template <>
inline bool RenderLayer::is<RenderRasterLayer>() const {
    return type == style::LayerType::Raster;
}

} // namespace mbgl