Chromium Code Reviews| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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->BindInterface("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 | 110 |
| 111 // TODO(sad): Correctly initialize gpu::GpuPreferences (like it is initialized | 111 // TODO(sad): Correctly initialize gpu::GpuPreferences (like it is initialized |
| 112 // in GpuProcessHost::Init()). | 112 // in GpuProcessHost::Init()). |
| 113 gpu::GpuPreferences preferences; | 113 gpu::GpuPreferences preferences; |
| 114 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_), | 114 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_), |
| 115 gpu_host_binding_.CreateInterfacePtrAndBind(), | 115 gpu_host_binding_.CreateInterfacePtrAndBind(), |
| 116 preferences); | 116 preferences, mojo::ScopedSharedBufferHandle()); |
|
ericrk
2017/03/15 00:47:54
This is just a no-op for now. Later, if this class
| |
| 117 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>( | 117 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>( |
| 118 gpu_service_.get(), next_client_id_++); | 118 gpu_service_.get(), next_client_id_++); |
| 119 } | 119 } |
| 120 | 120 |
| 121 GpuHost::~GpuHost() {} | 121 GpuHost::~GpuHost() {} |
| 122 | 122 |
| 123 void GpuHost::Add(mojom::GpuRequest request) { | 123 void GpuHost::Add(mojom::GpuRequest request) { |
| 124 mojo::MakeStrongBinding( | 124 mojo::MakeStrongBinding( |
| 125 base::MakeUnique<GpuClient>(next_client_id_++, &gpu_info_, | 125 base::MakeUnique<GpuClient>(next_client_id_++, &gpu_info_, |
| 126 gpu_memory_buffer_manager_.get(), | 126 gpu_memory_buffer_manager_.get(), |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 NOTREACHED(); | 188 NOTREACHED(); |
| 189 #endif | 189 #endif |
| 190 } | 190 } |
| 191 | 191 |
| 192 void GpuHost::StoreShaderToDisk(int32_t client_id, | 192 void GpuHost::StoreShaderToDisk(int32_t client_id, |
| 193 const std::string& key, | 193 const std::string& key, |
| 194 const std::string& shader) {} | 194 const std::string& shader) {} |
| 195 | 195 |
| 196 } // namespace ws | 196 } // namespace ws |
| 197 } // namespace ui | 197 } // namespace ui |
| OLD | NEW |