diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 23:43:15 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 23:43:15 +0000 |
commit | 7d5b8d1da5cda4a2fbd071430f7030596c3c7365 (patch) | |
tree | 99b82372e1436bcaca5dcc5ba625ad28da0460da /gpu/command_buffer/client/gles2_implementation_unittest.cc | |
parent | 08a3cacedb78fd367b166dad5fdf7dfb01d36bfb (diff) | |
download | chromium_src-7d5b8d1da5cda4a2fbd071430f7030596c3c7365.zip chromium_src-7d5b8d1da5cda4a2fbd071430f7030596c3c7365.tar.gz chromium_src-7d5b8d1da5cda4a2fbd071430f7030596c3c7365.tar.bz2 |
Make CommandBuffer::Flush asynchronous, and add CommandBuffer::FlushSync with former semantics.
Also force a flush when the buffer is getting full.
BUG=none
TEST=gpu_unittests, some webgl content, some 3d css content, pepper flash
Review URL: http://codereview.chromium.org/6316002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation_unittest.cc')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation_unittest.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc index d431851..dabcba3 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest.cc +++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc @@ -37,7 +37,11 @@ class GLES2MockCommandBufferHelper : public CommandBuffer { return state_; } - virtual State Flush(int32 put_offset) { + virtual void Flush(int32 put_offset) { + state_.put_offset = put_offset; + } + + virtual State FlushSync(int32 put_offset) { state_.put_offset = put_offset; state_.get_offset = put_offset; OnFlush(transfer_buffer_buffer_.ptr); @@ -191,7 +195,7 @@ class GLES2ImplementationTest : public testing::Test { false)); EXPECT_CALL(*command_buffer_, OnFlush(_)).Times(1).RetiresOnSaturation(); - helper_->CommandBufferHelper::Flush(); + helper_->CommandBufferHelper::FlushSync(); Buffer ring_buffer = command_buffer_->GetRingBuffer(); commands_ = static_cast<CommandBufferEntry*>(ring_buffer.ptr) + command_buffer_->GetState().put_offset; |