diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-05 23:35:16 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-05 23:35:16 +0000 |
commit | c02f93e47ba08e8dd00c6904e0cc788db647b07e (patch) | |
tree | f27b51946855f3718d24d2150d1f8173354df2d8 /ppapi/proxy/ppapi_command_buffer_proxy.cc | |
parent | e47aee08984a9a341ceccb8e4d342ac616982d2c (diff) | |
download | chromium_src-c02f93e47ba08e8dd00c6904e0cc788db647b07e.zip chromium_src-c02f93e47ba08e8dd00c6904e0cc788db647b07e.tar.gz chromium_src-c02f93e47ba08e8dd00c6904e0cc788db647b07e.tar.bz2 |
GPU: Adding sync points for cross-channel synchronization
Theory of operation: command buffer 1 calls InsertSyncPoint, it returns an ID,
command buffer 2 calls WaitSyncPoint on that ID (even if on another channel).
The wait is pipelined.
InsertSyncPoint is handled on the IO thread in the GPU process, so it's
presumably fast, but its effect is ordered wrt the other messages.
Some benefits of the approach:
- once InsertSyncPoint returns the ID, the sync point is already enqueued to be
eventually retired, so it makes it very hard to cause deadlocks by incorrect
operation on the client side.
- the wait will return if the command buffer that inserted the sync point gets
destroyed.
This primitive should be enough for guaranteeing browser->renderer ordering.
Additional changes are needed to safely handle renderer->browser ordering
(especially in case of buggy/malicious renderer).
BUG=112299
TEST=manual (With other patches)
Review URL: https://chromiumcodereview.appspot.com/10510013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppapi_command_buffer_proxy.cc')
-rw-r--r-- | ppapi/proxy/ppapi_command_buffer_proxy.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.cc b/ppapi/proxy/ppapi_command_buffer_proxy.cc index d3fed94a..371870e 100644 --- a/ppapi/proxy/ppapi_command_buffer_proxy.cc +++ b/ppapi/proxy/ppapi_command_buffer_proxy.cc @@ -60,6 +60,15 @@ bool PpapiCommandBufferProxy::EnsureBackbuffer() { return true; } +uint32 PpapiCommandBufferProxy::InsertSyncPoint() { + NOTIMPLEMENTED(); + return 0; +} + +void PpapiCommandBufferProxy::WaitSyncPoint(uint32 sync_point) { + NOTIMPLEMENTED(); +} + void PpapiCommandBufferProxy::SetMemoryAllocationChangedCallback( const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& callback) { @@ -277,4 +286,3 @@ void PpapiCommandBufferProxy::UpdateState( } // namespace proxy } // namespace ppapi - |