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/fill_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/fill_bucket.cpp')
-rw-r--r-- | src/mbgl/renderer/buckets/fill_bucket.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mbgl/renderer/buckets/fill_bucket.cpp b/src/mbgl/renderer/buckets/fill_bucket.cpp index 043882f138..517c9b184a 100644 --- a/src/mbgl/renderer/buckets/fill_bucket.cpp +++ b/src/mbgl/renderer/buckets/fill_bucket.cpp @@ -30,8 +30,7 @@ struct GeometryTooLongException : std::exception {}; FillBucket::FillBucket(const FillBucket::PossiblyEvaluatedLayoutProperties, std::map<std::string, FillBucket::PossiblyEvaluatedPaintProperties> layerPaintProperties, const float zoom, - const uint32_t) - : Bucket(LayerType::Fill) { + const uint32_t) { for (const auto& pair : layerPaintProperties) { paintPropertyBinders.emplace( @@ -43,6 +42,8 @@ FillBucket::FillBucket(const FillBucket::PossiblyEvaluatedLayoutProperties, } } +FillBucket::~FillBucket() = default; + void FillBucket::addFeature(const GeometryTileFeature& feature, const GeometryCollection& geometry, const ImagePositions& patternPositions, @@ -136,6 +137,11 @@ bool FillBucket::hasData() const { return !triangleSegments.empty() || !lineSegments.empty(); } +bool FillBucket::supportsLayer(const style::Layer::Impl& impl) const { + return style::FillLayer::Impl::staticTypeInfo() == impl.getTypeInfo(); +} + + float FillBucket::getQueryRadius(const RenderLayer& layer) const { const RenderFillLayer* fillLayer = toRenderFillLayer(&layer); const std::array<float, 2>& translate = fillLayer->evaluated.get<FillTranslate>(); |