summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppapi_command_buffer_proxy.h
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 23:35:16 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 23:35:16 +0000
commitc02f93e47ba08e8dd00c6904e0cc788db647b07e (patch)
treef27b51946855f3718d24d2150d1f8173354df2d8 /ppapi/proxy/ppapi_command_buffer_proxy.h
parente47aee08984a9a341ceccb8e4d342ac616982d2c (diff)
downloadchromium_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.h')
-rw-r--r--ppapi/proxy/ppapi_command_buffer_proxy.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.h b/ppapi/proxy/ppapi_command_buffer_proxy.h
index 015ce38..0a5cde5 100644
--- a/ppapi/proxy/ppapi_command_buffer_proxy.h
+++ b/ppapi/proxy/ppapi_command_buffer_proxy.h
@@ -36,6 +36,8 @@ class PPAPI_PROXY_EXPORT PpapiCommandBufferProxy : public CommandBufferProxy {
virtual bool SetSurfaceVisible(bool visible) OVERRIDE;
virtual bool DiscardBackbuffer() OVERRIDE;
virtual bool EnsureBackbuffer() OVERRIDE;
+ virtual uint32 InsertSyncPoint() OVERRIDE;
+ virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE;
virtual void SetMemoryAllocationChangedCallback(
const base::Callback<void(const GpuMemoryAllocationForRenderer&)>&
callback) OVERRIDE;