summaryrefslogtreecommitdiff
path: root/src/mbgl/tile/geometry_tile_worker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/tile/geometry_tile_worker.cpp')
-rw-r--r--src/mbgl/tile/geometry_tile_worker.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mbgl/tile/geometry_tile_worker.cpp b/src/mbgl/tile/geometry_tile_worker.cpp
index ca20c4b8ab..31f4b89801 100644
--- a/src/mbgl/tile/geometry_tile_worker.cpp
+++ b/src/mbgl/tile/geometry_tile_worker.cpp
@@ -12,6 +12,7 @@
#include <mbgl/util/constants.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/exception.hpp>
+#include <mbgl/util/stopwatch.hpp>
#include <unordered_set>
@@ -319,6 +320,7 @@ void GeometryTileWorker::parse() {
return;
}
+ MBGL_TIMING_START(watch)
std::vector<std::string> symbolOrder;
for (auto it = layers->rbegin(); it != layers->rend(); it++) {
if ((*it)->type == LayerType::Symbol) {
@@ -403,6 +405,11 @@ void GeometryTileWorker::parse() {
requestNewGlyphs(glyphDependencies);
requestNewImages(imageDependencies);
+ MBGL_TIMING_FINISH(watch,
+ " Action: " << "Parsing," <<
+ " SourceID: " << sourceID.c_str() <<
+ " Canonical: " << static_cast<int>(id.canonical.z) << "/" << id.canonical.x << "/" << id.canonical.y <<
+ " Time");
performSymbolLayout();
}
@@ -424,6 +431,7 @@ void GeometryTileWorker::performSymbolLayout() {
return;
}
+ MBGL_TIMING_START(watch)
optional<AlphaImage> glyphAtlasImage;
optional<PremultipliedImage> iconAtlasImage;
@@ -466,6 +474,11 @@ void GeometryTileWorker::performSymbolLayout() {
firstLoad = false;
+ MBGL_TIMING_FINISH(watch,
+ " Action: " << "SymbolLayout," <<
+ " SourceID: " << sourceID.c_str() <<
+ " Canonical: " << static_cast<int>(id.canonical.z) << "/" << id.canonical.x << "/" << id.canonical.y <<
+ " Time");
parent.invoke(&GeometryTile::onLayout, GeometryTile::LayoutResult {
std::move(buckets),
std::move(featureIndex),