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/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 "gpu/command_buffer/common/activity_flags.h" | 10 #include "gpu/command_buffer/common/activity_flags.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 gpu::ImageFactory* image_factory, | 204 gpu::ImageFactory* image_factory, |
205 mojom::GpuServicePtrInfo gpu_service_info, | 205 mojom::GpuServicePtrInfo gpu_service_info, |
206 cc::mojom::DisplayCompositorRequest request, | 206 cc::mojom::DisplayCompositorRequest request, |
207 cc::mojom::DisplayCompositorClientPtrInfo client_info) { | 207 cc::mojom::DisplayCompositorClientPtrInfo client_info) { |
208 DCHECK(!display_compositor_); | 208 DCHECK(!display_compositor_); |
209 cc::mojom::DisplayCompositorClientPtr client; | 209 cc::mojom::DisplayCompositorClientPtr client; |
210 client.Bind(std::move(client_info)); | 210 client.Bind(std::move(client_info)); |
211 | 211 |
212 gpu_internal_.Bind(std::move(gpu_service_info)); | 212 gpu_internal_.Bind(std::move(gpu_service_info)); |
213 | 213 |
214 display_compositor_ = base::MakeUnique<DisplayCompositor>( | 214 display_compositor_ = base::MakeUnique<frame_sinks::DisplayCompositor>( |
215 gpu_command_service_, base::MakeUnique<ServerGpuMemoryBufferManager>( | 215 gpu_command_service_, |
216 gpu_internal_.get(), 1 /* client_id */), | 216 base::MakeUnique<ServerGpuMemoryBufferManager>(gpu_internal_.get(), |
| 217 1 /* client_id */), |
217 image_factory, std::move(request), std::move(client)); | 218 image_factory, std::move(request), std::move(client)); |
218 } | 219 } |
219 | 220 |
220 void GpuMain::TearDownOnCompositorThread() { | 221 void GpuMain::TearDownOnCompositorThread() { |
221 display_compositor_.reset(); | 222 display_compositor_.reset(); |
222 gpu_internal_.reset(); | 223 gpu_internal_.reset(); |
223 } | 224 } |
224 | 225 |
225 void GpuMain::TearDownOnGpuThread() { | 226 void GpuMain::TearDownOnGpuThread() { |
226 gpu_service_.reset(); | 227 gpu_service_.reset(); |
(...skipping 27 matching lines...) Expand all Loading... |
254 // TODO(sad): https://crbug.com/645602 | 255 // TODO(sad): https://crbug.com/645602 |
255 } | 256 } |
256 | 257 |
257 bool GpuMain::EnsureSandboxInitialized( | 258 bool GpuMain::EnsureSandboxInitialized( |
258 gpu::GpuWatchdogThread* watchdog_thread) { | 259 gpu::GpuWatchdogThread* watchdog_thread) { |
259 // TODO(sad): https://crbug.com/645602 | 260 // TODO(sad): https://crbug.com/645602 |
260 return true; | 261 return true; |
261 } | 262 } |
262 | 263 |
263 } // namespace ui | 264 } // namespace ui |
OLD | NEW |