Chromium Code Reviews| Index: content/common/gpu/client/gpu_channel_host.h |
| diff --git a/content/common/gpu/client/gpu_channel_host.h b/content/common/gpu/client/gpu_channel_host.h |
| index ad56d18d85a13aca16672a2eb0d79794a3808277..a33bee13cd177646364697430b9901037dc8892b 100644 |
| --- a/content/common/gpu/client/gpu_channel_host.h |
| +++ b/content/common/gpu/client/gpu_channel_host.h |
| @@ -75,6 +75,8 @@ class CONTENT_EXPORT GpuChannelHostFactory { |
| int32 surface_id, |
| const GPUCreateCommandBufferConfig& init_params, |
| int32 route_id) = 0; |
| + virtual void WaitForPendingGpuMemoryBufferUsageToComplete( |
| + const base::Closure& callback) = 0; |
| }; |
| // Encapsulates an IPC channel between the client and one GPU process. |
| @@ -161,6 +163,9 @@ class GpuChannelHost : public IPC::Sender, |
| // Generate a route ID guaranteed to be unique for this channel. |
| int32 GenerateRouteID(); |
| + void WaitForPendingGpuMemoryBufferUsageToComplete( |
| + const base::Closure& callback); |
| + |
| private: |
| friend class base::RefCountedThreadSafe<GpuChannelHost>; |
| GpuChannelHost(GpuChannelHostFactory* factory, |
| @@ -242,6 +247,17 @@ class GpuChannelHost : public IPC::Sender, |
| typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
| ProxyMap proxies_; |
| + void GpuMemoryBufferWaitCompleted( |
| + uint32 id, |
| + scoped_refptr<base::MessageLoopProxy> caller_message_loop); |
| + void GpuMemoryBufferWaitCompletedOnCallerThread(uint32 id); |
| + |
| + // Protects signal_tasks_. |
| + mutable base::Lock signal_lock_; |
| + typedef base::hash_map<uint32, base::Closure> SignalTaskMap; |
|
reveman
2014/10/22 22:42:47
GpuMemoryBufferUsageCompletedTaskMap?
|
| + SignalTaskMap signal_tasks_; |
| + uint32 next_signal_id_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| }; |