Chromium Code Reviews| Index: services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h |
| diff --git a/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h b/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h |
| index 26d78ea5781ceb1ffc894cfd8784a668392ef2df..b42783d2f44daf44f7c434d5836e56e6a6a24f4c 100644 |
| --- a/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h |
| +++ b/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h |
| @@ -6,6 +6,7 @@ |
| #define SERVICES_UI_PUBLIC_CPP_GPU_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ |
| #include <memory> |
| +#include <set> |
| #include <vector> |
| #include "base/macros.h" |
| @@ -45,11 +46,19 @@ class ClientGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { |
| gpu::SurfaceHandle surface_handle) override; |
| void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, |
| const gpu::SyncToken& sync_token) override; |
| + |
| + void DisconnectGpuOnThread(); |
| + void OnGpuMemoryBufferAllocatedOnThread( |
|
sadrul
2017/01/21 02:54:31
Move these above to group with TearDownThread()/Al
Ken Rockot(use gerrit already)
2017/01/23 18:00:50
Done
|
| + gfx::GpuMemoryBufferHandle* ret_handle, |
| + base::WaitableEvent* wait, |
| + const gfx::GpuMemoryBufferHandle& handle); |
| + |
| int counter_ = 0; |
| // TODO(sad): Explore the option of doing this from an existing thread. |
| base::Thread thread_; |
| mojom::GpuPtr gpu_; |
| base::WeakPtr<ClientGpuMemoryBufferManager> weak_ptr_; |
| + std::set<base::WaitableEvent*> pending_allocation_waiters_; |
| base::WeakPtrFactory<ClientGpuMemoryBufferManager> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(ClientGpuMemoryBufferManager); |