From 0fe7b20788e2ad2620b9b0f45801ca74c355484d Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Thu, 24 Oct 2019 16:08:47 +0300 Subject: [core] Show tile collision and parser status when building Debug Have a visual clue that it is a debug build. --- render-test/runner.cpp | 6 +++++- src/mbgl/map/map.cpp | 14 ++++++++++---- 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(frontend, observer, - FileSource::getSharedFileSource(resourceOptions), - mapOptions)) {} + : impl(std::make_unique(frontend, observer, FileSource::getSharedFileSource(resourceOptions), mapOptions)) { +#ifndef NDEBUG + setDebug(MapDebugOptions::TileBorders | MapDebugOptions::ParseStatus); +#endif +} -Map::Map(std::unique_ptr impl_) : impl(std::move(impl_)) {} +Map::Map(std::unique_ptr impl_) : impl(std::move(impl_)) { +#ifndef NDEBUG + setDebug(MapDebugOptions::TileBorders | MapDebugOptions::ParseStatus); +#endif +} Map::~Map() = default; -- cgit v1.2.1