diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-09-19 10:29:51 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-09-22 23:33:56 +0300 |
commit | 97a010cc9bde2eaa2cc94ca844fe9546347d37c2 (patch) | |
tree | cfb1750b338022a8cd825de12f54670b1b981258 /src/mbgl/style/layers/custom_layer_impl.cpp | |
parent | b0c06c764b0f9900dac3707dc5af398b41b6aa5b (diff) | |
download | qtlocation-mapboxgl-97a010cc9bde2eaa2cc94ca844fe9546347d37c2.tar.gz |
[core] custom layer - add contextLost callback
- optional callback method that can be used to do cleanup when the context has been lost before re-initialisation
Diffstat (limited to 'src/mbgl/style/layers/custom_layer_impl.cpp')
-rw-r--r-- | src/mbgl/style/layers/custom_layer_impl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mbgl/style/layers/custom_layer_impl.cpp b/src/mbgl/style/layers/custom_layer_impl.cpp index 42e60c582c..1de268d2e2 100644 --- a/src/mbgl/style/layers/custom_layer_impl.cpp +++ b/src/mbgl/style/layers/custom_layer_impl.cpp @@ -6,12 +6,14 @@ namespace style { CustomLayer::Impl::Impl(const std::string& id_, CustomLayerInitializeFunction initializeFn_, CustomLayerRenderFunction renderFn_, + CustomLayerContextLostFunction contextLostFn_, CustomLayerDeinitializeFunction deinitializeFn_, void* context_) : Layer::Impl(LayerType::Custom, id_, std::string()) { initializeFn = initializeFn_; renderFn = renderFn_; deinitializeFn = deinitializeFn_; + contextLostFn = contextLostFn_; context = context_; } |