summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-05-16 14:57:04 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-05-19 18:15:33 +0300
commit18ddced9b6de8194fe0cb3464ec8b3a56139a063 (patch)
tree8fa8663a3c015573f7f903c7b1717bb3ccfdb5bd /src
parentf2ad89c463c6110d89caacd2ae62e85efb78af17 (diff)
downloadqtlocation-mapboxgl-18ddced9b6de8194fe0cb3464ec8b3a56139a063.tar.gz
[core] Remove Bucket::supportsLayer
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/bucket.hpp6
-rw-r--r--src/mbgl/renderer/buckets/circle_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/circle_bucket.hpp1
-rw-r--r--src/mbgl/renderer/buckets/fill_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/fill_bucket.hpp1
-rw-r--r--src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp2
-rw-r--r--src/mbgl/renderer/buckets/heatmap_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/heatmap_bucket.hpp1
-rw-r--r--src/mbgl/renderer/buckets/hillshade_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/hillshade_bucket.hpp1
-rw-r--r--src/mbgl/renderer/buckets/line_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/line_bucket.hpp1
-rw-r--r--src/mbgl/renderer/buckets/raster_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/raster_bucket.hpp1
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.hpp1
17 files changed, 1 insertions, 46 deletions
diff --git a/src/mbgl/renderer/bucket.hpp b/src/mbgl/renderer/bucket.hpp
index 92f2c76e4e..a074743c9a 100644
--- a/src/mbgl/renderer/bucket.hpp
+++ b/src/mbgl/renderer/bucket.hpp
@@ -46,11 +46,7 @@ public:
bool needsUpload() const {
return hasData() && !uploaded;
}
- // Returns true if this bucket fits the given layer; returns false otherwise.
- // Implementations of this class check at least that this bucket has
- // the same layer type with the given layer, but extra checks are also
- // possible.
- virtual bool supportsLayer(const style::Layer::Impl&) const = 0;
+
// The following methods are implemented by buckets that require cross-tile indexing and placement.
// Returns a pair, the first element of which is a bucket cross-tile id
diff --git a/src/mbgl/renderer/buckets/circle_bucket.cpp b/src/mbgl/renderer/buckets/circle_bucket.cpp
index d9ba5f31ca..7ba130da64 100644
--- a/src/mbgl/renderer/buckets/circle_bucket.cpp
+++ b/src/mbgl/renderer/buckets/circle_bucket.cpp
@@ -39,10 +39,6 @@ bool CircleBucket::hasData() const {
return !segments.empty();
}
-bool CircleBucket::supportsLayer(const style::Layer::Impl& impl) const {
- return style::CircleLayer::Impl::staticTypeInfo() == impl.getTypeInfo();
-}
-
void CircleBucket::addFeature(const GeometryTileFeature& feature,
const GeometryCollection& geometry,
const ImagePositions&,
diff --git a/src/mbgl/renderer/buckets/circle_bucket.hpp b/src/mbgl/renderer/buckets/circle_bucket.hpp
index 145748f313..27423bc568 100644
--- a/src/mbgl/renderer/buckets/circle_bucket.hpp
+++ b/src/mbgl/renderer/buckets/circle_bucket.hpp
@@ -28,7 +28,6 @@ public:
void upload(gfx::UploadPass&) override;
float getQueryRadius(const RenderLayer&) const override;
- bool supportsLayer(const style::Layer::Impl&) const override;
gfx::VertexVector<CircleLayoutVertex> vertices;
gfx::IndexVector<gfx::Triangles> triangles;
diff --git a/src/mbgl/renderer/buckets/fill_bucket.cpp b/src/mbgl/renderer/buckets/fill_bucket.cpp
index e4cfd339d4..4b7a6def76 100644
--- a/src/mbgl/renderer/buckets/fill_bucket.cpp
+++ b/src/mbgl/renderer/buckets/fill_bucket.cpp
@@ -137,10 +137,6 @@ 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 auto& evaluated = getEvaluated<FillLayerProperties>(layer.evaluatedProperties);
const std::array<float, 2>& translate = evaluated.get<FillTranslate>();
diff --git a/src/mbgl/renderer/buckets/fill_bucket.hpp b/src/mbgl/renderer/buckets/fill_bucket.hpp
index 1a0d77dff7..6747c1083f 100644
--- a/src/mbgl/renderer/buckets/fill_bucket.hpp
+++ b/src/mbgl/renderer/buckets/fill_bucket.hpp
@@ -36,7 +36,6 @@ public:
void upload(gfx::UploadPass&) override;
float getQueryRadius(const RenderLayer&) const override;
- bool supportsLayer(const style::Layer::Impl&) const override;
gfx::VertexVector<FillLayoutVertex> vertices;
gfx::IndexVector<gfx::Lines> lines;
diff --git a/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp b/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
index 51202b3ee4..be13850e55 100644
--- a/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
+++ b/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
@@ -180,10 +180,6 @@ bool FillExtrusionBucket::hasData() const {
return !triangleSegments.empty();
}
-bool FillExtrusionBucket::supportsLayer(const style::Layer::Impl& impl) const {
- return style::FillExtrusionLayer::Impl::staticTypeInfo() == impl.getTypeInfo();
-}
-
float FillExtrusionBucket::getQueryRadius(const RenderLayer& layer) const {
const auto& evaluated = getEvaluated<FillExtrusionLayerProperties>(layer.evaluatedProperties);
const std::array<float, 2>& translate = evaluated.get<FillExtrusionTranslate>();
diff --git a/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp b/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp
index 8fa2f4f8e8..4c97618a77 100644
--- a/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp
+++ b/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp
@@ -31,8 +31,6 @@ public:
bool hasData() const override;
- bool supportsLayer(const style::Layer::Impl&) const override;
-
void upload(gfx::UploadPass&) override;
float getQueryRadius(const RenderLayer&) const override;
diff --git a/src/mbgl/renderer/buckets/heatmap_bucket.cpp b/src/mbgl/renderer/buckets/heatmap_bucket.cpp
index 287c9ed26a..fad78f6cec 100644
--- a/src/mbgl/renderer/buckets/heatmap_bucket.cpp
+++ b/src/mbgl/renderer/buckets/heatmap_bucket.cpp
@@ -39,10 +39,6 @@ bool HeatmapBucket::hasData() const {
return !segments.empty();
}
-bool HeatmapBucket::supportsLayer(const style::Layer::Impl& impl) const {
- return style::HeatmapLayer::Impl::staticTypeInfo() == impl.getTypeInfo();
-}
-
void HeatmapBucket::addFeature(const GeometryTileFeature& feature,
const GeometryCollection& geometry,
const ImagePositions&,
diff --git a/src/mbgl/renderer/buckets/heatmap_bucket.hpp b/src/mbgl/renderer/buckets/heatmap_bucket.hpp
index e3d0b7c769..68790bf5bf 100644
--- a/src/mbgl/renderer/buckets/heatmap_bucket.hpp
+++ b/src/mbgl/renderer/buckets/heatmap_bucket.hpp
@@ -27,7 +27,6 @@ public:
void upload(gfx::UploadPass&) override;
float getQueryRadius(const RenderLayer&) const override;
- bool supportsLayer(const style::Layer::Impl&) const override;
gfx::VertexVector<HeatmapLayoutVertex> vertices;
gfx::IndexVector<gfx::Triangles> triangles;
diff --git a/src/mbgl/renderer/buckets/hillshade_bucket.cpp b/src/mbgl/renderer/buckets/hillshade_bucket.cpp
index 08f941f990..c2628273dc 100644
--- a/src/mbgl/renderer/buckets/hillshade_bucket.cpp
+++ b/src/mbgl/renderer/buckets/hillshade_bucket.cpp
@@ -114,9 +114,5 @@ bool HillshadeBucket::hasData() const {
return demdata.getImage()->valid();
}
-bool HillshadeBucket::supportsLayer(const style::Layer::Impl& impl) const {
- return style::HillshadeLayer::Impl::staticTypeInfo() == impl.getTypeInfo();
-}
-
} // namespace mbgl
diff --git a/src/mbgl/renderer/buckets/hillshade_bucket.hpp b/src/mbgl/renderer/buckets/hillshade_bucket.hpp
index 08acdff0c3..60f529916b 100644
--- a/src/mbgl/renderer/buckets/hillshade_bucket.hpp
+++ b/src/mbgl/renderer/buckets/hillshade_bucket.hpp
@@ -24,7 +24,6 @@ public:
void upload(gfx::UploadPass&) override;
bool hasData() const override;
- bool supportsLayer(const style::Layer::Impl&) const override;
void clear();
void setMask(TileMask&&);
diff --git a/src/mbgl/renderer/buckets/line_bucket.cpp b/src/mbgl/renderer/buckets/line_bucket.cpp
index 0536992707..d225ef963a 100644
--- a/src/mbgl/renderer/buckets/line_bucket.cpp
+++ b/src/mbgl/renderer/buckets/line_bucket.cpp
@@ -523,10 +523,6 @@ 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 LinePaintProperties::PossiblyEvaluated& evaluated, const std::string& id, const std::map<std::string, LineProgram::Binders>& paintPropertyBinders) {
auto it = paintPropertyBinders.find(id);
diff --git a/src/mbgl/renderer/buckets/line_bucket.hpp b/src/mbgl/renderer/buckets/line_bucket.hpp
index 342f5cd88c..eac9e14e4c 100644
--- a/src/mbgl/renderer/buckets/line_bucket.hpp
+++ b/src/mbgl/renderer/buckets/line_bucket.hpp
@@ -36,7 +36,6 @@ public:
void upload(gfx::UploadPass&) override;
float getQueryRadius(const RenderLayer&) const override;
- bool supportsLayer(const style::Layer::Impl&) const override;
PossiblyEvaluatedLayoutProperties layout;
diff --git a/src/mbgl/renderer/buckets/raster_bucket.cpp b/src/mbgl/renderer/buckets/raster_bucket.cpp
index 57d3ba1896..a26b9a5065 100644
--- a/src/mbgl/renderer/buckets/raster_bucket.cpp
+++ b/src/mbgl/renderer/buckets/raster_bucket.cpp
@@ -112,9 +112,5 @@ bool RasterBucket::hasData() const {
return !!image;
}
-bool RasterBucket::supportsLayer(const style::Layer::Impl& impl) const {
- return style::RasterLayer::Impl::staticTypeInfo() == impl.getTypeInfo();
-}
-
} // namespace mbgl
diff --git a/src/mbgl/renderer/buckets/raster_bucket.hpp b/src/mbgl/renderer/buckets/raster_bucket.hpp
index b6182f7b2c..f880903167 100644
--- a/src/mbgl/renderer/buckets/raster_bucket.hpp
+++ b/src/mbgl/renderer/buckets/raster_bucket.hpp
@@ -20,7 +20,6 @@ public:
void upload(gfx::UploadPass&) override;
bool hasData() const override;
- bool supportsLayer(const style::Layer::Impl&) const override;
void clear();
void setImage(std::shared_ptr<PremultipliedImage>);
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.cpp b/src/mbgl/renderer/buckets/symbol_bucket.cpp
index 3192e694c8..8af40f6e3e 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.cpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.cpp
@@ -133,10 +133,6 @@ bool SymbolBucket::hasData() const {
return hasTextData() || hasIconData() || hasCollisionBoxData();
}
-bool SymbolBucket::supportsLayer(const style::Layer::Impl& impl) const {
- return style::SymbolLayer::Impl::staticTypeInfo() == impl.getTypeInfo();
-}
-
bool SymbolBucket::hasTextData() const {
return !text.segments.empty();
}
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp
index 8e24e711d6..dc3aa64567 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.hpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp
@@ -58,7 +58,6 @@ public:
void upload(gfx::UploadPass&) override;
bool hasData() const override;
- bool supportsLayer(const style::Layer::Impl&) const override;
std::pair<uint32_t, bool> registerAtCrossTileIndex(CrossTileSymbolLayerIndex&, const OverscaledTileID&, uint32_t& maxCrossTileID) override;
bool hasTextData() const;
bool hasIconData() const;