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

Side by Side Diff: services/ui/gpu/gpu_main.cc

Issue 2934203002: exp/wip: Use ServerGpuMemoryBufferManager in browser.
Patch Set: . Created 3 years, 6 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 | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | services/ui/ws/gpu_host.h » ('j') | 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/gpu/gpu_main.h" 5 #include "services/ui/gpu/gpu_main.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/power_monitor/power_monitor_device_source.h" 10 #include "base/power_monitor/power_monitor_device_source.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 gpu::ImageFactory* image_factory, 193 gpu::ImageFactory* image_factory,
194 mojom::GpuServicePtrInfo gpu_service_info, 194 mojom::GpuServicePtrInfo gpu_service_info,
195 cc::mojom::FrameSinkManagerRequest request, 195 cc::mojom::FrameSinkManagerRequest request,
196 cc::mojom::FrameSinkManagerClientPtrInfo client_info) { 196 cc::mojom::FrameSinkManagerClientPtrInfo client_info) {
197 DCHECK(!frame_sink_manager_); 197 DCHECK(!frame_sink_manager_);
198 cc::mojom::FrameSinkManagerClientPtr client; 198 cc::mojom::FrameSinkManagerClientPtr client;
199 client.Bind(std::move(client_info)); 199 client.Bind(std::move(client_info));
200 200
201 gpu_internal_.Bind(std::move(gpu_service_info)); 201 gpu_internal_.Bind(std::move(gpu_service_info));
202 202
203 display_provider_ = base::MakeUnique<viz::GpuDisplayProvider>( 203 display_provider_ =
204 gpu_command_service_, 204 base::MakeUnique<viz::GpuDisplayProvider>(gpu_command_service_,
205 #if 0
205 base::MakeUnique<viz::ServerGpuMemoryBufferManager>(gpu_internal_.get(), 206 base::MakeUnique<viz::ServerGpuMemoryBufferManager>(gpu_internal_.get(),
206 1 /* client_id */), 207 1 /* client_id */),
207 image_factory); 208 #else
209 nullptr,
210 #endif
211 image_factory);
208 212
209 frame_sink_manager_ = base::MakeUnique<viz::MojoFrameSinkManager>( 213 frame_sink_manager_ = base::MakeUnique<viz::MojoFrameSinkManager>(
210 true, display_provider_.get()); 214 true, display_provider_.get());
211 frame_sink_manager_->BindPtrAndSetClient(std::move(request), 215 frame_sink_manager_->BindPtrAndSetClient(std::move(request),
212 std::move(client)); 216 std::move(client));
213 } 217 }
214 218
215 void GpuMain::TearDownOnCompositorThread() { 219 void GpuMain::TearDownOnCompositorThread() {
216 frame_sink_manager_.reset(); 220 frame_sink_manager_.reset();
217 display_provider_.reset(); 221 display_provider_.reset();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // TODO(sad): https://crbug.com/645602 254 // TODO(sad): https://crbug.com/645602
251 } 255 }
252 256
253 bool GpuMain::EnsureSandboxInitialized( 257 bool GpuMain::EnsureSandboxInitialized(
254 gpu::GpuWatchdogThread* watchdog_thread) { 258 gpu::GpuWatchdogThread* watchdog_thread) {
255 // TODO(sad): https://crbug.com/645602 259 // TODO(sad): https://crbug.com/645602
256 return true; 260 return true;
257 } 261 }
258 262
259 } // namespace ui 263 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | services/ui/ws/gpu_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698