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 "mojo/gles2/command_buffer_client_impl.h" | 5 #include "mojo/gles2/command_buffer_client_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 } | 411 } |
412 | 412 |
413 gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const { | 413 gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const { |
414 return gpu::CommandBufferNamespace::MOJO; | 414 return gpu::CommandBufferNamespace::MOJO; |
415 } | 415 } |
416 | 416 |
417 uint64_t CommandBufferClientImpl::GetCommandBufferID() const { | 417 uint64_t CommandBufferClientImpl::GetCommandBufferID() const { |
418 return sync_client_impl_->GetCommandBufferID(); | 418 return sync_client_impl_->GetCommandBufferID(); |
419 } | 419 } |
420 | 420 |
| 421 uint32_t CommandBufferClientImpl::GetExtraCommandBufferData() const { |
| 422 return 0; |
| 423 } |
| 424 |
421 uint64_t CommandBufferClientImpl::GenerateFenceSyncRelease() { | 425 uint64_t CommandBufferClientImpl::GenerateFenceSyncRelease() { |
422 return next_fence_sync_release_++; | 426 return next_fence_sync_release_++; |
423 } | 427 } |
424 | 428 |
425 bool CommandBufferClientImpl::IsFenceSyncRelease(uint64_t release) { | 429 bool CommandBufferClientImpl::IsFenceSyncRelease(uint64_t release) { |
426 return release != 0 && release < next_fence_sync_release_; | 430 return release != 0 && release < next_fence_sync_release_; |
427 } | 431 } |
428 | 432 |
429 bool CommandBufferClientImpl::IsFenceSyncFlushed(uint64_t release) { | 433 bool CommandBufferClientImpl::IsFenceSyncFlushed(uint64_t release) { |
430 return release != 0 && release <= flushed_fence_sync_release_; | 434 return release != 0 && release <= flushed_fence_sync_release_; |
(...skipping 17 matching lines...) Expand all Loading... |
448 | 452 |
449 // It is also safe to wait on the same context. | 453 // It is also safe to wait on the same context. |
450 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && | 454 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && |
451 sync_token->command_buffer_id() == GetCommandBufferID()) | 455 sync_token->command_buffer_id() == GetCommandBufferID()) |
452 return true; | 456 return true; |
453 | 457 |
454 return false; | 458 return false; |
455 } | 459 } |
456 | 460 |
457 } // namespace gles2 | 461 } // namespace gles2 |
OLD | NEW |