summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/gpu_command_buffer_stub.h
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-07 23:21:46 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-07 23:21:46 +0000
commit7a94d7bcd3fbf62553d80c39e1eceabd3a5fc136 (patch)
tree9a549e2b9ce02db98ef760f5e8d79c7fb7bd1aa1 /content/common/gpu/gpu_command_buffer_stub.h
parente44a19c58a50b005ace49fdb4a3d3a9d9392017f (diff)
downloadchromium_src-7a94d7bcd3fbf62553d80c39e1eceabd3a5fc136.zip
chromium_src-7a94d7bcd3fbf62553d80c39e1eceabd3a5fc136.tar.gz
chromium_src-7a94d7bcd3fbf62553d80c39e1eceabd3a5fc136.tar.bz2
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
Diffstat (limited to 'content/common/gpu/gpu_command_buffer_stub.h')
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.h11
1 files changed, 10 insertions, 1 deletions
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<WaitForCommandState> wait_for_token_;
+ scoped_ptr<WaitForCommandState> wait_for_get_offset_;
DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
};