disable debugging groups in non-debug builds

Use a macro to completely remove all instantiations of mbgl::gl::debugging::group so that we aren't executing the code to generate the arguments to the object instantiation
This commit is contained in:
Konstantin Käfer
2015-08-14 17:15:34 +03:00
parent 85908c3381
commit bb0ae37c25
6 changed files with 23 additions and 20 deletions

View File

@@ -10,7 +10,7 @@
using namespace mbgl;
void Painter::renderTileDebug(const Tile& tile) {
gl::debugging::group group(std::string { "debug " } + std::string(tile.id));
MBGL_DEBUG_GROUP(std::string { "debug " } + std::string(tile.id));
assert(tile.data);
if (debug) {
prepareTile(tile);
@@ -20,7 +20,7 @@ void Painter::renderTileDebug(const Tile& tile) {
}
void Painter::renderDebugText(DebugBucket& bucket, const mat4 &matrix) {
gl::debugging::group group("debug text");
MBGL_DEBUG_GROUP("debug text");
config.depthTest = false;
@@ -47,7 +47,7 @@ void Painter::renderDebugText(DebugBucket& bucket, const mat4 &matrix) {
}
void Painter::renderDebugFrame(const mat4 &matrix) {
gl::debugging::group group("debug frame");
MBGL_DEBUG_GROUP("debug frame");
// Disable depth test and don't count this towards the depth buffer,
// but *don't* disable stencil test, as we want to clip the red tile border