diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 19:41:16 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 19:41:16 +0000 |
commit | 1b8f411d2daf5212f678ea1493b6bd5416d0c8ad (patch) | |
tree | e10297c768c79c2cecd2fb3b49fb5a1ae98a20d1 /o3d/gpu_plugin/command_buffer_mock.h | |
parent | b6aa587dc3d810cbc73ad9f3f3ec062cb231d869 (diff) | |
download | chromium_src-1b8f411d2daf5212f678ea1493b6bd5416d0c8ad.zip chromium_src-1b8f411d2daf5212f678ea1493b6bd5416d0c8ad.tar.gz chromium_src-1b8f411d2daf5212f678ea1493b6bd5416d0c8ad.tar.bz2 |
Exracted CommandBuffer class from GPUPluginObject.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/200005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25348 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/gpu_plugin/command_buffer_mock.h')
-rw-r--r-- | o3d/gpu_plugin/command_buffer_mock.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/o3d/gpu_plugin/command_buffer_mock.h b/o3d/gpu_plugin/command_buffer_mock.h new file mode 100644 index 0000000..9d3f799 --- /dev/null +++ b/o3d/gpu_plugin/command_buffer_mock.h @@ -0,0 +1,30 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef O3D_GPU_PLUGIN_COMMAND_BUFFER_MOCK_H_ +#define O3D_GPU_PLUGIN_COMMAND_BUFFER_MOCK_H_ + +#include "o3d/gpu_plugin/command_buffer.h" +#include "testing/gmock/include/gmock/gmock.h" + +namespace o3d { +namespace gpu_plugin { + +// An NPObject that implements a shared memory command buffer and a synchronous +// API to manage the put and get pointers. +class MockCommandBuffer : public CommandBuffer { + public: + explicit MockCommandBuffer(NPP npp) : CommandBuffer(npp) { + } + + MOCK_METHOD1(Initialize, bool(int32)); + MOCK_METHOD0(GetBuffer, NPObjectPointer<NPObject>()); + MOCK_METHOD1(SetPutOffset, void(int32)); + MOCK_METHOD0(GetGetOffset, int32()); +}; + +} // namespace gpu_plugin +} // namespace o3d + +#endif // O3D_GPU_PLUGIN_COMMAND_BUFFER_MOCK_H_ |