blob: d24b7272950a8ac7396cd06705e5a51837f7c42c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include <mbgl/util/noncopyable.hpp>
#include <string>
namespace mbgl {
namespace gl {
class Context;
#ifndef NDEBUG
class DebugGroup : private util::noncopyable {
public:
DebugGroup(const Context&, const std::string&);
~DebugGroup();
private:
const Context& context;
};
#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(context, name) const ::mbgl::gl::DebugGroup __MBGL_DEBUG_GROUP_NAME(__LINE__)(context, name);
#else
#define MBGL_DEBUG_GROUP(context, name)
#endif
} // namespace gl
} // namespace mbgl
|