diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 21:52:36 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 21:52:36 +0000 |
commit | 7fe4198bebda573b64e2bd8ec1ef2b2ebc902ac6 (patch) | |
tree | 74d4ac9ad50c41e19b3898436d08c03fe8ecc465 /gpu/command_buffer/client/cmd_buffer_helper.h | |
parent | 13a4860eac01a10ead94c7cf683f465756f1691a (diff) | |
download | chromium_src-7fe4198bebda573b64e2bd8ec1ef2b2ebc902ac6.zip chromium_src-7fe4198bebda573b64e2bd8ec1ef2b2ebc902ac6.tar.gz chromium_src-7fe4198bebda573b64e2bd8ec1ef2b2ebc902ac6.tar.bz2 |
Replace command buffer FlushSync with WaitForTokenInRange and WaitForGetOffsetInRange
This allows the command-buffer interface to be more clear about what's happening, so we'll later be able to create IPCs that wait specifically for one of these events to happen. Currently both function are still implemented by looping on the GetStateFast IPC.
BUG=349632
Review URL: https://codereview.chromium.org/189123004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client/cmd_buffer_helper.h')
-rw-r--r-- | gpu/command_buffer/client/cmd_buffer_helper.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.h b/gpu/command_buffer/client/cmd_buffer_helper.h index 825cf9f..c62071b 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper.h +++ b/gpu/command_buffer/client/cmd_buffer_helper.h @@ -64,14 +64,6 @@ class GPU_EXPORT CommandBufferHelper { // returns, the command buffer service is aware of all pending commands. void Flush(); - // Flushes the commands, setting the put pointer to let the buffer interface - // know that new commands have been added. After a flush returns, the command - // buffer service is aware of all pending commands and it is guaranteed to - // have made some progress in processing them. Returns whether the flush was - // successful. The flush will fail if the command buffer service has - // disconnected. - bool FlushSync(); - // Waits until all the commands have been executed. Returns whether it // was successful. The function will fail if the command buffer service has // disconnected. @@ -274,9 +266,6 @@ class GPU_EXPORT CommandBufferHelper { } private: - // Waits until get changes, updating the value of get_. - void WaitForGetChange(); - // Returns the number of available entries (they may not be contiguous). int32 AvailableEntries() { return (get_offset() - put_ - 1 + total_entry_count_) % total_entry_count_; @@ -286,6 +275,10 @@ class GPU_EXPORT CommandBufferHelper { bool AllocateRingBuffer(); void FreeResources(); + // Waits for the get offset to be in a specific range, inclusive. Returns + // false if there was an error. + bool WaitForGetOffsetInRange(int32 start, int32 end); + #if defined(CMD_HELPER_PERIODIC_FLUSH_CHECK) // Calls Flush if automatic flush conditions are met. void PeriodicFlushCheck(); |