diff options
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation.h')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h index 3c25116..6a3aa75 100644 --- a/gpu/command_buffer/client/gles2_implementation.h +++ b/gpu/command_buffer/client/gles2_implementation.h @@ -18,8 +18,21 @@ #include "../client/gles2_cmd_helper.h" #include "../client/ring_buffer.h" -// TODO(gman): replace with logging code expansion. -#define GPU_CLIENT_LOG(args) +#if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANCE_TESTS) // NOLINT + #if defined(GLES2_INLINE_OPTIMIZATION) + // TODO(gman): Replace with macros that work with inline optmization. + #define GPU_CLIENT_LOG(args) + #define GPU_CLIENT_LOG_CODE_BLOCK(code) + #else + #include "base/logging.h" + #define GPU_CLIENT_LOG(args) DLOG_IF(INFO, debug_) << args; + #define GPU_CLIENT_LOG_CODE_BLOCK(code) code + #define GPU_CLIENT_DEBUG + #endif +#else + #define GPU_CLIENT_LOG(args) + #define GPU_CLIENT_LOG_CODE_BLOCK(code) +#endif namespace gpu { @@ -326,6 +339,9 @@ class GLES2Implementation { // Current GL error bits. uint32 error_bits_; + // Whether or not to print debugging info. + bool debug_; + // Map of GLenum to Strings for glGetString. We need to cache these because // the pointer passed back to the client has to remain valid for eternity. typedef std::map<uint32, std::set<std::string> > GLStringMap; |