diff options
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/common/logging.h | 30 | ||||
-rw-r--r-- | gpu/command_buffer/common/types.h | 14 |
2 files changed, 25 insertions, 19 deletions
diff --git a/gpu/command_buffer/common/logging.h b/gpu/command_buffer/common/logging.h index 476fd79..969fdbf 100644 --- a/gpu/command_buffer/common/logging.h +++ b/gpu/command_buffer/common/logging.h @@ -16,21 +16,21 @@ // TODO: implement logging through nacl's debug service runtime if // available. -#define CHECK(X) do {} while (0) -#define CHECK_EQ(X, Y) do {} while (0) -#define CHECK_NE(X, Y) do {} while (0) -#define CHECK_GT(X, Y) do {} while (0) -#define CHECK_GE(X, Y) do {} while (0) -#define CHECK_LT(X, Y) do {} while (0) -#define CHECK_LE(X, Y) do {} while (0) - -#define DCHECK(X) do {} while (0) -#define DCHECK_EQ(X, Y) do {} while (0) -#define DCHECK_NE(X, Y) do {} while (0) -#define DCHECK_GT(X, Y) do {} while (0) -#define DCHECK_GE(X, Y) do {} while (0) -#define DCHECK_LT(X, Y) do {} while (0) -#define DCHECK_LE(X, Y) do {} while (0) +#define CHECK(X) if (0) std::ostringstream() +#define CHECK_EQ(X, Y) if (0) std::ostringstream() +#define CHECK_NE(X, Y) if (0) std::ostringstream() +#define CHECK_GT(X, Y) if (0) std::ostringstream() +#define CHECK_GE(X, Y) if (0) std::ostringstream() +#define CHECK_LT(X, Y) if (0) std::ostringstream() +#define CHECK_LE(X, Y) if (0) std::ostringstream() + +#define DCHECK(X) if (0) std::ostringstream() +#define DCHECK_EQ(X, Y) if (0) std::ostringstream() +#define DCHECK_NE(X, Y) if (0) std::ostringstream() +#define DCHECK_GT(X, Y) if (0) std::ostringstream() +#define DCHECK_GE(X, Y) if (0) std::ostringstream() +#define DCHECK_LT(X, Y) if (0) std::ostringstream() +#define DCHECK_LE(X, Y) if (0) std::ostringstream() #define LOG(LEVEL) if (0) std::ostringstream() #define DLOG(LEVEL) if (0) std::ostringstream() diff --git a/gpu/command_buffer/common/types.h b/gpu/command_buffer/common/types.h index 020612e..35b96d8 100644 --- a/gpu/command_buffer/common/types.h +++ b/gpu/command_buffer/common/types.h @@ -19,9 +19,12 @@ typedef signed char schar; typedef signed char int8; -typedef short int16; // TODO(mbelshe) Remove these type guards. These are // temporary to avoid conflicts with npapi.h. +#ifndef _INT16 +#define _INT16 +typedef short int16; +#endif #ifndef _INT32 #define _INT32 typedef int int32; @@ -42,9 +45,12 @@ typedef long long int64; // use assertions for this. typedef unsigned char uint8; -typedef unsigned short uint16; // TODO(mbelshe) Remove these type guards. These are // temporary to avoid conflicts with npapi.h. +#ifndef _UINT16 +#define _UINT16 +typedef unsigned short uint16; +#endif #ifndef _UINT32 #define _UINT32 typedef unsigned int uint32; @@ -119,12 +125,12 @@ char (&ArraySizeHelper(const T (&array)[N]))[N]; // containing the name of the variable. template <bool> -struct CompileAssert { +struct GpuCompileAssert { }; #undef COMPILE_ASSERT #define COMPILE_ASSERT(expr, msg) \ - typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] + typedef GpuCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] // Implementation details of COMPILE_ASSERT: // |