| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/ws/gpu_client.h" | 5 #include "services/ui/ws/gpu_client.h" |
| 6 | 6 |
| 7 #include "services/ui/common/server_gpu_memory_buffer_manager.h" | 7 #include "components/viz/common/server_gpu_memory_buffer_manager.h" |
| 8 #include "services/ui/gpu/interfaces/gpu_service.mojom.h" | 8 #include "services/ui/gpu/interfaces/gpu_service.mojom.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| 11 namespace ws { | 11 namespace ws { |
| 12 | 12 |
| 13 GpuClient::GpuClient(int client_id, | 13 GpuClient::GpuClient( |
| 14 gpu::GPUInfo* gpu_info, | 14 int client_id, |
| 15 ServerGpuMemoryBufferManager* gpu_memory_buffer_manager, | 15 gpu::GPUInfo* gpu_info, |
| 16 mojom::GpuService* gpu_service) | 16 viz::ServerGpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 17 mojom::GpuService* gpu_service) |
| 17 : client_id_(client_id), | 18 : client_id_(client_id), |
| 18 gpu_info_(gpu_info), | 19 gpu_info_(gpu_info), |
| 19 gpu_memory_buffer_manager_(gpu_memory_buffer_manager), | 20 gpu_memory_buffer_manager_(gpu_memory_buffer_manager), |
| 20 gpu_service_(gpu_service), | 21 gpu_service_(gpu_service), |
| 21 weak_factory_(this) { | 22 weak_factory_(this) { |
| 22 DCHECK(gpu_memory_buffer_manager_); | 23 DCHECK(gpu_memory_buffer_manager_); |
| 23 DCHECK(gpu_service_); | 24 DCHECK(gpu_service_); |
| 24 } | 25 } |
| 25 | 26 |
| 26 GpuClient::~GpuClient() { | 27 GpuClient::~GpuClient() { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 59 } |
| 59 | 60 |
| 60 void GpuClient::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | 61 void GpuClient::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
| 61 const gpu::SyncToken& sync_token) { | 62 const gpu::SyncToken& sync_token) { |
| 62 gpu_memory_buffer_manager_->DestroyGpuMemoryBuffer(id, client_id_, | 63 gpu_memory_buffer_manager_->DestroyGpuMemoryBuffer(id, client_id_, |
| 63 sync_token); | 64 sync_token); |
| 64 } | 65 } |
| 65 | 66 |
| 66 } // namespace ws | 67 } // namespace ws |
| 67 } // namespace ui | 68 } // namespace ui |
| OLD | NEW |