| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_host.h" | 5 #include "services/ui/ws/gpu_host.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace | 99 } // namespace |
| 100 | 100 |
| 101 GpuHost::GpuHost(GpuHostDelegate* delegate) | 101 GpuHost::GpuHost(GpuHostDelegate* delegate) |
| 102 : delegate_(delegate), | 102 : delegate_(delegate), |
| 103 next_client_id_(kInternalGpuChannelClientId + 1), | 103 next_client_id_(kInternalGpuChannelClientId + 1), |
| 104 main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()), | 104 main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()), |
| 105 gpu_host_binding_(this) { | 105 gpu_host_binding_(this) { |
| 106 // TODO(sad): Once GPU process is split, this would look like: | 106 // TODO(sad): Once GPU process is split, this would look like: |
| 107 // connector->ConnectToInterface("gpu", &gpu_main_); | 107 // connector->BindInterface("gpu", &gpu_main_); |
| 108 gpu_main_impl_ = base::MakeUnique<GpuMain>(MakeRequest(&gpu_main_)); | 108 gpu_main_impl_ = base::MakeUnique<GpuMain>(MakeRequest(&gpu_main_)); |
| 109 gpu_main_impl_->OnStart(); | 109 gpu_main_impl_->OnStart(); |
| 110 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_), | 110 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_), |
| 111 gpu_host_binding_.CreateInterfacePtrAndBind()); | 111 gpu_host_binding_.CreateInterfacePtrAndBind()); |
| 112 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>( | 112 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>( |
| 113 gpu_service_.get(), next_client_id_++); | 113 gpu_service_.get(), next_client_id_++); |
| 114 } | 114 } |
| 115 | 115 |
| 116 GpuHost::~GpuHost() {} | 116 GpuHost::~GpuHost() {} |
| 117 | 117 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 NOTREACHED(); | 183 NOTREACHED(); |
| 184 #endif | 184 #endif |
| 185 } | 185 } |
| 186 | 186 |
| 187 void GpuHost::StoreShaderToDisk(int32_t client_id, | 187 void GpuHost::StoreShaderToDisk(int32_t client_id, |
| 188 const std::string& key, | 188 const std::string& key, |
| 189 const std::string& shader) {} | 189 const std::string& shader) {} |
| 190 | 190 |
| 191 } // namespace ws | 191 } // namespace ws |
| 192 } // namespace ui | 192 } // namespace ui |
| OLD | NEW |