summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-10-24 16:08:47 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2019-10-24 16:08:58 +0300
commit0fe7b20788e2ad2620b9b0f45801ca74c355484d (patch)
treef5a0580eccdc63f569b562a21eb3bfe3306e6e20
parent646d4e3996513ed3e9247e958d39ce9e9b506652 (diff)
downloadqtlocation-mapboxgl-upstream/tmpsantos-debug_clue.tar.gz
[core] Show tile collision and parser status when building Debugupstream/tmpsantos-debug_clue
Have a visual clue that it is a debug build.
-rw-r--r--render-test/runner.cpp6
-rw-r--r--src/mbgl/map/map.cpp14
2 files changed, 15 insertions, 5 deletions
diff --git a/render-test/runner.cpp b/render-test/runner.cpp
index 4c0967a9e9..d2dd65bb83 100644
--- a/render-test/runner.cpp
+++ b/render-test/runner.cpp
@@ -966,7 +966,11 @@ TestRunner::Impl::Impl(const TestMetadata& metadata)
.withSize(metadata.size)
.withPixelRatio(metadata.pixelRatio)
.withCrossSourceCollisions(metadata.crossSourceCollisions),
- mbgl::ResourceOptions().withCacheOnlyRequestsSupport(false)) {}
+ mbgl::ResourceOptions().withCacheOnlyRequestsSupport(false)) {
+#ifndef NDEBUG
+ map.setDebug(MapDebugOptions::NoDebug);
+#endif
+}
TestRunner::Impl::~Impl() {}
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 649e0e321e..f747d37b24 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -30,11 +30,17 @@ Map::Map(RendererFrontend& frontend,
MapObserver& observer,
const MapOptions& mapOptions,
const ResourceOptions& resourceOptions)
- : impl(std::make_unique<Impl>(frontend, observer,
- FileSource::getSharedFileSource(resourceOptions),
- mapOptions)) {}
+ : impl(std::make_unique<Impl>(frontend, observer, FileSource::getSharedFileSource(resourceOptions), mapOptions)) {
+#ifndef NDEBUG
+ setDebug(MapDebugOptions::TileBorders | MapDebugOptions::ParseStatus);
+#endif
+}
-Map::Map(std::unique_ptr<Impl> impl_) : impl(std::move(impl_)) {}
+Map::Map(std::unique_ptr<Impl> impl_) : impl(std::move(impl_)) {
+#ifndef NDEBUG
+ setDebug(MapDebugOptions::TileBorders | MapDebugOptions::ParseStatus);
+#endif
+}
Map::~Map() = default;