| 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/ws/gpu_service_proxy.h" | 5 #include "services/ui/ws/gpu_service_proxy.h" |
| 6 | 6 |
| 7 #include "base/memory/shared_memory.h" | 7 #include "base/memory/shared_memory.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "gpu/ipc/client/gpu_channel_host.h" | 11 #include "gpu/ipc/client/gpu_channel_host.h" |
| 12 #include "services/shell/public/cpp/connection.h" | 12 #include "services/shell/public/cpp/connection.h" |
| 13 #include "services/ui/common/gpu_type_converters.h" | |
| 14 #include "services/ui/gpu/gpu_service_internal.h" | 13 #include "services/ui/gpu/gpu_service_internal.h" |
| 15 #include "services/ui/ws/gpu_service_proxy_delegate.h" | 14 #include "services/ui/ws/gpu_service_proxy_delegate.h" |
| 16 #include "services/ui/ws/mus_gpu_memory_buffer_manager.h" | 15 #include "services/ui/ws/mus_gpu_memory_buffer_manager.h" |
| 17 | 16 |
| 18 namespace ui { | 17 namespace ui { |
| 19 namespace ws { | 18 namespace ws { |
| 20 | 19 |
| 21 namespace { | 20 namespace { |
| 22 | 21 |
| 23 const int32_t kInternalGpuChannelClientId = 1; | 22 const int32_t kInternalGpuChannelClientId = 1; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 std::unique_ptr<base::SharedMemory> GpuServiceProxy::AllocateSharedMemory( | 118 std::unique_ptr<base::SharedMemory> GpuServiceProxy::AllocateSharedMemory( |
| 120 size_t size) { | 119 size_t size) { |
| 121 std::unique_ptr<base::SharedMemory> shm(new base::SharedMemory()); | 120 std::unique_ptr<base::SharedMemory> shm(new base::SharedMemory()); |
| 122 if (!shm->CreateAnonymous(size)) | 121 if (!shm->CreateAnonymous(size)) |
| 123 shm.reset(); | 122 shm.reset(); |
| 124 return shm; | 123 return shm; |
| 125 } | 124 } |
| 126 | 125 |
| 127 } // namespace ws | 126 } // namespace ws |
| 128 } // namespace ui | 127 } // namespace ui |
| OLD | NEW |