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/service/command_buffer_service.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/service/command_buffer_service.cc')
-rw-r--r-- | gpu/command_buffer/service/command_buffer_service.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gpu/command_buffer/service/command_buffer_service.cc b/gpu/command_buffer/service/command_buffer_service.cc index fd443f2..c2a85af 100644 --- a/gpu/command_buffer/service/command_buffer_service.cc +++ b/gpu/command_buffer/service/command_buffer_service.cc @@ -77,7 +77,7 @@ CommandBufferService::State CommandBufferService::GetState() { return state; } -CommandBufferService::State CommandBufferService::Flush(int32 put_offset) { +CommandBufferService::State CommandBufferService::FlushSync(int32 put_offset) { if (put_offset < 0 || put_offset > num_entries_) { error_ = gpu::error::kOutOfBounds; return GetState(); @@ -92,6 +92,10 @@ CommandBufferService::State CommandBufferService::Flush(int32 put_offset) { return GetState(); } +void CommandBufferService::Flush(int32 put_offset) { + FlushSync(put_offset); +} + void CommandBufferService::SetGetOffset(int32 get_offset) { DCHECK(get_offset >= 0 && get_offset < num_entries_); get_offset_ = get_offset; |