diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-12-21 14:14:03 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-01-04 11:51:33 +0200 |
commit | c621b8100d8f75a77789371d8c33a7f5dff18651 (patch) | |
tree | c9b1290a8496d28f0f55f91ae79d58da0ed945e6 /src/mbgl/renderer/buckets/line_bucket.cpp | |
parent | 4e86bca5abecdaa6dcdc361421fe73655e7e1b69 (diff) | |
download | qtlocation-mapboxgl-c621b8100d8f75a77789371d8c33a7f5dff18651.tar.gz |
[core] Drop LayerType
Drop LayerType and its remaining usages.
The generic code should be layer type agnostic.
Diffstat (limited to 'src/mbgl/renderer/buckets/line_bucket.cpp')
-rw-r--r-- | src/mbgl/renderer/buckets/line_bucket.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mbgl/renderer/buckets/line_bucket.cpp b/src/mbgl/renderer/buckets/line_bucket.cpp index ace6c8bfae..0375c3d089 100644 --- a/src/mbgl/renderer/buckets/line_bucket.cpp +++ b/src/mbgl/renderer/buckets/line_bucket.cpp @@ -14,8 +14,7 @@ LineBucket::LineBucket(const style::LineLayoutProperties::PossiblyEvaluated layo std::map<std::string, RenderLinePaintProperties::PossiblyEvaluated> layerPaintProperties, const float zoom_, const uint32_t overscaling_) - : Bucket(LayerType::Line), - layout(layout_), + : layout(layout_), zoom(zoom_), overscaling(overscaling_) { @@ -29,6 +28,7 @@ LineBucket::LineBucket(const style::LineLayoutProperties::PossiblyEvaluated layo } } +LineBucket::~LineBucket() = default; void LineBucket::addFeature(const GeometryTileFeature& feature, const GeometryCollection& geometryCollection, @@ -523,6 +523,10 @@ bool LineBucket::hasData() const { return !segments.empty(); } +bool LineBucket::supportsLayer(const style::Layer::Impl& impl) const { + return style::LineLayer::Impl::staticTypeInfo() == impl.getTypeInfo(); +} + template <class Property> static float get(const RenderLineLayer& layer, const std::map<std::string, LineProgram::PaintPropertyBinders>& paintPropertyBinders) { auto it = paintPropertyBinders.find(layer.getID()); |