summaryrefslogtreecommitdiff
path: root/src/mbgl/tile
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-05-22 11:01:54 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-05-28 16:16:42 +0300
commita03f7b166b2fe68f63ca75337bd0ac0000cee135 (patch)
treef4435b998b5775a4596392bcc45bea020c09527e /src/mbgl/tile
parente5431d01817c0546aa0b971a7b0b33c9bbd87077 (diff)
downloadqtlocation-mapboxgl-a03f7b166b2fe68f63ca75337bd0ac0000cee135.tar.gz
[core] RenderTile does not expose Tile
RenderTile and Tile will be split when ochestration movces to a separate thread. This PR improves encapsulation of Tiles management: now performed within TilePyramid.
Diffstat (limited to 'src/mbgl/tile')
-rw-r--r--src/mbgl/tile/geometry_tile.cpp4
-rw-r--r--src/mbgl/tile/geometry_tile.hpp2
-rw-r--r--src/mbgl/tile/tile.hpp6
3 files changed, 3 insertions, 9 deletions
diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp
index 46ab9e713b..7a7b7cb770 100644
--- a/src/mbgl/tile/geometry_tile.cpp
+++ b/src/mbgl/tile/geometry_tile.cpp
@@ -168,12 +168,12 @@ void GeometryTile::getImages(ImageRequestPair pair) {
imageManager.getImages(*this, std::move(pair));
}
-const optional<ImagePosition> GeometryTile::getPattern(const std::string& pattern) {
+const optional<ImagePosition> GeometryTile::getPattern(const std::string& pattern) const {
auto it = iconAtlas.patternPositions.find(pattern);
if (it != iconAtlas.patternPositions.end()) {
return it->second;
}
- return {};
+ return nullopt;
}
void GeometryTile::upload(gfx::UploadPass& uploadPass) {
diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp
index c7a0d76363..768948a82d 100644
--- a/src/mbgl/tile/geometry_tile.hpp
+++ b/src/mbgl/tile/geometry_tile.hpp
@@ -87,7 +87,7 @@ public:
void markRenderedIdeal() override;
void markRenderedPreviously() override;
void performedFadePlacement() override;
- const optional<ImagePosition> getPattern(const std::string& pattern);
+ const optional<ImagePosition> getPattern(const std::string& pattern) const;
const std::shared_ptr<FeatureIndex> getFeatureIndex() const { return latestFeatureIndex; }
const std::string sourceID;
diff --git a/src/mbgl/tile/tile.hpp b/src/mbgl/tile/tile.hpp
index e98d192efd..1bb38f5c96 100644
--- a/src/mbgl/tile/tile.hpp
+++ b/src/mbgl/tile/tile.hpp
@@ -62,12 +62,6 @@ public:
// Returns `true` if the corresponding render layer data is present in this tile (and i.e. it
// was succesfully updated); returns `false` otherwise.
virtual bool updateLayerProperties(const Immutable<style::LayerProperties>&) { return true; }
-
- template <class T>
- T* getBucket(const style::Layer::Impl& layer) const {
- return static_cast<T*>(getBucket(layer));
- }
-
virtual void setShowCollisionBoxes(const bool) {}
virtual void setLayers(const std::vector<Immutable<style::LayerProperties>>&) {}
virtual void setMask(TileMask&&) {}