From 20407e957e31a0faf159403d47dc5d1d6c903f9e Mon Sep 17 00:00:00 2001 From: "apatrick@chromium.org" Date: Wed, 8 Sep 2010 18:31:08 +0000 Subject: Removed dependencies on base from GPU common and client code. The main change was to make scoped_ptr and the basic types the same for both NaCl and trusted plugins and to implement new logging code for GPU common and client code. Service code and unit tests can still use the logging code in base. I am really not happy with the new logging code but I thought I'd let you take a look at it to see what you think. The biggest thing I don't like is it uses assert(false) to throw an exception in a platform independent way, which brings up a modal dialog. Not ideal in the middle of a unit test run. I don't know if that will make the bots hang. Hopefully they'll time out or something. TEST=try BUG=none Review URL: http://codereview.chromium.org/2936009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58857 0039d316-1c4b-4281-b951-d872f2087c98 --- .../client/gles2_implementation_unittest.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gpu/command_buffer/client/gles2_implementation_unittest.cc') diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc index a251ee9..fc2bde9 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest.cc +++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc @@ -57,21 +57,21 @@ class GLES2MockCommandBufferHelper : public CommandBuffer { } virtual void DestroyTransferBuffer(int32) { // NOLINT - NOTREACHED(); + GPU_NOTREACHED(); } virtual Buffer GetTransferBuffer(int32 id) { - DCHECK_EQ(id, kTransferBufferId); + GPU_DCHECK_EQ(id, kTransferBufferId); return transfer_buffer_buffer_; } virtual void SetToken(int32 token) { - NOTREACHED(); + GPU_NOTREACHED(); state_.token = token; } virtual void SetParseError(error::Error error) { - NOTREACHED(); + GPU_NOTREACHED(); state_.error = error; } @@ -94,6 +94,11 @@ class MockGLES2CommandBuffer : public GLES2MockCommandBufferHelper { MOCK_METHOD1(OnFlush, void(void* result)); }; +// GCC requires these declarations, but MSVC requires they not be present +#ifndef _MSC_VER +const int32 GLES2MockCommandBufferHelper::kTransferBufferId; +#endif + namespace gles2 { using testing::Return; @@ -202,7 +207,7 @@ class GLES2ImplementationTest : public testing::Test { }; // GCC requires these declarations, but MSVC requires they not be present -#ifndef COMPILER_MSVC +#ifndef _MSC_VER const int32 GLES2ImplementationTest::kTransferBufferId; #endif -- cgit v1.1