diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 22:25:58 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 22:25:58 +0000 |
commit | 60fca94ed614caad0109c1062f8260490cd85695 (patch) | |
tree | 57e10fafa5bec156eaa8fd5878bb1670df37adcf /o3d/gpu_plugin/command_buffer.cc | |
parent | ff046e815788bea45e88baa982d9df8f61efb77e (diff) | |
download | chromium_src-60fca94ed614caad0109c1062f8260490cd85695.zip chromium_src-60fca94ed614caad0109c1062f8260490cd85695.tar.gz chromium_src-60fca94ed614caad0109c1062f8260490cd85695.tar.bz2 |
Added support for getting and setting the CommandBuffer token and error.
See o3d/command_buffer/service/cross/cmd_buffer_engine.h.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/207061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/gpu_plugin/command_buffer.cc')
-rw-r--r-- | o3d/gpu_plugin/command_buffer.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/o3d/gpu_plugin/command_buffer.cc b/o3d/gpu_plugin/command_buffer.cc index badda14..04b1f41 100644 --- a/o3d/gpu_plugin/command_buffer.cc +++ b/o3d/gpu_plugin/command_buffer.cc @@ -11,7 +11,9 @@ CommandBuffer::CommandBuffer(NPP npp) : npp_(npp), size_(0), get_offset_(0), - put_offset_(0) { + put_offset_(0), + token_(0), + error_(ERROR_NO_ERROR) { // Element zero is always NULL. registered_objects_.push_back(NPObjectPointer<NPObject>()); } @@ -152,5 +154,11 @@ NPObjectPointer<NPObject> CommandBuffer::GetRegisteredObject(int32 handle) { return registered_objects_[handle]; } +int32 CommandBuffer::ResetError() { + int32 last_error = error_; + error_ = ERROR_NO_ERROR; + return last_error; +} + } // namespace gpu_plugin } // namespace o3d |