[core] Restore GL_KHR_debug messages in release builds

This reverts commit 8c4da72d09.
This commit is contained in:
John Firebaugh
2017-01-11 15:01:52 -08:00
parent df2b6cfec1
commit ed80755084
3 changed files with 8 additions and 17 deletions

View File

@@ -1,4 +1,3 @@
#ifndef NDEBUG
#include <mbgl/gl/debugging.hpp>
#include <mbgl/gl/gl.hpp>
#include <mbgl/gl/extension.hpp>
@@ -190,5 +189,3 @@ group::~group() {
} // namespace debugging
} // namespace gl
} // namespace mbgl
#endif

View File

@@ -1,9 +1,15 @@
#pragma once
#ifndef NDEBUG
#include <string>
#ifndef NDEBUG
#define __MBGL_DEBUG_GROUP_NAME2(counter) __MBGL_DEBUG_GROUP_##counter
#define __MBGL_DEBUG_GROUP_NAME(counter) __MBGL_DEBUG_GROUP_NAME2(counter)
#define MBGL_DEBUG_GROUP(string) ::mbgl::gl::debugging::group __MBGL_DEBUG_GROUP_NAME(__LINE__)(string);
#else
#define MBGL_DEBUG_GROUP(string)
#endif
namespace mbgl {
namespace gl {
namespace debugging {
@@ -18,13 +24,3 @@ struct group {
} // namespace debugging
} // namespace gl
} // namespace mbgl
#define __MBGL_DEBUG_GROUP_NAME2(counter) __MBGL_DEBUG_GROUP_##counter
#define __MBGL_DEBUG_GROUP_NAME(counter) __MBGL_DEBUG_GROUP_NAME2(counter)
#define MBGL_DEBUG_GROUP(string) ::mbgl::gl::debugging::group __MBGL_DEBUG_GROUP_NAME(__LINE__)(string);
#else // ifndef NDEBUG
#define MBGL_DEBUG_GROUP(string)
#endif

View File

@@ -89,9 +89,7 @@ Painter::Painter(gl::Context& context_, const TransformState& state_, float pixe
tileBorderSegments.emplace_back(0, 0, 4, 5);
rasterSegments.emplace_back(0, 0, 4, 6);
#ifndef NDEBUG
gl::debugging::enable();
#endif
ProgramParameters programParameters{ pixelRatio, false };
programs = std::make_unique<Programs>(context, programParameters);