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/gpu.h" | 5 #include "services/ui/public/cpp/gpu/gpu.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/message_loop/message_loop.h" |
8 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
10 #include "gpu/command_buffer/common/scheduling_priority.h" | 11 #include "gpu/command_buffer/common/scheduling_priority.h" |
11 #include "mojo/public/cpp/bindings/sync_call_restrictions.h" | 12 #include "mojo/public/cpp/bindings/sync_call_restrictions.h" |
12 #include "mojo/public/cpp/system/platform_handle.h" | 13 #include "mojo/public/cpp/system/platform_handle.h" |
13 #include "services/service_manager/public/cpp/connector.h" | 14 #include "services/service_manager/public/cpp/connector.h" |
14 #include "services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h" | 15 #include "services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h" |
15 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" | 16 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" |
16 #include "services/ui/public/interfaces/constants.mojom.h" | 17 #include "services/ui/public/interfaces/constants.mojom.h" |
17 #include "services/ui/public/interfaces/gpu.mojom.h" | 18 #include "services/ui/public/interfaces/gpu.mojom.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 MojoResult result = mojo::UnwrapSharedMemoryHandle( | 173 MojoResult result = mojo::UnwrapSharedMemoryHandle( |
173 std::move(handle), &platform_handle, &shared_memory_size, &readonly); | 174 std::move(handle), &platform_handle, &shared_memory_size, &readonly); |
174 if (result != MOJO_RESULT_OK) | 175 if (result != MOJO_RESULT_OK) |
175 return nullptr; | 176 return nullptr; |
176 DCHECK_EQ(shared_memory_size, size); | 177 DCHECK_EQ(shared_memory_size, size); |
177 | 178 |
178 return base::MakeUnique<base::SharedMemory>(platform_handle, readonly); | 179 return base::MakeUnique<base::SharedMemory>(platform_handle, readonly); |
179 } | 180 } |
180 | 181 |
181 } // namespace ui | 182 } // namespace ui |
OLD | NEW |