Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: gpu/command_buffer/common/logging.h

Issue 1697002: Added facility to stub log and check. It is still not ideal but workable. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/logging.h
===================================================================
--- gpu/command_buffer/common/logging.h (revision 45037)
+++ gpu/command_buffer/common/logging.h (working copy)
@@ -2,30 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This file abstracts differences in logging between NaCl and host
-// environment.
+// This file provides ability to stub LOG and CHECK.
#ifndef GPU_COMMAND_BUFFER_COMMON_LOGGING_H_
#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
+#if defined(__native_client__)
+#define STUB_LOG_AND_CHECK 1
+#endif // __native_client__
+
+#if defined STUB_LOG_AND_CHECK
#include <sstream>
-#define GPU_LOG LOG
-#define GPU_CHECK CHECK
// TODO: implement logging through nacl's debug service runtime if
// available.
#define CHECK(X) do {} while (0)
@@ -49,6 +37,8 @@
#define NOTREACHED() DCHECK(false)
-#endif
+#else // STUB_LOG_AND_CHECK
+#include "base/logging.h"
+#endif // STUB_LOG_AND_CHECK
#endif // GPU_COMMAND_BUFFER_COMMON_LOGGING_H_
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698