summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/sources/render_custom_geometry_source.hpp
blob: 331ae455e7fadc799b9dbadcc2e3e840514622a2 (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
#pragma once

#include <mbgl/renderer/sources/render_tile_source.hpp>
#include <mbgl/style/sources/custom_geometry_source_impl.hpp>

namespace mbgl {

class RenderCustomGeometrySource final : public RenderTileSource {
public:
    explicit RenderCustomGeometrySource(Immutable<style::CustomGeometrySource::Impl>);

    void update(Immutable<style::Source::Impl>,
                const std::vector<Immutable<style::LayerProperties>>&,
                bool needsRendering,
                bool needsRelayout,
                const TileParameters&) override;
    
private:
    const style::CustomGeometrySource::Impl& impl() const;
};

template <>
inline bool RenderSource::is<RenderCustomGeometrySource>() const {
    return baseImpl->type == style::SourceType::CustomVector;
}

} // namespace mbgl