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/public/cpp/gpu_service.h" | 5 #include "services/ui/public/cpp/gpu/gpu_service.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "mojo/public/cpp/bindings/sync_call_restrictions.h" | 11 #include "mojo/public/cpp/bindings/sync_call_restrictions.h" |
| 12 #include "mojo/public/cpp/system/platform_handle.h" | 12 #include "mojo/public/cpp/system/platform_handle.h" |
| 13 #include "services/service_manager/public/cpp/connector.h" | 13 #include "services/service_manager/public/cpp/connector.h" |
| 14 #include "services/ui/common/switches.h" | 14 #include "services/ui/common/switches.h" |
|
mfomitchev
2016/11/18 22:02:34
nit: I don't think this is needed (was removed in
| |
| 15 #include "services/ui/public/cpp/mojo_gpu_memory_buffer_manager.h" | 15 #include "services/ui/public/cpp/gpu/mojo_gpu_memory_buffer_manager.h" |
| 16 #include "services/ui/public/interfaces/constants.mojom.h" | 16 #include "services/ui/public/interfaces/constants.mojom.h" |
| 17 #include "services/ui/public/interfaces/gpu_service.mojom.h" | 17 #include "services/ui/public/interfaces/gpu_service.mojom.h" |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 | 20 |
| 21 GpuService::GpuService(service_manager::Connector* connector, | 21 GpuService::GpuService(service_manager::Connector* connector, |
| 22 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | 22 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
| 23 : main_task_runner_(base::ThreadTaskRunnerHandle::Get()), | 23 : main_task_runner_(base::ThreadTaskRunnerHandle::Get()), |
| 24 io_task_runner_(std::move(task_runner)), | 24 io_task_runner_(std::move(task_runner)), |
| 25 connector_(connector), | 25 connector_(connector), |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 MojoResult result = mojo::UnwrapSharedMemoryHandle( | 147 MojoResult result = mojo::UnwrapSharedMemoryHandle( |
| 148 std::move(handle), &platform_handle, &shared_memory_size, &readonly); | 148 std::move(handle), &platform_handle, &shared_memory_size, &readonly); |
| 149 if (result != MOJO_RESULT_OK) | 149 if (result != MOJO_RESULT_OK) |
| 150 return nullptr; | 150 return nullptr; |
| 151 DCHECK_EQ(shared_memory_size, size); | 151 DCHECK_EQ(shared_memory_size, size); |
| 152 | 152 |
| 153 return base::MakeUnique<base::SharedMemory>(platform_handle, readonly); | 153 return base::MakeUnique<base::SharedMemory>(platform_handle, readonly); |
| 154 } | 154 } |
| 155 | 155 |
| 156 } // namespace ui | 156 } // namespace ui |
| OLD | NEW |