From 7a94d7bcd3fbf62553d80c39e1eceabd3a5fc136 Mon Sep 17 00:00:00 2001 From: "jbauman@chromium.org" Date: Mon, 7 Apr 2014 23:21:46 +0000 Subject: Add WaitForToken and WaitForGetOffset messages. These let the proxy wait for commands to complete without spinning on a GetStateFast message. BUG=349632 Review URL: https://codereview.chromium.org/215033004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262246 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/gpu/gpu_command_buffer_stub.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'content/common/gpu/gpu_command_buffer_stub.h') diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h index b7fc958..34790dc 100644 --- a/content/common/gpu/gpu_command_buffer_stub.h +++ b/content/common/gpu/gpu_command_buffer_stub.h @@ -46,6 +46,7 @@ class GpuChannel; class GpuVideoDecodeAccelerator; class GpuVideoEncodeAccelerator; class GpuWatchdog; +struct WaitForCommandState; class GpuCommandBufferStub : public GpuMemoryManagerClient, @@ -160,7 +161,12 @@ class GpuCommandBufferStub void OnSetGetBuffer(int32 shm_id, IPC::Message* reply_message); void OnProduceFrontBuffer(const gpu::Mailbox& mailbox); void OnGetState(IPC::Message* reply_message); - void OnGetStateFast(IPC::Message* reply_message); + void OnWaitForTokenInRange(int32 start, + int32 end, + IPC::Message* reply_message); + void OnWaitForGetOffsetInRange(int32 start, + int32 end, + IPC::Message* reply_message); void OnAsyncFlush(int32 put_offset, uint32 flush_count); void OnEcho(const IPC::Message& message); void OnRescheduled(); @@ -218,6 +224,7 @@ class GpuCommandBufferStub void ScheduleDelayedWork(int64 delay); bool CheckContextLost(); + void CheckCompleteWaits(); // The lifetime of objects of this class is managed by a GpuChannel. The // GpuChannels destroy all the GpuCommandBufferStubs that they own when they @@ -270,6 +277,8 @@ class GpuCommandBufferStub size_t active_url_hash_; size_t total_gpu_memory_; + scoped_ptr wait_for_token_; + scoped_ptr wait_for_get_offset_; DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); }; -- cgit v1.1