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

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

Issue 2866983003: mus-gpu: Bind GpuMain on the gpu thread. (Closed)
Patch Set: . Created 3 years, 7 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/gpu_service.h ('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 23 matching lines...) Expand all
34 } // namespace 34 } // namespace
35 35
36 GpuHost::GpuHost(GpuHostDelegate* delegate) 36 GpuHost::GpuHost(GpuHostDelegate* delegate)
37 : delegate_(delegate), 37 : delegate_(delegate),
38 next_client_id_(kInternalGpuChannelClientId + 1), 38 next_client_id_(kInternalGpuChannelClientId + 1),
39 main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()), 39 main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
40 gpu_host_binding_(this) { 40 gpu_host_binding_(this) {
41 // TODO(sad): Once GPU process is split, this would look like: 41 // TODO(sad): Once GPU process is split, this would look like:
42 // connector->BindInterface("gpu", &gpu_main_); 42 // connector->BindInterface("gpu", &gpu_main_);
43 gpu_main_impl_ = base::MakeUnique<GpuMain>(MakeRequest(&gpu_main_)); 43 gpu_main_impl_ = base::MakeUnique<GpuMain>(MakeRequest(&gpu_main_));
44 gpu_main_impl_->OnStart();
45 44
46 // TODO(sad): Correctly initialize gpu::GpuPreferences (like it is initialized 45 // TODO(sad): Correctly initialize gpu::GpuPreferences (like it is initialized
47 // in GpuProcessHost::Init()). 46 // in GpuProcessHost::Init()).
48 gpu::GpuPreferences preferences; 47 gpu::GpuPreferences preferences;
49 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_), 48 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_),
50 gpu_host_binding_.CreateInterfacePtrAndBind(), 49 gpu_host_binding_.CreateInterfacePtrAndBind(),
51 preferences, mojo::ScopedSharedBufferHandle()); 50 preferences, mojo::ScopedSharedBufferHandle());
52 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>( 51 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>(
53 gpu_service_.get(), next_client_id_++); 52 gpu_service_.get(), next_client_id_++);
54 } 53 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void GpuHost::StoreShaderToDisk(int32_t client_id, 134 void GpuHost::StoreShaderToDisk(int32_t client_id,
136 const std::string& key, 135 const std::string& key,
137 const std::string& shader) {} 136 const std::string& shader) {}
138 137
139 void GpuHost::RecordLogMessage(int32_t severity, 138 void GpuHost::RecordLogMessage(int32_t severity,
140 const std::string& header, 139 const std::string& header,
141 const std::string& message) {} 140 const std::string& message) {}
142 141
143 } // namespace ws 142 } // namespace ws
144 } // namespace ui 143 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/gpu/gpu_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698