diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-05-19 12:09:50 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-05-22 16:41:10 +0300 |
commit | 25093370e293d51d78734c335913a37c712cc071 (patch) | |
tree | 51e6745570c9a5aff14fe93877876b995b51ddd1 /src/mbgl/renderer/layers | |
parent | 84d3b5f89971c839c1a15beedf56d8b064be1d6f (diff) | |
download | qtlocation-mapboxgl-25093370e293d51d78734c335913a37c712cc071.tar.gz |
[core] RenderLayer::setRenderTiles(RenderTiles) -> prepare(LayerPrepareParameters)
RenderLayer::prepare() is responsible for the complete initialization of a render
layer, so that it can render.
Diffstat (limited to 'src/mbgl/renderer/layers')
-rw-r--r-- | src/mbgl/renderer/layers/render_symbol_layer.cpp | 7 | ||||
-rw-r--r-- | src/mbgl/renderer/layers/render_symbol_layer.hpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mbgl/renderer/layers/render_symbol_layer.cpp b/src/mbgl/renderer/layers/render_symbol_layer.cpp index 644056f24d..0aae4e469c 100644 --- a/src/mbgl/renderer/layers/render_symbol_layer.cpp +++ b/src/mbgl/renderer/layers/render_symbol_layer.cpp @@ -2,6 +2,7 @@ #include <mbgl/renderer/buckets/symbol_bucket.hpp> #include <mbgl/renderer/bucket_parameters.hpp> #include <mbgl/renderer/property_evaluation_parameters.hpp> +#include <mbgl/renderer/render_source.hpp> #include <mbgl/renderer/render_tile.hpp> #include <mbgl/renderer/upload_parameters.hpp> #include <mbgl/renderer/paint_parameters.hpp> @@ -652,9 +653,9 @@ style::TextPaintProperties::PossiblyEvaluated RenderSymbolLayer::textPaintProper }; } -void RenderSymbolLayer::setRenderTiles(RenderTiles tiles, const TransformState& state) { - renderTiles = std::move(tiles); - const auto comp = [bearing = state.getBearing()](const RenderTile& a, const RenderTile& b) { +void RenderSymbolLayer::prepare(const LayerPrepareParameters& params) { + renderTiles = params.source->getRenderTiles(); + const auto comp = [bearing = params.state.getBearing()](const RenderTile& a, const RenderTile& b) { Point<float> pa(a.id.canonical.x, a.id.canonical.y); Point<float> pb(b.id.canonical.x, b.id.canonical.y); diff --git a/src/mbgl/renderer/layers/render_symbol_layer.hpp b/src/mbgl/renderer/layers/render_symbol_layer.hpp index 351ed4833e..354f433e60 100644 --- a/src/mbgl/renderer/layers/render_symbol_layer.hpp +++ b/src/mbgl/renderer/layers/render_symbol_layer.hpp @@ -67,7 +67,7 @@ private: bool hasCrossfade() const override; void upload(gfx::UploadPass&, UploadParameters&) override; void render(PaintParameters&, RenderSource*) override; - void setRenderTiles(RenderTiles, const TransformState&) override; + void prepare(const LayerPrepareParameters&) override; // Paint properties style::SymbolPaintProperties::Unevaluated unevaluated; |