diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-05-04 19:21:08 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-05-08 19:39:55 +0300 |
commit | 6fd40867d67eb3758c0eb8eca184ed9d7b9da5b0 (patch) | |
tree | 36fede4f7dfeb01a6835f53a185dad47f3153481 /src/mbgl/renderer/render_light.cpp | |
parent | feae5e22ee4910a1508f2120c8131b2f8531bae8 (diff) | |
download | qtlocation-mapboxgl-6fd40867d67eb3758c0eb8eca184ed9d7b9da5b0.tar.gz |
[core] delegate light changes to render light
Diffstat (limited to 'src/mbgl/renderer/render_light.cpp')
-rw-r--r-- | src/mbgl/renderer/render_light.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mbgl/renderer/render_light.cpp b/src/mbgl/renderer/render_light.cpp index faf89bf9e2..134e1829e0 100644 --- a/src/mbgl/renderer/render_light.cpp +++ b/src/mbgl/renderer/render_light.cpp @@ -2,12 +2,21 @@ namespace mbgl { -RenderLight::RenderLight(const style::Light light_) - : light(std::move(light_)) { +RenderLight::RenderLight(std::shared_ptr<const style::Light::Impl> impl_) + : impl(std::move(impl_)) { +} + +RenderLight::RenderLight(std::shared_ptr<const style::Light::Impl> impl_, const TransitioningLight transitioning_) + : impl(std::move(impl_)) + , transitioning(transitioning_) { +} + +std::unique_ptr<RenderLight> RenderLight::copy(std::shared_ptr<const style::Light::Impl> impl_) const { + return std::make_unique<RenderLight>(std::move(impl_), transitioning); } void RenderLight::transition(const CascadeParameters& parameters) { - transitioning = TransitioningLight(light.properties, std::move(transitioning), parameters); + transitioning = TransitioningLight(impl->properties, std::move(transitioning), parameters); } void RenderLight::evaluate(const PropertyEvaluationParameters& parameters) { |