diff options
-rw-r--r-- | src/mbgl/algorithm/generate_clip_ids.cpp | 1 | ||||
-rw-r--r-- | src/mbgl/renderer/painter.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/painter.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/renderer/painter_debug.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/renderer/render_item.hpp | 6 | ||||
-rw-r--r-- | src/mbgl/renderer/render_tile.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/renderer/render_tile.hpp (renamed from src/mbgl/tile/tile.hpp) | 12 | ||||
-rw-r--r-- | src/mbgl/style/source.cpp | 20 | ||||
-rw-r--r-- | src/mbgl/style/source.hpp | 8 | ||||
-rw-r--r-- | src/mbgl/style/style.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/util/clip_id.hpp | 2 |
11 files changed, 33 insertions, 33 deletions
diff --git a/src/mbgl/algorithm/generate_clip_ids.cpp b/src/mbgl/algorithm/generate_clip_ids.cpp index 208db797d0..74e0ee242f 100644 --- a/src/mbgl/algorithm/generate_clip_ids.cpp +++ b/src/mbgl/algorithm/generate_clip_ids.cpp @@ -2,7 +2,6 @@ #include <mbgl/algorithm/covered_by_children.hpp> #include <mbgl/util/std.hpp> -#include <mbgl/tile/tile.hpp> #include <list> #include <vector> diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp index 1864bf7ef1..817cf9502d 100644 --- a/src/mbgl/renderer/painter.cpp +++ b/src/mbgl/renderer/painter.cpp @@ -1,7 +1,7 @@ #include <mbgl/renderer/painter.hpp> +#include <mbgl/renderer/render_tile.hpp> #include <mbgl/style/source.hpp> -#include <mbgl/tile/tile.hpp> #include <mbgl/platform/log.hpp> #include <mbgl/gl/debugging.hpp> diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp index 65573b6594..cfffb9092b 100644 --- a/src/mbgl/renderer/painter.hpp +++ b/src/mbgl/renderer/painter.hpp @@ -27,7 +27,7 @@ namespace mbgl { -class Tile; +class RenderTile; class SpriteAtlas; class GlyphAtlas; class LineAtlas; @@ -93,7 +93,7 @@ public: SpriteAtlas& annotationSpriteAtlas); // Renders debug information for a tile. - void renderTileDebug(const Tile& tile); + void renderTileDebug(const RenderTile&); // Renders the red debug frame around a tile, visualizing its perimeter. void renderDebugFrame(const mat4 &matrix); diff --git a/src/mbgl/renderer/painter_debug.cpp b/src/mbgl/renderer/painter_debug.cpp index b55a3c1628..5071b209cb 100644 --- a/src/mbgl/renderer/painter_debug.cpp +++ b/src/mbgl/renderer/painter_debug.cpp @@ -1,6 +1,6 @@ #include <mbgl/renderer/painter.hpp> #include <mbgl/renderer/debug_bucket.hpp> -#include <mbgl/tile/tile.hpp> +#include <mbgl/renderer/render_tile.hpp> #include <mbgl/tile/tile_data.hpp> #include <mbgl/shader/plain_shader.hpp> #include <mbgl/util/string.hpp> @@ -11,7 +11,7 @@ using namespace mbgl; -void Painter::renderTileDebug(const Tile& tile) { +void Painter::renderTileDebug(const RenderTile& tile) { MBGL_DEBUG_GROUP(std::string { "debug " } + util::toString(tile.id)); if (frame.debugOptions != MapDebugOptions::NoDebug) { setClipping(tile.clip); diff --git a/src/mbgl/renderer/render_item.hpp b/src/mbgl/renderer/render_item.hpp index 6c97b66bd1..9d650606ac 100644 --- a/src/mbgl/renderer/render_item.hpp +++ b/src/mbgl/renderer/render_item.hpp @@ -7,7 +7,7 @@ namespace mbgl { -class Tile; +class RenderTile; class Bucket; namespace style { @@ -18,12 +18,12 @@ class Source; class RenderItem { public: RenderItem(const style::Layer& layer_, - const Tile* tile_ = nullptr, + const RenderTile* tile_ = nullptr, Bucket* bucket_ = nullptr) : tile(tile_), bucket(bucket_), layer(layer_) { } - const Tile* const tile; + const RenderTile* const tile; Bucket* const bucket; const style::Layer& layer; }; diff --git a/src/mbgl/renderer/render_tile.cpp b/src/mbgl/renderer/render_tile.cpp new file mode 100644 index 0000000000..2f407a2895 --- /dev/null +++ b/src/mbgl/renderer/render_tile.cpp @@ -0,0 +1,3 @@ +#include <mbgl/renderer/render_tile.hpp> + +using namespace mbgl; diff --git a/src/mbgl/tile/tile.hpp b/src/mbgl/renderer/render_tile.hpp index 1e35e78735..e2405b5359 100644 --- a/src/mbgl/tile/tile.hpp +++ b/src/mbgl/renderer/render_tile.hpp @@ -9,15 +9,15 @@ namespace mbgl { class TileData; -class Tile { +class RenderTile { public: - Tile(const UnwrappedTileID& id_, TileData& data_) : id(id_), data(data_) { + RenderTile(const UnwrappedTileID& id_, TileData& data_) : id(id_), data(data_) { } - Tile(const Tile&) = delete; - Tile(Tile&&) = default; - Tile& operator=(const Tile&) = delete; - Tile& operator=(Tile&&) = default; + RenderTile(const RenderTile&) = delete; + RenderTile(RenderTile&&) = default; + RenderTile& operator=(const RenderTile&) = delete; + RenderTile& operator=(RenderTile&&) = default; const UnwrappedTileID id; TileData& data; diff --git a/src/mbgl/style/source.cpp b/src/mbgl/style/source.cpp index 2df35c6c3a..412bb9afc7 100644 --- a/src/mbgl/style/source.cpp +++ b/src/mbgl/style/source.cpp @@ -1,7 +1,7 @@ #include <mbgl/style/source.hpp> #include <mbgl/style/source_observer.hpp> #include <mbgl/map/transform.hpp> -#include <mbgl/tile/tile.hpp> +#include <mbgl/renderer/render_tile.hpp> #include <mbgl/renderer/painter.hpp> #include <mbgl/util/exception.hpp> #include <mbgl/util/constants.hpp> @@ -156,7 +156,7 @@ void Source::load(FileSource& fileSource) { if (reloadTiles) { // Tile information changed because we got new GeoJSON data, or a new tile URL. tileDataMap.clear(); - tiles.clear(); + renderTiles.clear(); cache.clear(); } @@ -167,7 +167,7 @@ void Source::load(FileSource& fileSource) { } void Source::updateMatrices(const mat4 &projMatrix, const TransformState &transform) { - for (auto& pair : tiles) { + for (auto& pair : renderTiles) { auto& tile = pair.second; transform.matrixFor(tile.matrix, tile.id); matrix::multiply(tile.matrix, projMatrix, tile.matrix); @@ -175,14 +175,14 @@ void Source::updateMatrices(const mat4 &projMatrix, const TransformState &transf } void Source::finishRender(Painter &painter) { - for (auto& pair : tiles) { + for (auto& pair : renderTiles) { auto& tile = pair.second; painter.renderTileDebug(tile); } } -const std::map<UnwrappedTileID, Tile>& Source::getTiles() const { - return tiles; +const std::map<UnwrappedTileID, RenderTile>& Source::getRenderTiles() const { + return renderTiles; } std::unique_ptr<TileData> Source::createTile(const OverscaledTileID& overscaledTileID, @@ -264,10 +264,10 @@ bool Source::update(const UpdateParameters& parameters) { } }; auto renderTileFn = [this](const UnwrappedTileID& renderTileID, TileData& tileData) { - tiles.emplace(renderTileID, Tile{ renderTileID, tileData }); + renderTiles.emplace(renderTileID, RenderTile{ renderTileID, tileData }); }; - tiles.clear(); + renderTiles.clear(); algorithm::updateRenderables(getTileDataFn, createTileDataFn, retainTileDataFn, renderTileFn, idealTiles, *tileset, dataTileZoom); @@ -341,8 +341,8 @@ std::unordered_map<std::string, std::vector<Feature>> Source::queryRenderedFeatu std::unordered_map<std::string, std::vector<Feature>> result; - for (const auto& tilePtr : tiles) { - const Tile& tile = tilePtr.second; + for (const auto& tilePtr : renderTiles) { + const RenderTile& tile = tilePtr.second; Point<int16_t> tileSpaceBoundsMin = coordinateToTilePoint(tile.id, box.min); Point<int16_t> tileSpaceBoundsMax = coordinateToTilePoint(tile.id, box.max); diff --git a/src/mbgl/style/source.hpp b/src/mbgl/style/source.hpp index fd916909e2..b748288382 100644 --- a/src/mbgl/style/source.hpp +++ b/src/mbgl/style/source.hpp @@ -28,7 +28,7 @@ class Painter; class FileSource; class AsyncRequest; class TransformState; -class Tile; +class RenderTile; struct ClipID; namespace style { @@ -63,13 +63,13 @@ public: template <typename ClipIDGenerator> void updateClipIDs(ClipIDGenerator& generator) { - generator.update(tiles); + generator.update(renderTiles); } void updateMatrices(const mat4 &projMatrix, const TransformState &transform); void finishRender(Painter &painter); - const std::map<UnwrappedTileID, Tile>& getTiles() const; + const std::map<UnwrappedTileID, RenderTile>& getRenderTiles() const; TileData* getTileData(const OverscaledTileID&) const; @@ -104,7 +104,7 @@ private: // Stores the time when this source was most recently updated. TimePoint updated = TimePoint::min(); - std::map<UnwrappedTileID, Tile> tiles; + std::map<UnwrappedTileID, RenderTile> renderTiles; std::map<OverscaledTileID, std::unique_ptr<TileData>> tileDataMap; TileCache cache; diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp index 2ddfb64a6a..6b228d32db 100644 --- a/src/mbgl/style/style.cpp +++ b/src/mbgl/style/style.cpp @@ -19,7 +19,7 @@ #include <mbgl/geometry/glyph_atlas.hpp> #include <mbgl/geometry/line_atlas.hpp> #include <mbgl/renderer/render_item.hpp> -#include <mbgl/tile/tile.hpp> +#include <mbgl/renderer/render_tile.hpp> #include <mbgl/util/constants.hpp> #include <mbgl/util/string.hpp> #include <mbgl/platform/log.hpp> @@ -289,7 +289,7 @@ RenderData Style::getRenderData() const { continue; } - for (auto& pair : source->getTiles()) { + for (auto& pair : source->getRenderTiles()) { auto& tile = pair.second; if (!tile.data.isRenderable()) { continue; diff --git a/src/mbgl/util/clip_id.hpp b/src/mbgl/util/clip_id.hpp index 064a7acf94..e68f21e741 100644 --- a/src/mbgl/util/clip_id.hpp +++ b/src/mbgl/util/clip_id.hpp @@ -11,8 +11,6 @@ namespace mbgl { -class Tile; - struct ClipID { inline ClipID() {} inline ClipID(const std::string &mask_, const std::string &reference_) : mask(mask_), reference(reference_) {} |