OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/lib/command_buffer_client_impl.h" | 5 #include "services/ui/public/cpp/lib/command_buffer_client_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/process/process_handle.h" | 14 #include "base/process/process_handle.h" |
15 #include "base/threading/thread_restrictions.h" | 15 #include "base/threading/thread_restrictions.h" |
16 #include "gpu/command_buffer/client/gpu_control_client.h" | 16 #include "gpu/command_buffer/client/gpu_control_client.h" |
17 #include "gpu/command_buffer/common/command_buffer_id.h" | 17 #include "gpu/command_buffer/common/command_buffer_id.h" |
18 #include "gpu/command_buffer/common/gpu_memory_buffer_support.h" | 18 #include "gpu/command_buffer/common/gpu_memory_buffer_support.h" |
19 #include "gpu/command_buffer/common/sync_token.h" | 19 #include "gpu/command_buffer/common/sync_token.h" |
20 #include "mojo/public/cpp/system/platform_handle.h" | 20 #include "mojo/public/cpp/system/platform_handle.h" |
21 #include "services/ui/common/gpu_type_converters.h" | 21 #include "services/ui/common/gpu_type_converters.h" |
22 #include "services/ui/common/mojo_buffer_backing.h" | 22 #include "services/ui/public/cpp/lib/mojo_buffer_backing.h" |
23 #include "services/ui/common/mojo_gpu_memory_buffer.h" | 23 #include "services/ui/public/cpp/lib/mojo_gpu_memory_buffer.h" |
24 | 24 |
25 namespace ui { | 25 namespace ui { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 bool CreateAndMapSharedBuffer(size_t size, | 29 bool CreateAndMapSharedBuffer(size_t size, |
30 mojo::ScopedSharedBufferMapping* mapping, | 30 mojo::ScopedSharedBufferMapping* mapping, |
31 mojo::ScopedSharedBufferHandle* handle) { | 31 mojo::ScopedSharedBufferHandle* handle) { |
32 *handle = mojo::SharedBufferHandle::Create(size); | 32 *handle = mojo::SharedBufferHandle::Create(size); |
33 if (!handle->is_valid()) | 33 if (!handle->is_valid()) |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 339 |
340 // It is also safe to wait on the same context. | 340 // It is also safe to wait on the same context. |
341 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && | 341 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && |
342 sync_token->command_buffer_id() == GetCommandBufferID()) | 342 sync_token->command_buffer_id() == GetCommandBufferID()) |
343 return true; | 343 return true; |
344 | 344 |
345 return false; | 345 return false; |
346 } | 346 } |
347 | 347 |
348 } // namespace ui | 348 } // namespace ui |
OLD | NEW |