diff options
Diffstat (limited to 'src/mbgl/renderer/render_background_layer.cpp')
-rw-r--r-- | src/mbgl/renderer/render_background_layer.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mbgl/renderer/render_background_layer.cpp b/src/mbgl/renderer/render_background_layer.cpp index 8069209c71..f2e9c0cbaf 100644 --- a/src/mbgl/renderer/render_background_layer.cpp +++ b/src/mbgl/renderer/render_background_layer.cpp @@ -4,9 +4,12 @@ namespace mbgl { -RenderBackgroundLayer::RenderBackgroundLayer(const style::BackgroundLayer::Impl& _impl) - : RenderLayer(style::LayerType::Background, _impl), - impl(&_impl) { +RenderBackgroundLayer::RenderBackgroundLayer(Immutable<style::BackgroundLayer::Impl> _impl) + : RenderLayer(style::LayerType::Background, _impl) { +} + +const style::BackgroundLayer::Impl& RenderBackgroundLayer::impl() const { + return static_cast<const style::BackgroundLayer::Impl&>(*baseImpl); } std::unique_ptr<RenderLayer> RenderBackgroundLayer::clone() const { @@ -20,7 +23,7 @@ std::unique_ptr<Bucket> RenderBackgroundLayer::createBucket(const BucketParamete } void RenderBackgroundLayer::cascade(const CascadeParameters ¶meters) { - unevaluated = impl->cascading.cascade(parameters, std::move(unevaluated)); + unevaluated = impl().cascading.cascade(parameters, std::move(unevaluated)); } void RenderBackgroundLayer::evaluate(const PropertyEvaluationParameters ¶meters) { |