| 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 "components/mus/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 "components/mus/common/gpu_type_converters.h" | |
| 17 #include "components/mus/common/mojo_buffer_backing.h" | |
| 18 #include "components/mus/common/mojo_gpu_memory_buffer.h" | |
| 19 #include "gpu/command_buffer/client/gpu_control_client.h" | 16 #include "gpu/command_buffer/client/gpu_control_client.h" |
| 20 #include "gpu/command_buffer/common/command_buffer_id.h" | 17 #include "gpu/command_buffer/common/command_buffer_id.h" |
| 21 #include "gpu/command_buffer/common/gpu_memory_buffer_support.h" | 18 #include "gpu/command_buffer/common/gpu_memory_buffer_support.h" |
| 22 #include "gpu/command_buffer/common/sync_token.h" | 19 #include "gpu/command_buffer/common/sync_token.h" |
| 23 #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" |
| 22 #include "services/ui/common/mojo_buffer_backing.h" |
| 23 #include "services/ui/common/mojo_gpu_memory_buffer.h" |
| 24 | 24 |
| 25 namespace mus { | 25 namespace mus { |
| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 // It is also safe to wait on the same context. | 362 // It is also safe to wait on the same context. |
| 363 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && | 363 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && |
| 364 sync_token->command_buffer_id() == GetCommandBufferID()) | 364 sync_token->command_buffer_id() == GetCommandBufferID()) |
| 365 return true; | 365 return true; |
| 366 | 366 |
| 367 return false; | 367 return false; |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace mus | 370 } // namespace mus |
| OLD | NEW |