From 46b0ebcd3cad1a33a2a70c6e93b885d3be6be9fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Thu, 19 May 2016 16:55:29 +0200 Subject: [PATCH] [core] rename VectorTileData => GeometryTileData --- src/mbgl/style/source.cpp | 6 ++-- ...r_tile_data.cpp => geometry_tile_data.cpp} | 36 +++++++++---------- ...r_tile_data.hpp => geometry_tile_data.hpp} | 6 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) rename src/mbgl/tile/{vector_tile_data.cpp => geometry_tile_data.cpp} (85%) rename src/mbgl/tile/{vector_tile_data.hpp => geometry_tile_data.hpp} (94%) diff --git a/src/mbgl/style/source.cpp b/src/mbgl/style/source.cpp index 477e34adb..5fec392ef 100644 --- a/src/mbgl/style/source.cpp +++ b/src/mbgl/style/source.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include @@ -222,8 +222,8 @@ std::unique_ptr Source::createTile(const OverscaledTileID& overscaledT return nullptr; } - data = std::make_unique(overscaledTileID, std::move(monitor), id, - parameters.style, parameters.mode, callback); + data = std::make_unique(overscaledTileID, std::move(monitor), id, + parameters.style, parameters.mode, callback); } return data; diff --git a/src/mbgl/tile/vector_tile_data.cpp b/src/mbgl/tile/geometry_tile_data.cpp similarity index 85% rename from src/mbgl/tile/vector_tile_data.cpp rename to src/mbgl/tile/geometry_tile_data.cpp index 3e189c1ba..8797976ed 100644 --- a/src/mbgl/tile/vector_tile_data.cpp +++ b/src/mbgl/tile/geometry_tile_data.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -12,12 +12,12 @@ namespace mbgl { -VectorTileData::VectorTileData(const OverscaledTileID& id_, - std::unique_ptr tileSource_, - std::string sourceID, - style::Style& style_, - const MapMode mode_, - const std::function& callback) +GeometryTileData::GeometryTileData(const OverscaledTileID& id_, + std::unique_ptr tileSource_, + std::string sourceID, + style::Style& style_, + const MapMode mode_, + const std::function& callback) : TileData(id_, std::move(tileSource_)), style(style_), worker(style_.workers), @@ -93,11 +93,11 @@ VectorTileData::VectorTileData(const OverscaledTileID& id_, }); } -VectorTileData::~VectorTileData() { +GeometryTileData::~GeometryTileData() { cancel(); } -bool VectorTileData::parsePending(std::function callback) { +bool GeometryTileData::parsePending(std::function callback) { if (workRequest) { // There's already parsing or placement going on. return false; @@ -139,7 +139,7 @@ bool VectorTileData::parsePending(std::function callba return true; } -Bucket* VectorTileData::getBucket(const style::Layer& layer) { +Bucket* GeometryTileData::getBucket(const style::Layer& layer) { const auto it = buckets.find(layer.baseImpl->bucketName()); if (it == buckets.end()) { return nullptr; @@ -149,7 +149,7 @@ Bucket* VectorTileData::getBucket(const style::Layer& layer) { return it->second.get(); } -void VectorTileData::redoPlacement(const PlacementConfig newConfig, const std::function& callback) { +void GeometryTileData::redoPlacement(const PlacementConfig newConfig, const std::function& callback) { if (newConfig != placedConfig) { targetConfig = newConfig; @@ -157,7 +157,7 @@ void VectorTileData::redoPlacement(const PlacementConfig newConfig, const std::f } } -void VectorTileData::redoPlacement(const std::function& callback) { +void GeometryTileData::redoPlacement(const std::function& callback) { // Don't start a new placement request when the current one hasn't completed yet, or when // we are parsing buckets. if (workRequest) return; @@ -187,11 +187,11 @@ void VectorTileData::redoPlacement(const std::function& callback) { }); } -void VectorTileData::queryRenderedFeatures( - std::unordered_map>& result, - const GeometryCoordinates& queryGeometry, - const TransformState& transformState, - const optional>& layerIDs) { +void GeometryTileData::queryRenderedFeatures( + std::unordered_map>& result, + const GeometryCoordinates& queryGeometry, + const TransformState& transformState, + const optional>& layerIDs) { if (!featureIndex || !geometryTile) return; @@ -206,7 +206,7 @@ void VectorTileData::queryRenderedFeatures( style); } -void VectorTileData::cancel() { +void GeometryTileData::cancel() { obsolete = true; tileRequest.reset(); workRequest.reset(); diff --git a/src/mbgl/tile/vector_tile_data.hpp b/src/mbgl/tile/geometry_tile_data.hpp similarity index 94% rename from src/mbgl/tile/vector_tile_data.hpp rename to src/mbgl/tile/geometry_tile_data.hpp index dae996616..00d919a8a 100644 --- a/src/mbgl/tile/vector_tile_data.hpp +++ b/src/mbgl/tile/geometry_tile_data.hpp @@ -19,16 +19,16 @@ namespace style { class Style; } -class VectorTileData : public TileData { +class GeometryTileData : public TileData { public: - VectorTileData(const OverscaledTileID&, + GeometryTileData(const OverscaledTileID&, std::unique_ptr tileSource, std::string sourceID, style::Style&, const MapMode, const std::function& callback); - ~VectorTileData(); + ~GeometryTileData(); Bucket* getBucket(const style::Layer&) override;