Use a host interface for CustomLayer instead of function pointers (#11553)
Use a host interface for CustomLayer instead of function pointers Co-authored-by: Julian Rex <julian.rex@mapbox.com>
This commit is contained in:
@@ -4,17 +4,9 @@ namespace mbgl {
|
||||
namespace style {
|
||||
|
||||
CustomLayer::Impl::Impl(const std::string& id_,
|
||||
CustomLayerInitializeFunction initializeFn_,
|
||||
CustomLayerRenderFunction renderFn_,
|
||||
CustomLayerContextLostFunction contextLostFn_,
|
||||
CustomLayerDeinitializeFunction deinitializeFn_,
|
||||
void* context_)
|
||||
std::unique_ptr<CustomLayerHost> host_)
|
||||
: Layer::Impl(LayerType::Custom, id_, std::string()) {
|
||||
initializeFn = initializeFn_;
|
||||
renderFn = renderFn_;
|
||||
deinitializeFn = deinitializeFn_;
|
||||
contextLostFn = contextLostFn_;
|
||||
context = context_;
|
||||
host = std::move(host_);
|
||||
}
|
||||
|
||||
bool CustomLayer::Impl::hasLayoutDifference(const Layer::Impl&) const {
|
||||
|
||||
Reference in New Issue
Block a user