Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Side by Side Diff: services/ui/ws/gpu_host.cc

Issue 2627993002: mus-gpu: Include GpuPreferences when requesting for GpuService. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/gpu/interfaces/gpu_main.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
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->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
111 // TODO(sad): Correctly initialize gpu::GpuPreferences (like it is initialized
112 // in GpuProcessHost::Init()).
113 gpu::GpuPreferences preferences;
110 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_), 114 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_),
111 gpu_host_binding_.CreateInterfacePtrAndBind()); 115 gpu_host_binding_.CreateInterfacePtrAndBind(),
116 preferences);
112 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>( 117 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>(
113 gpu_service_.get(), next_client_id_++); 118 gpu_service_.get(), next_client_id_++);
114 } 119 }
115 120
116 GpuHost::~GpuHost() {} 121 GpuHost::~GpuHost() {}
117 122
118 void GpuHost::Add(mojom::GpuRequest request) { 123 void GpuHost::Add(mojom::GpuRequest request) {
119 mojo::MakeStrongBinding( 124 mojo::MakeStrongBinding(
120 base::MakeUnique<GpuClient>(next_client_id_++, &gpu_info_, 125 base::MakeUnique<GpuClient>(next_client_id_++, &gpu_info_,
121 gpu_memory_buffer_manager_.get(), 126 gpu_memory_buffer_manager_.get(),
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 NOTREACHED(); 188 NOTREACHED();
184 #endif 189 #endif
185 } 190 }
186 191
187 void GpuHost::StoreShaderToDisk(int32_t client_id, 192 void GpuHost::StoreShaderToDisk(int32_t client_id,
188 const std::string& key, 193 const std::string& key,
189 const std::string& shader) {} 194 const std::string& shader) {}
190 195
191 } // namespace ws 196 } // namespace ws
192 } // namespace ui 197 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/gpu/interfaces/gpu_main.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698