summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/buckets/line_bucket.cpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-12-21 14:14:03 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-01-04 11:51:33 +0200
commitc621b8100d8f75a77789371d8c33a7f5dff18651 (patch)
treec9b1290a8496d28f0f55f91ae79d58da0ed945e6 /src/mbgl/renderer/buckets/line_bucket.cpp
parent4e86bca5abecdaa6dcdc361421fe73655e7e1b69 (diff)
downloadqtlocation-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.cpp8
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());