summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/buckets/fill_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/fill_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/fill_bucket.cpp')
-rw-r--r--src/mbgl/renderer/buckets/fill_bucket.cpp10
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>();