summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpu/command_buffer/client/cmd_buffer_helper.cc4
-rw-r--r--gpu/command_buffer/common/logging.h11
2 files changed, 13 insertions, 2 deletions
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc
index 4f9d725..994c838 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper.cc
@@ -83,7 +83,7 @@ void CommandBufferHelper::WaitForToken(int32 token) {
Flush();
while (last_token_read_ < token) {
if (get_ == put_) {
- LOG(FATAL) << "Empty command buffer while waiting on a token.";
+ GPU_LOG(FATAL) << "Empty command buffer while waiting on a token.";
return;
}
// Do not loop forever if the flush fails, meaning the command buffer reader
@@ -99,7 +99,7 @@ void CommandBufferHelper::WaitForToken(int32 token) {
// The function will return early if an error occurs, in which case the
// available space may not be available.
void CommandBufferHelper::WaitForAvailableEntries(int32 count) {
- CHECK(count < entry_count_);
+ GPU_CHECK(count < entry_count_);
if (put_ + count > entry_count_) {
// There's not enough room between the current put and the end of the
// buffer, so we need to wrap. We will add noops all the way to the end,
diff --git a/gpu/command_buffer/common/logging.h b/gpu/command_buffer/common/logging.h
index 169fd65..92ea0aca 100644
--- a/gpu/command_buffer/common/logging.h
+++ b/gpu/command_buffer/common/logging.h
@@ -9,6 +9,17 @@
#define GPU_COMMAND_BUFFER_COMMON_LOGGING_H_
#ifndef __native_client__
+#if defined(TRUSTED_GPU_LIBRARY_BUILD)
+// Turn off base/logging macros for the trusted library build.
+// TODO(dspringer): remove this once building trusted plugins in the Native
+// Client SDK is no longer needed.
+#define OMIT_DLOG_AND_DCHECK 1
+#define GPU_LOG DLOG
+#define GPU_CHECK DCHECK
+#else
+#define GPU_LOG LOG
+#define GPU_CHECK CHECK
+#endif // defined(TRUSTED_GPU_LIBRARY_BUILD)
#include "base/logging.h"
#else
#include <sstream>