diff options
author | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-18 18:58:58 +0000 |
---|---|---|
committer | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-18 18:58:58 +0000 |
commit | bb5b6bf8599b660c5bf672127ecc3cc7d964cbe8 (patch) | |
tree | 686f724e0150944d29b87cc6b26a60212cec8145 /gpu | |
parent | a823a7b08a35f35067c8d4c98069d0f8d52d10ec (diff) | |
download | chromium_src-bb5b6bf8599b660c5bf672127ecc3cc7d964cbe8.zip chromium_src-bb5b6bf8599b660c5bf672127ecc3cc7d964cbe8.tar.gz chromium_src-bb5b6bf8599b660c5bf672127ecc3cc7d964cbe8.tar.bz2 |
small changes for gpu to compile/build under NaCl (part 1)
Review URL: http://codereview.chromium.org/2087011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47542 0039d316-1c4b-4281-b951-d872f2087c98
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: // |