summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/custom_layer.cpp
blob: 3407a7f5a536b0130f0c2f4a596c004a0b1d1dbe (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
#include <mbgl/style/layers/custom_layer.hpp>
#include <mbgl/style/layers/custom_layer_impl.hpp>

namespace mbgl {
namespace style {

CustomLayer::CustomLayer(const std::string& layerID,
                         CustomLayerInitializeFunction init,
                         CustomLayerRenderFunction render,
                         CustomLayerDeinitializeFunction deinit,
                         void* context)
    : Layer(Type::Custom, std::make_unique<Impl>(layerID, init, render, deinit, context))
    , impl(static_cast<Impl*>(baseImpl.get())) {
}

CustomLayer::CustomLayer(const Impl& other)
    : Layer(Type::Custom, std::make_unique<Impl>(other))
    , impl(static_cast<Impl*>(baseImpl.get())) {
}

CustomLayer::~CustomLayer() = default;

} // namespace style
} // namespace mbgl