summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-05-19 16:55:29 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-06-10 12:42:14 +0200
commit46b0ebcd3cad1a33a2a70c6e93b885d3be6be9fa (patch)
treebe52ae1d20fd8fef2db7c36cbe356af0db313e9d /src
parent99b1df4e46e7fc110d479bc3efeb169e787e1c5e (diff)
downloadqtlocation-mapboxgl-46b0ebcd3cad1a33a2a70c6e93b885d3be6be9fa.tar.gz
[core] rename VectorTileData => GeometryTileData
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/source.cpp6
-rw-r--r--src/mbgl/tile/geometry_tile_data.cpp (renamed from src/mbgl/tile/vector_tile_data.cpp)36
-rw-r--r--src/mbgl/tile/geometry_tile_data.hpp (renamed from src/mbgl/tile/vector_tile_data.hpp)6
3 files changed, 24 insertions, 24 deletions
diff --git a/src/mbgl/style/source.cpp b/src/mbgl/style/source.cpp
index 477e34adb4..5fec392ef8 100644
--- a/src/mbgl/style/source.cpp
+++ b/src/mbgl/style/source.cpp
@@ -27,7 +27,7 @@
#include <mbgl/tile/annotation_tile_source.hpp>
#include <mbgl/tile/raster_tile_source.hpp>
-#include <mbgl/tile/vector_tile_data.hpp>
+#include <mbgl/tile/geometry_tile_data.hpp>
#include <mbgl/tile/raster_tile_data.hpp>
#include <mbgl/style/parser.hpp>
#include <mbgl/gl/debugging.hpp>
@@ -222,8 +222,8 @@ std::unique_ptr<TileData> Source::createTile(const OverscaledTileID& overscaledT
return nullptr;
}
- data = std::make_unique<VectorTileData>(overscaledTileID, std::move(monitor), id,
- parameters.style, parameters.mode, callback);
+ data = std::make_unique<GeometryTileData>(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
index 3e189c1ba1..8797976ed1 100644
--- a/src/mbgl/tile/vector_tile_data.cpp
+++ b/src/mbgl/tile/geometry_tile_data.cpp
@@ -1,4 +1,4 @@
-#include <mbgl/tile/vector_tile_data.hpp>
+#include <mbgl/tile/geometry_tile_data.hpp>
#include <mbgl/tile/tile_source.hpp>
#include <mbgl/tile/geometry_tile.hpp>
#include <mbgl/style/layer_impl.hpp>
@@ -12,12 +12,12 @@
namespace mbgl {
-VectorTileData::VectorTileData(const OverscaledTileID& id_,
- std::unique_ptr<GeometryTileSource> tileSource_,
- std::string sourceID,
- style::Style& style_,
- const MapMode mode_,
- const std::function<void(std::exception_ptr)>& callback)
+GeometryTileData::GeometryTileData(const OverscaledTileID& id_,
+ std::unique_ptr<GeometryTileSource> tileSource_,
+ std::string sourceID,
+ style::Style& style_,
+ const MapMode mode_,
+ const std::function<void(std::exception_ptr)>& 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<void(std::exception_ptr)> callback) {
+bool GeometryTileData::parsePending(std::function<void(std::exception_ptr)> callback) {
if (workRequest) {
// There's already parsing or placement going on.
return false;
@@ -139,7 +139,7 @@ bool VectorTileData::parsePending(std::function<void(std::exception_ptr)> 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<void()>& callback) {
+void GeometryTileData::redoPlacement(const PlacementConfig newConfig, const std::function<void()>& 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<void()>& callback) {
+void GeometryTileData::redoPlacement(const std::function<void()>& 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<void()>& callback) {
});
}
-void VectorTileData::queryRenderedFeatures(
- std::unordered_map<std::string, std::vector<Feature>>& result,
- const GeometryCoordinates& queryGeometry,
- const TransformState& transformState,
- const optional<std::vector<std::string>>& layerIDs) {
+void GeometryTileData::queryRenderedFeatures(
+ std::unordered_map<std::string, std::vector<Feature>>& result,
+ const GeometryCoordinates& queryGeometry,
+ const TransformState& transformState,
+ const optional<std::vector<std::string>>& 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
index dae9966165..00d919a8a6 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<GeometryTileSource> tileSource,
std::string sourceID,
style::Style&,
const MapMode,
const std::function<void(std::exception_ptr)>& callback);
- ~VectorTileData();
+ ~GeometryTileData();
Bucket* getBucket(const style::Layer&) override;