OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h" | 5 #include "services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| 11 #include "base/single_thread_task_runner.h" |
11 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
12 #include "gpu/ipc/client/gpu_memory_buffer_impl.h" | 13 #include "gpu/ipc/client/gpu_memory_buffer_impl.h" |
13 #include "mojo/public/cpp/system/buffer.h" | 14 #include "mojo/public/cpp/system/buffer.h" |
14 #include "mojo/public/cpp/system/platform_handle.h" | 15 #include "mojo/public/cpp/system/platform_handle.h" |
15 #include "services/service_manager/public/cpp/connector.h" | 16 #include "services/service_manager/public/cpp/connector.h" |
16 #include "services/ui/public/interfaces/constants.mojom.h" | 17 #include "services/ui/public/interfaces/constants.mojom.h" |
17 #include "ui/gfx/buffer_format_util.h" | 18 #include "ui/gfx/buffer_format_util.h" |
18 | 19 |
19 using DestructionCallback = base::Callback<void(const gpu::SyncToken& sync)>; | 20 using DestructionCallback = base::Callback<void(const gpu::SyncToken& sync)>; |
20 | 21 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 163 } |
163 | 164 |
164 void ClientGpuMemoryBufferManager::SetDestructionSyncToken( | 165 void ClientGpuMemoryBufferManager::SetDestructionSyncToken( |
165 gfx::GpuMemoryBuffer* buffer, | 166 gfx::GpuMemoryBuffer* buffer, |
166 const gpu::SyncToken& sync_token) { | 167 const gpu::SyncToken& sync_token) { |
167 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token( | 168 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token( |
168 sync_token); | 169 sync_token); |
169 } | 170 } |
170 | 171 |
171 } // namespace ui | 172 } // namespace ui |
OLD | NEW |