summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mbgl/tile/geometry_tile.cpp1
-rw-r--r--src/mbgl/tile/raster_tile.cpp6
-rw-r--r--src/mbgl/tile/raster_tile.hpp4
-rw-r--r--src/mbgl/tile/tile_loader.hpp (renamed from src/mbgl/tile/tile_source.hpp)4
-rw-r--r--src/mbgl/tile/tile_loader_impl.hpp (renamed from src/mbgl/tile/tile_source_impl.hpp)18
-rw-r--r--src/mbgl/tile/vector_tile.cpp6
-rw-r--r--src/mbgl/tile/vector_tile.hpp4
7 files changed, 21 insertions, 22 deletions
diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp
index 686ed36b39..41673a79c6 100644
--- a/src/mbgl/tile/geometry_tile.cpp
+++ b/src/mbgl/tile/geometry_tile.cpp
@@ -1,6 +1,5 @@
#include <mbgl/tile/geometry_tile.hpp>
#include <mbgl/tile/tile_observer.hpp>
-#include <mbgl/tile/tile_source.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
#include <mbgl/style/layer_impl.hpp>
#include <mbgl/util/worker.hpp>
diff --git a/src/mbgl/tile/raster_tile.cpp b/src/mbgl/tile/raster_tile.cpp
index c3838bc59b..ef67820277 100644
--- a/src/mbgl/tile/raster_tile.cpp
+++ b/src/mbgl/tile/raster_tile.cpp
@@ -1,6 +1,6 @@
#include <mbgl/tile/raster_tile.hpp>
#include <mbgl/tile/tile_observer.hpp>
-#include <mbgl/tile/tile_source_impl.hpp>
+#include <mbgl/tile/tile_loader_impl.hpp>
#include <mbgl/style/source.hpp>
#include <mbgl/style/update_parameters.hpp>
#include <mbgl/storage/resource.hpp>
@@ -17,7 +17,7 @@ RasterTile::RasterTile(const OverscaledTileID& id_,
: Tile(id_),
texturePool(parameters.texturePool),
worker(parameters.worker),
- tileSource(*this, id_, parameters, tileset) {
+ loader(*this, id_, parameters, tileset) {
}
void RasterTile::setError(std::exception_ptr err) {
@@ -60,7 +60,7 @@ Bucket* RasterTile::getBucket(const style::Layer&) {
}
void RasterTile::setNecessity(Necessity necessity) {
- tileSource.setNecessity(static_cast<TileSource<RasterTile>::Necessity>(necessity));
+ loader.setNecessity(static_cast<TileLoader<RasterTile>::Necessity>(necessity));
}
void RasterTile::cancel() {
diff --git a/src/mbgl/tile/raster_tile.hpp b/src/mbgl/tile/raster_tile.hpp
index 7de5247a12..8c0923e7ef 100644
--- a/src/mbgl/tile/raster_tile.hpp
+++ b/src/mbgl/tile/raster_tile.hpp
@@ -1,7 +1,7 @@
#pragma once
#include <mbgl/tile/tile.hpp>
-#include <mbgl/tile/tile_source.hpp>
+#include <mbgl/tile/tile_loader.hpp>
#include <mbgl/renderer/raster_bucket.hpp>
namespace mbgl {
@@ -37,7 +37,7 @@ private:
gl::TexturePool& texturePool;
Worker& worker;
- TileSource<RasterTile> tileSource;
+ TileLoader<RasterTile> loader;
std::unique_ptr<AsyncRequest> workRequest;
// Contains the Bucket object for the tile. Buckets are render
diff --git a/src/mbgl/tile/tile_source.hpp b/src/mbgl/tile/tile_loader.hpp
index 3ba3ab2704..cab1907741 100644
--- a/src/mbgl/tile/tile_source.hpp
+++ b/src/mbgl/tile/tile_loader.hpp
@@ -15,7 +15,7 @@ class UpdateParameters;
} // namespace style
template <typename T>
-class TileSource : private util::noncopyable {
+class TileLoader : private util::noncopyable {
public:
// TileSources can have two states: optional or required.
// - optional means that only low-cost actions should be taken to obtain the data
@@ -27,7 +27,7 @@ public:
Required = true,
};
- TileSource(T&,
+ TileLoader(T&,
const OverscaledTileID&,
const style::UpdateParameters&,
const Tileset&);
diff --git a/src/mbgl/tile/tile_source_impl.hpp b/src/mbgl/tile/tile_loader_impl.hpp
index 51591aa534..2e57f2f6f3 100644
--- a/src/mbgl/tile/tile_source_impl.hpp
+++ b/src/mbgl/tile/tile_loader_impl.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <mbgl/tile/tile_source.hpp>
+#include <mbgl/tile/tile_loader.hpp>
#include <mbgl/storage/file_source.hpp>
#include <mbgl/style/update_parameters.hpp>
#include <mbgl/util/tileset.hpp>
@@ -10,7 +10,7 @@
namespace mbgl {
template <typename T>
-TileSource<T>::TileSource(T& tile_,
+TileLoader<T>::TileLoader(T& tile_,
const OverscaledTileID& id,
const style::UpdateParameters& parameters,
const Tileset& tileset)
@@ -25,9 +25,9 @@ TileSource<T>::TileSource(T& tile_,
fileSource(parameters.fileSource) {
assert(!request);
if (fileSource.supportsOptionalRequests()) {
- // When supported, the first request is always optional, even if the TileSource
+ // When supported, the first request is always optional, even if the TileLoader
// is marked as required. That way, we can let the first optional request continue
- // to load when the TileSource is later changed from required to optional. If we
+ // to load when the TileLoader is later changed from required to optional. If we
// started out with a required request, we'd have to cancel everything, including the
// initial optional part of the request.
loadOptional();
@@ -44,7 +44,7 @@ TileSource<T>::TileSource(T& tile_,
}
template <typename T>
-void TileSource<T>::loadOptional() {
+void TileLoader<T>::loadOptional() {
assert(!request);
resource.necessity = Resource::Optional;
@@ -69,14 +69,14 @@ void TileSource<T>::loadOptional() {
}
template <typename T>
-void TileSource<T>::makeRequired() {
+void TileLoader<T>::makeRequired() {
if (!request) {
loadRequired();
}
}
template <typename T>
-void TileSource<T>::makeOptional() {
+void TileLoader<T>::makeOptional() {
if (resource.necessity == Resource::Required && request) {
// Abort a potential HTTP request.
request.reset();
@@ -84,7 +84,7 @@ void TileSource<T>::makeOptional() {
}
template <typename T>
-void TileSource<T>::loadedData(const Response& res) {
+void TileLoader<T>::loadedData(const Response& res) {
if (res.error && res.error->reason != Response::Error::Reason::NotFound) {
tile.setError(std::make_exception_ptr(std::runtime_error(res.error->message)));
} else if (res.notModified) {
@@ -100,7 +100,7 @@ void TileSource<T>::loadedData(const Response& res) {
}
template <typename T>
-void TileSource<T>::loadRequired() {
+void TileLoader<T>::loadRequired() {
assert(!request);
resource.necessity = Resource::Required;
diff --git a/src/mbgl/tile/vector_tile.cpp b/src/mbgl/tile/vector_tile.cpp
index bd0fcac53a..8050f51a94 100644
--- a/src/mbgl/tile/vector_tile.cpp
+++ b/src/mbgl/tile/vector_tile.cpp
@@ -1,5 +1,5 @@
#include <mbgl/tile/vector_tile.hpp>
-#include <mbgl/tile/tile_source_impl.hpp>
+#include <mbgl/tile/tile_loader_impl.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
#include <mbgl/style/update_parameters.hpp>
@@ -73,11 +73,11 @@ VectorTile::VectorTile(const OverscaledTileID& id_,
const style::UpdateParameters& parameters,
const Tileset& tileset)
: GeometryTile(id_, sourceID, parameters.style, parameters.mode),
- tileSource(*this, id_, parameters, tileset) {
+ loader(*this, id_, parameters, tileset) {
}
void VectorTile::setNecessity(Necessity necessity) {
- tileSource.setNecessity(static_cast<TileSource<VectorTile>::Necessity>(necessity));
+ loader.setNecessity(static_cast<TileLoader<VectorTile>::Necessity>(necessity));
}
void VectorTile::setData(std::shared_ptr<const std::string> data_,
diff --git a/src/mbgl/tile/vector_tile.hpp b/src/mbgl/tile/vector_tile.hpp
index 89fb51ebcd..2568a277e6 100644
--- a/src/mbgl/tile/vector_tile.hpp
+++ b/src/mbgl/tile/vector_tile.hpp
@@ -1,7 +1,7 @@
#pragma once
#include <mbgl/tile/geometry_tile.hpp>
-#include <mbgl/tile/tile_source.hpp>
+#include <mbgl/tile/tile_loader.hpp>
namespace mbgl {
@@ -24,7 +24,7 @@ public:
optional<Timestamp> expires);
private:
- TileSource<VectorTile> tileSource;
+ TileLoader<VectorTile> loader;
};
} // namespace mbgl